code-signing: sync SignPath test workflow with signpath-test (wine32 … #447
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
| # Mercury CI Pipeline - Build Verification | |
| # | |
| # Triggers: | |
| # - Automatically on every Pull Request | |
| # - Manually via workflow_dispatch (select which targets to build) | |
| # - Automatically on every push to mercuryv2 | |
| # | |
| # Builds: | |
| # - Linux amd64 (native, Debian 13) | |
| # - Linux arm64 (cross-compile, Debian 13) | |
| # - Linux armhf (cross-compile, Debian 13) | |
| # - Windows x64 (cross-compile via MinGW, Debian 13) | |
| name: Build | |
| on: | |
| pull_request: | |
| branches: [mercuryv2] | |
| push: | |
| branches: [mercuryv2] | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: 'Target branch | default = "mercuryv2"' | |
| required: false | |
| type: string | |
| default: 'mercuryv2' | |
| build_linux_amd64: | |
| description: 'Build Linux amd64' | |
| type: boolean | |
| default: true | |
| build_linux_arm64: | |
| description: 'Build Linux arm64 (cross-compile)' | |
| type: boolean | |
| default: true | |
| build_linux_armhf: | |
| description: 'Build Linux armhf (cross-compile)' | |
| type: boolean | |
| default: true | |
| build_windows: | |
| description: 'Build Windows x64 (cross-compile)' | |
| type: boolean | |
| default: true | |
| jobs: | |
| build-linux-amd64: | |
| name: Build Linux amd64 (Debian 13) | |
| runs-on: ubuntu-latest | |
| container: debian:trixie | |
| if: >- | |
| github.event_name == 'pull_request' || | |
| github.event_name == 'push' || | |
| github.event.inputs.build_linux_amd64 == 'true' | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Install build dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y --no-install-recommends \ | |
| ca-certificates \ | |
| build-essential \ | |
| git \ | |
| openssh-client \ | |
| libpulse-dev \ | |
| libasound2-dev \ | |
| libhamlib-dev | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Rhizomatica/mercury | |
| ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| fetch-depth: 0 | |
| ref: ${{ github.event.inputs.branch || github.event.pull_request.head.sha || github.sha }} | |
| - name: Git Safe Directory | |
| run: git config --global --add safe.directory /__w/mercury/mercury | |
| - name: Build Mercury (Linux amd64) | |
| shell: bash | |
| run: | | |
| make clean | |
| make -j$(nproc) 2>&1 | |
| echo "BUILD_EXIT_CODE=${PIPESTATUS[0]}" >> "$GITHUB_ENV" | |
| - name: Check build result | |
| run: | | |
| if [ "$BUILD_EXIT_CODE" != "0" ]; then | |
| echo "::error::Linux amd64 build failed" | |
| exit 1 | |
| fi | |
| echo "Linux amd64 build succeeded" | |
| build-linux-arm64: | |
| name: Build Linux arm64 (cross-compile, Debian 13) | |
| runs-on: ubuntu-latest | |
| container: debian:trixie | |
| if: >- | |
| github.event_name == 'pull_request' || | |
| github.event_name == 'push' || | |
| github.event.inputs.build_linux_arm64 == 'true' | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Install build dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y --no-install-recommends \ | |
| ca-certificates \ | |
| build-essential \ | |
| git \ | |
| openssh-client \ | |
| pkg-config \ | |
| gcc-aarch64-linux-gnu | |
| - name: Enable arm64 multiarch | |
| run: | | |
| dpkg --add-architecture arm64 | |
| apt-get update | |
| apt-get install -y --no-install-recommends \ | |
| libpulse-dev:arm64 \ | |
| libasound2-dev:arm64 \ | |
| libhamlib-dev:arm64 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Rhizomatica/mercury | |
| ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| fetch-depth: 0 | |
| ref: ${{ github.event.inputs.branch || github.event.pull_request.head.sha || github.sha }} | |
| - name: Git Safe Directory | |
| run: git config --global --add safe.directory /__w/mercury/mercury | |
| - name: Build Mercury (Linux arm64 cross-compile) | |
| shell: bash | |
| run: | | |
| export PKG_CONFIG_ALLOW_CROSS=1 | |
| export PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig | |
| make clean | |
| make -j$(nproc) CC=aarch64-linux-gnu-gcc 2>&1 | |
| echo "BUILD_EXIT_CODE=${PIPESTATUS[0]}" >> "$GITHUB_ENV" | |
| - name: Check build result | |
| run: | | |
| if [ "$BUILD_EXIT_CODE" != "0" ]; then | |
| echo "::error::Linux arm64 cross-compile failed" | |
| exit 1 | |
| fi | |
| echo "Linux arm64 cross-compile succeeded" | |
| build-linux-armhf: | |
| name: Build Linux armhf (cross-compile, Debian 13) | |
| runs-on: ubuntu-latest | |
| container: debian:trixie | |
| if: >- | |
| github.event_name == 'pull_request' || | |
| github.event_name == 'push' || | |
| github.event.inputs.build_linux_armhf == 'true' | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Install build dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y --no-install-recommends \ | |
| ca-certificates \ | |
| build-essential \ | |
| git \ | |
| openssh-client \ | |
| pkg-config \ | |
| gcc-arm-linux-gnueabihf | |
| - name: Enable armhf multiarch | |
| run: | | |
| dpkg --add-architecture armhf | |
| apt-get update | |
| apt-get install -y --no-install-recommends \ | |
| libpulse-dev:armhf \ | |
| libasound2-dev:armhf \ | |
| libhamlib-dev:armhf | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Rhizomatica/mercury | |
| ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| fetch-depth: 0 | |
| ref: ${{ github.event.inputs.branch || github.event.pull_request.head.sha || github.sha }} | |
| - name: Git Safe Directory | |
| run: git config --global --add safe.directory /__w/mercury/mercury | |
| - name: Build Mercury (Linux armhf cross-compile) | |
| shell: bash | |
| run: | | |
| export PKG_CONFIG_ALLOW_CROSS=1 | |
| export PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig | |
| make clean | |
| make -j$(nproc) CC=arm-linux-gnueabihf-gcc 2>&1 | |
| echo "BUILD_EXIT_CODE=${PIPESTATUS[0]}" >> "$GITHUB_ENV" | |
| - name: Check build result | |
| run: | | |
| if [ "$BUILD_EXIT_CODE" != "0" ]; then | |
| echo "::error::Linux armhf cross-compile failed" | |
| exit 1 | |
| fi | |
| echo "Linux armhf cross-compile succeeded" | |
| build-windows: | |
| name: Build Windows x64 (cross-compile, Debian 13) | |
| runs-on: ubuntu-latest | |
| container: debian:trixie | |
| if: >- | |
| github.event_name == 'pull_request' || | |
| github.event_name == 'push' || | |
| github.event.inputs.build_windows == 'true' | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Install build dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| git \ | |
| openssh-client \ | |
| gcc-mingw-w64-x86-64 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Rhizomatica/mercury | |
| ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| fetch-depth: 0 | |
| ref: ${{ github.event.inputs.branch || github.event.pull_request.head.sha || github.sha }} | |
| - name: Git Safe Directory | |
| run: git config --global --add safe.directory /__w/mercury/mercury | |
| - name: Build Mercury (Windows x64 cross-compile) | |
| shell: bash | |
| run: | | |
| make windows 2>&1 | |
| echo "BUILD_EXIT_CODE=${PIPESTATUS[0]}" >> "$GITHUB_ENV" | |
| - name: Check build result | |
| run: | | |
| if [ "$BUILD_EXIT_CODE" != "0" ]; then | |
| echo "::error::Windows x64 cross-compile failed" | |
| exit 1 | |
| fi | |
| echo "Windows x64 cross-compile succeeded" |