Tell the musl container which world it is building #553
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: Build | |
| on: | |
| push: | |
| pull_request: | |
| # A push to a branch with an open pull request fires both triggers; one | |
| # group per head commit keeps a single run of the pair alive. | |
| concurrency: | |
| group: build-${{ github.event.pull_request.head.sha || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Structural checks that need no build: the stage partition manifest and | |
| # the host binary format guard. | |
| checks: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| # The protocol tests below walk real first-parent history. | |
| fetch-depth: 0 | |
| - name: Run the cmake script tests | |
| run: | | |
| for script in tests/cmake/*.cmake; do | |
| case "$script" in | |
| *-check.cmake) continue ;; | |
| esac | |
| echo "== $script" | |
| cmake -P "$script" | |
| done | |
| - name: Run the buildscripts-ci protocol tests | |
| run: | | |
| for test in tests/protocol/test-*.sh; do | |
| echo "== $test" | |
| "$test" | |
| done | |
| - name: Run the CI script tests | |
| run: | | |
| for test in tests/ci/test-*.sh; do | |
| echo "== $test" | |
| "$test" | |
| done | |
| # Which hosts exist, at which stage, on which runner, and which of them are | |
| # published: all of it is cmake/hosts.json, read through the same describe | |
| # call autobuilds makes. This job is the only place a matrix comes from. | |
| describe: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| lock: ${{ steps.describe.outputs.lock }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| # The head commit, not the merge commit: the lock names a revision | |
| # the build legs check out again, and a merge commit is one that | |
| # only exists for as long as the pull request does. | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| # describe derives the version from first-parent history. | |
| fetch-depth: 0 | |
| - id: describe | |
| shell: bash | |
| run: | | |
| ./buildscripts-ci describe --profile vita --output lock.json | |
| { | |
| echo "lock<<LOCK_JSON_EOF" | |
| cat lock.json | |
| echo "LOCK_JSON_EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| # The path that publishes, run on the revision under review. There was a | |
| # second matrix here, hand-written, and it built the same hosts by another | |
| # route: cmake straight from the job rather than through build-host.sh. It | |
| # cost twice the runners and it went green for a build nobody would ever | |
| # publish -- db4d1a593 merged that way with the Intel Mac host broken, | |
| # because its macOS leg had never run the code that publishes one. | |
| build: | |
| needs: describe | |
| # Not on a push to master: that push is announced to autobuilds, which | |
| # describes the same revision, builds the same lock through the same | |
| # reusable workflow, and publishes what comes out. Building it here as | |
| # well is the same ten legs twice, and the copy that says whether the | |
| # revision is releasable is the one over there. | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/master' | |
| uses: ./.github/workflows/build-sdk.yml | |
| with: | |
| lock: ${{ needs.describe.outputs.lock }} | |
| # The packaging tests work over fixtures, except the last of them, which | |
| # configures a staged cross and so needs a stage-1 SDK. It gets the one the | |
| # build just made; building a second one to test packaging was what the job | |
| # this replaces did. | |
| package-tests: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install what the packaging tests build and read archives with | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq cmake build-essential meson ninja-build \ | |
| libarchive-tools pkg-config | |
| # By stage, not by host name: which host produces stage 1 is the lock's | |
| # to say, and there is only ever one of them. | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| pattern: stage1-* | |
| path: artifacts | |
| - name: Unpack the stage-1 sysroot | |
| shell: bash | |
| run: | | |
| source scripts/ci/lib.sh | |
| stage1_source=$(ci_find_stage_artifact artifacts 1 '*') | |
| ci_unpack_sdk_artifact "$stage1_source" "$PWD/stage1" | |
| echo "VITASDK_STAGE1_DIR=$(ci_find_sdk_root "$PWD/stage1")" >> "$GITHUB_ENV" | |
| - name: Run the packaging tests | |
| run: | | |
| for test in tests/package/test-*.sh; do | |
| echo "== $test" | |
| "$test" | |
| done |