Repository navigation
ci: validate three upstream PR heads on isolated read-only fork runners #1
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: three-pr-head-validation | |
| on: | |
| push: | |
| branches: [ci/three-pr-validation-20261012] | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| name: PR ${{ matrix.pr }} head | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - pr: 5486 | |
| sha: 1a4368f2acf362f076fd2282f968bc6f0c910a81 | |
| - pr: 5497 | |
| sha: 68682c7a793d46902b90bef981ff3d5feb6f41db | |
| - pr: 5498 | |
| sha: 091716c82864650cf05d356614dfadc53e0c4653 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ matrix.sha }} | |
| persist-credentials: false | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.x | |
| - name: Record exact tested head and preserve checked-in binary | |
| env: | |
| EXPECTED_SHA: ${{ matrix.sha }} | |
| run: | | |
| test "$(git rev-parse HEAD)" = "$EXPECTED_SHA" | |
| mkdir -p "$RUNNER_TEMP/evidence" | |
| git rev-parse HEAD > "$RUNNER_TEMP/evidence/tested-sha.txt" | |
| cp apps/predbat/prediction_kernel_lib_x86_64.so "$RUNNER_TEMP/checked-in-kernel.so" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run all pre-commit checks without auto-commit | |
| run: | | |
| pre-commit run --all-files > "$RUNNER_TEMP/evidence/pre-commit.log" 2>&1 || { cat "$RUNNER_TEMP/evidence/pre-commit.log"; exit 1; } | |
| - name: Build prediction kernel | |
| if: ${{ !cancelled() }} | |
| run: bash apps/predbat/build_kernel.sh | |
| - name: Run unit tests with required native kernel | |
| if: ${{ !cancelled() }} | |
| env: | |
| PREDBAT_KERNEL_REQUIRED: "1" | |
| working-directory: coverage | |
| run: | | |
| python3 ../apps/predbat/unit_test.py --quick > "$RUNNER_TEMP/evidence/unit-tests.log" 2>&1 || { tail -n 160 "$RUNNER_TEMP/evidence/unit-tests.log"; exit 1; } | |
| - name: Verify original checked-in x86_64 kernel binary | |
| if: ${{ !cancelled() }} | |
| working-directory: coverage | |
| run: | | |
| python3 ../apps/predbat/verify_kernel_binary.py "$RUNNER_TEMP/checked-in-kernel.so" > "$RUNNER_TEMP/evidence/kernel-parity.log" 2>&1 || { cat "$RUNNER_TEMP/evidence/kernel-parity.log"; exit 1; } | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: pr-${{ matrix.pr }}-${{ matrix.sha }} | |
| path: ${{ runner.temp }}/evidence/ | |
| retention-days: 7 |