|
17 | 17 | types: [opened, reopened, synchronize] |
18 | 18 | merge_group: |
19 | 19 | types: [checks_requested] |
20 | | -env: |
21 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
22 | 20 |
|
23 | 21 | jobs: |
24 | 22 | setup-and-run-tests: |
25 | | - runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }} |
| 23 | + runs-on: ubuntu-latest |
26 | 24 | steps: |
27 | 25 | - name: Checkout repository |
28 | 26 | uses: actions/checkout@v4.2.2 |
29 | 27 |
|
30 | | - - name: Install protoc 26.1 |
31 | | - uses: arduino/setup-protoc@v3 |
32 | | - with: |
33 | | - version: 26.1 |
34 | | - repo-token: ${{ secrets.GITHUB_TOKEN }} |
35 | | - |
36 | 28 | - name: Setup Bazel with shared caching |
37 | 29 | uses: bazel-contrib/setup-bazel@0.15.0 |
38 | 30 | with: |
39 | | - bazelisk-version: 1.26.0 |
40 | 31 | disk-cache: true |
41 | 32 | repository-cache: true |
42 | 33 | bazelisk-cache: true |
43 | 34 |
|
| 35 | + - name: Bazel info (discover paths) |
| 36 | + id: bazel-info |
| 37 | + run: | |
| 38 | + echo "BAZEL_OUTPUT_BASE=$(bazel info output_base)" >> $GITHUB_ENV |
| 39 | + echo "BAZEL_USER_ROOT=$(bazel info output_user_root)" >> $GITHUB_ENV |
| 40 | + echo "BAZEL_REPO_CACHE=$(bazel info repository_cache)" >> $GITHUB_ENV |
| 41 | + bazel info |
| 42 | +
|
| 43 | + - name: Cache Bazel output base |
| 44 | + uses: actions/cache@v4 |
| 45 | + with: |
| 46 | + path: | |
| 47 | + ${{ env.BAZEL_OUTPUT_BASE }}/action_cache |
| 48 | + ${{ env.BAZEL_OUTPUT_BASE }}/bazel-out |
| 49 | + ${{ env.BAZEL_OUTPUT_BASE }}/external |
| 50 | + ${{ env.BAZEL_OUTPUT_BASE }}/execroot |
| 51 | + key: bazel-ob-v2-${{ runner.os }}-${{ hashFiles('.bazelversion', 'MODULE.bazel', 'MODULE.bazel.lock', '**/*.bzl', 'Cargo.lock') }} |
| 52 | + restore-keys: | |
| 53 | + bazel-ob-v2-${{ runner.os }}- |
| 54 | +
|
44 | 55 | - name: Run Tests via Bazel |
45 | 56 | run: | |
46 | 57 | echo "Running: bazel test //src/..." |
|
0 commit comments