.github/workflows/build.yml #73
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: Caching | |
| uses: ./.github/actions/caching | |
| with: | |
| key-prefix: windows-build | |
| - name: Configure and build | |
| uses: ./.github/actions/common-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: | |
| needs: run-tests | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Caching | |
| uses: ./.github/actions/caching | |
| with: | |
| key-prefix: macos-build | |
| - name: Configure and build x64 | |
| uses: ./.github/actions/common-macos | |
| with: | |
| config-preset: Release | |
| build-preset: Release | |
| vcpkg-triplet: x64-osx | |
| arch: x86_64 | |
| - name: Configure and build arm64 | |
| uses: ./.github/actions/common-macos | |
| with: | |
| config-preset: Release | |
| build-preset: Release | |
| vcpkg-triplet: arm64-osx | |
| arch: arm64 | |
| - 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 |