Build and Package #22
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Package | |
| on: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Triggers the workflow on push or pull request events but only for the develop branch | |
| # push: | |
| # branches: [ develop ] | |
| # pull_request: | |
| # branches: [ develop ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| name: Linux-Wincross-x64 | |
| - os: ubuntu-22.04-arm | |
| name: Linux-arm64 | |
| - os: macos-14 | |
| name: MacOS-arm64 | |
| - os: macos-13 | |
| name: MacOS-x64 | |
| steps: | |
| # ==== OS Specific Dependencies ==== | |
| - name: Linux Depends | |
| if: matrix.name == 'Linux-Wincross-x64' | |
| # For Windows crossbuild | |
| # Use "x64" for 64 bit (x86_64-w64-mingw32-gcc), "x86" for 32 bit (i686-w64-mingw32-gcc) | |
| uses: egor-tensin/setup-mingw@v2 | |
| with: | |
| platform: x64 | |
| # ==== Build Steps ==== | |
| - name: Check out repo | |
| uses: actions/checkout@v4 | |
| with: | |
| path: gbtoolsid-root | |
| submodules: false | |
| # ==== Builds ==== | |
| - name: Build Mac x64 | |
| if: (matrix.name == 'MacOS-x64') | |
| shell: bash | |
| run: | | |
| cd gbtoolsid-root | |
| make macoszip | |
| cd .. | |
| - name: Build Mac Arm64 | |
| if: (matrix.name == 'MacOS-arm64') | |
| shell: bash | |
| run: | | |
| cd gbtoolsid-root | |
| make macos_armzip | |
| cd .. | |
| - name: Build Linux Arm64 | |
| if: (matrix.name == 'Linux-arm64') | |
| shell: bash | |
| run: | | |
| cd gbtoolsid-root | |
| make linux_armzip | |
| cd .. | |
| - name: Build Linux + WinCross x64 | |
| if: (matrix.name == 'Linux-Wincross-x64') | |
| shell: bash | |
| run: | | |
| cd gbtoolsid-root | |
| make linuxzip | |
| make clean | |
| make wincrosszip | |
| cd .. | |
| # ==== Packaging ==== | |
| - name: Package build | |
| shell: bash | |
| run: | | |
| cd gbtoolsid-root | |
| ls -la bin | |
| # zip is already created in build step above | |
| # 7z a bin.zip bin/* | |
| cd .. | |
| - name: Store build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gbtoolsid build ${{ matrix.name }} | |
| # path: gbtoolsid-root/bin/${{ env.BUILD_PACKAGE_FILENAME }} | |
| path: gbtoolsid-root/bin | |
| # retention-days: 30 | |