build #29
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 | |
| on: | |
| push: | |
| tags: ['v*'] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { os: ubuntu-22.04, name: linux-x86_64 } | |
| - { os: windows-2022, name: win64 } | |
| - { os: macos-14, name: macos-universal } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Lint (ASCII-only string literals) | |
| shell: bash | |
| run: python3 tools/check-no-utf8-strings.py | |
| - name: Linux deps | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libasound2-dev libjack-jackd2-dev \ | |
| libfreetype6-dev libfontconfig1-dev \ | |
| libx11-dev libxcomposite-dev libxcursor-dev libxext-dev \ | |
| libxinerama-dev libxrandr-dev libxrender-dev \ | |
| libwebkit2gtk-4.1-dev libglu1-mesa-dev \ | |
| libcurl4-openssl-dev mesa-common-dev ninja-build | |
| - name: Configure | |
| shell: bash | |
| run: | | |
| EXTRA="" | |
| if [ "$RUNNER_OS" = "Linux" ]; then EXTRA="-DBOMBO_LTO=OFF"; fi | |
| # macOS: one universal binary covers both Apple Silicon and Intel. | |
| if [ "$RUNNER_OS" = "macOS" ]; then EXTRA='-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64'; fi | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=Release $EXTRA | |
| - name: Build | |
| shell: bash | |
| run: | | |
| JOBS="-j" | |
| if [ "$RUNNER_OS" = "Linux" ]; then JOBS="-j 2"; fi | |
| cmake --build build --config Release $JOBS | |
| - name: Test | |
| shell: bash | |
| run: ctest --test-dir build --output-on-failure -C Release | |
| - name: Stage artefacts (Linux) | |
| if: ${{ always() && runner.os == 'Linux' }} | |
| shell: bash | |
| run: | | |
| A=build/Bombo_artefacts/Release | |
| mkdir -p pkg | |
| cp -r "$A/VST3/Bombo.vst3" pkg/ | |
| cp "$A/CLAP/Bombo.clap" pkg/ | |
| cp "$A/Standalone/Bombo" pkg/Bombo | |
| strip pkg/Bombo pkg/Bombo.clap pkg/Bombo.vst3/Contents/x86_64-linux/Bombo.so || true | |
| - name: Stage artefacts (Windows) | |
| if: ${{ always() && runner.os == 'Windows' }} | |
| shell: bash | |
| run: | | |
| A=build/Bombo_artefacts/Release | |
| mkdir -p pkg | |
| cp -r "$A/VST3/Bombo.vst3" pkg/ | |
| cp "$A/CLAP/Bombo.clap" pkg/ | |
| cp "$A/Standalone/Bombo.exe" pkg/Bombo.exe | |
| - name: Stage artefacts (macOS, universal + ad-hoc sign) | |
| if: ${{ always() && runner.os == 'macOS' }} | |
| shell: bash | |
| run: | | |
| A=build/Bombo_artefacts/Release | |
| mkdir -p pkg | |
| cp -R "$A/VST3/Bombo.vst3" pkg/ | |
| cp -R "$A/CLAP/Bombo.clap" pkg/ | |
| cp -R "$A/Standalone/Bombo.app" pkg/ | |
| [ -d "$A/AU/Bombo.component" ] && cp -R "$A/AU/Bombo.component" pkg/ || true | |
| # Ad-hoc sign so Gatekeeper loads it locally; real Developer ID | |
| # signing + notarization is the separate macos-signing-runbook step. | |
| for b in pkg/Bombo.vst3 pkg/Bombo.clap pkg/Bombo.app pkg/Bombo.component; do | |
| [ -e "$b" ] && codesign --force --deep --sign - "$b" || true | |
| done | |
| # Confirm the binary is genuinely universal (arm64 + x86_64). | |
| lipo -info "pkg/Bombo.vst3/Contents/MacOS/Bombo" || true | |
| - name: Upload artefacts | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bombo-${{ matrix.name }} | |
| path: pkg/ | |
| if-no-files-found: error |