|
3 | 3 |
|
4 | 4 | name: Rust Cache |
5 | 5 |
|
6 | | -# Branch Checks never runs on main, so this saves the rust-checks cache that PR |
7 | | -# mirrors and merge groups restore. Keep env and build commands aligned with |
8 | | -# the Branch Checks rust-test job so the cache keys and contents match. |
| 6 | +# Branch Checks and Branch E2E never run on main, so this saves the Rust |
| 7 | +# caches that PR mirrors and merge groups restore. Keep each job's env and |
| 8 | +# build commands aligned with the job that restores its cache, so the cache |
| 9 | +# keys and contents match. |
9 | 10 | on: |
10 | 11 | push: |
11 | 12 | branches: |
|
65 | 66 | cargo nextest run --locked --profile ci --workspace --features openshell-server/test-support --no-run |
66 | 67 | cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path examples/supervisor-middleware-content-guard/Cargo.toml --no-run |
67 | 68 | cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/testkit/Cargo.toml --no-run |
| 69 | +
|
| 70 | + # Restored by build-e2e-bundles in branch-e2e.yml. |
| 71 | + e2e-bundles: |
| 72 | + name: E2E suite bundles cache (x86_64-unknown-linux-musl) |
| 73 | + runs-on: linux-amd64-cpu8 |
| 74 | + timeout-minutes: 60 |
| 75 | + steps: |
| 76 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 77 | + with: |
| 78 | + persist-credentials: false |
| 79 | + |
| 80 | + - uses: ./.github/actions/setup-nix |
| 81 | + with: |
| 82 | + prepare-shell: "true" |
| 83 | + cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 84 | + |
| 85 | + - id: rust |
| 86 | + uses: ./.github/actions/setup-rust |
| 87 | + with: |
| 88 | + cache-key: e2e-bundles-v1-x86_64-unknown-linux-musl |
| 89 | + save-cache: "true" |
| 90 | + |
| 91 | + - name: Build the bundles |
| 92 | + if: steps.rust.outputs.cache-hit != 'true' |
| 93 | + env: |
| 94 | + CARGO_TARGET_DIR: ${{ github.workspace }}/target |
| 95 | + CARGO_PROFILE_DEV_DEBUG: line-tables-only |
| 96 | + run: | |
| 97 | + set -euo pipefail |
| 98 | + nix build --no-link .#openshell-test-runner || nix build --no-link .#openshell-test-runner |
| 99 | + for family in features drivers/podman; do |
| 100 | + nix run .#openshell-test-runner -- build \ |
| 101 | + --family "$family" --out "$RUNNER_TEMP/e2e-bundles/${family//\//-}" |
| 102 | + done |
0 commit comments