feat: allow building on other compatible architectures #1631
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: Spread | |
| on: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: | |
| - main | |
| - hotfix/* | |
| # Cancel existing jobs for this branch/PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| snap-build-amd64: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build snap | |
| uses: snapcore/action-build@v1 | |
| id: snap | |
| - name: Upload snap artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: snap-amd64 | |
| path: ${{ steps.snap.outputs.snap }} | |
| snap-build-arm64: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build snap | |
| uses: snapcore/action-build@v1 | |
| id: snap | |
| - name: Upload snap artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: snap-arm64 | |
| path: ${{ steps.snap.outputs.snap }} | |
| snap-tests: | |
| runs-on: spread-installed | |
| needs: [snap-build-amd64, snap-build-arm64] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| spread: | |
| - "google:" | |
| steps: | |
| - name: Cleanup job workspace | |
| run: | | |
| rm -rf "${{ github.workspace }}" | |
| mkdir "${{ github.workspace }}" | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| submodules: true | |
| - name: Download amd64 snap artifact | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: snap-amd64 | |
| - name: Download arm64 snap artifact | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: snap-arm64 | |
| - name: Run spread | |
| run: | | |
| mv *.snap tests/spread/ | |
| spread ${{ matrix.spread }} | |
| - name: Discard spread workers | |
| if: always() | |
| run: | | |
| shopt -s nullglob | |
| for r in .spread-reuse.*.yaml; do | |
| pid="$(echo "$r" | grep -o -E '[0-9]+')" | |
| kill -9 $pid | |
| spread -discard -reuse-pid=$pid | |
| done |