.github/workflows/build.yml #62
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
| on: | |
| workflow_dispatch: | |
| jobs: | |
| run-tests: | |
| uses: ./.github/workflows/test.yml | |
| build-windows: | |
| needs: [run-tests] | |
| runs-on: windows-2025 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Configure and build | |
| uses: ./.github/actions/build-windows | |
| with: | |
| config-preset: Release | |
| build-preset: Release | |
| - name: Copy exe | |
| run: copy ".\bin\Release\PartStackerGUI.exe" ".\bin\Release\PartStackerGUI-windows.exe" | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: PartStackerGUI-windows | |
| path: .\bin\Release\PartStackerGUI-windows.exe | |
| build-macos-arm64: | |
| needs: [run-tests] | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Configure and build arm64 | |
| uses: ./.github/actions/build-macos | |
| with: | |
| config-preset: Release | |
| build-preset: Release | |
| vcpkg-triplet: arm64-osx | |
| arch: arm64 | |
| build-macos-x64: | |
| needs: [run-tests, build-macos-arm64] | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Configure and build x64 | |
| uses: ./.github/actions/build-macos | |
| with: | |
| config-preset: Release | |
| build-preset: Release | |
| vcpkg-triplet: x64-osx | |
| arch: x86_64 | |
| package-macos: | |
| needs: [run-tests, build-macos-arm64, build-macos-x64] | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Cache restore | |
| uses: ./.github/actions/cache | |
| with: | |
| os: macos | |
| - name: Merge binaries | |
| run: | | |
| mkdir -p ./bin/Release | |
| cp -R ./bin/x86_64/Release/PartStackerGUI.app ./bin/Release/PartStackerGUI.app | |
| lipo -create \ | |
| ./bin/x86_64/Release/PartStackerGUI.app/Contents/MacOS/PartStackerGUI \ | |
| ./bin/arm64/Release/PartStackerGUI.app/Contents/MacOS/PartStackerGUI \ | |
| -output ./bin/Release/PartStackerGUI.app/Contents/MacOS/PartStackerGUI | |
| - name: Package into DMG | |
| run: | | |
| mkdir -p ./bin/Release | |
| hdiutil create \ | |
| -volname "PartStackerGUI" \ | |
| -srcfolder ./bin/Release \ | |
| -format UDZO \ | |
| ./bin/Release/PartStackerGUI-mac.dmg | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: PartStackerGUI-mac | |
| path: ./bin/Release/PartStackerGUI-mac.dmg |