14
14
check-cache :
15
15
runs-on :
16
16
labels : ubuntu-22.04-8core
17
- outputs :
18
- runner : ${{ steps.runner.outputs.runner }}
19
17
steps :
20
18
- name : Check out repository code
21
19
uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # pin@v3
@@ -26,50 +24,37 @@ jobs:
26
24
with :
27
25
path : |
28
26
~/.cache/bazel
29
- key : ${{ runner.os }}-${{ env.ImageVersion }}- bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}-${{ hashFiles('bazel/import_llvm.bzl') }}
27
+ key : ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}-${{ hashFiles('bazel/import_llvm.bzl') }}
30
28
restore-keys : |
31
- ${{ runner.os }}-${{ env.ImageVersion }}- bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}-
29
+ ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}-
32
30
lookup-only : true
33
- - name : Select runner
34
- id : runner
35
- env :
36
- CACHE_HIT : ${{ steps.cache.outputs.cache-hit == 'true' }}
37
- run : |
38
- set -euo pipefail
39
-
40
- if [[ "${CACHE_HIT}" == "true" ]]; then
41
- echo "runner=ubuntu-22.04-8core" >> "$GITHUB_OUTPUT"
42
- else
43
- echo "runner=ubuntu-22.04-32core" >> "$GITHUB_OUTPUT"
44
- fi
45
31
46
32
build-and-test :
47
33
needs : check-cache
48
34
runs-on :
49
- labels : ${{ needs.check-cache.outputs.runner }}
35
+ labels : ubuntu-22.04-32core
50
36
steps :
51
37
- name : Install dependencies
52
38
run : |
53
- sudo apt-get update
54
39
sudo apt-get install -y libomp-dev
55
40
- name : Check out repository code
56
41
uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # pin@v3
57
42
with :
58
- key : ${{ runner.os }}-${{ env.ImageVersion }}- bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}-${{ hashFiles('bazel/import_llvm.bzl') }}
43
+ key : ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}-${{ hashFiles('bazel/import_llvm.bzl') }}
59
44
60
45
- name : Cache bazel build artifacts
61
46
uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # pin@v4.2.0
62
47
with :
63
48
path : |
64
49
~/.cache/bazel
65
- key : ${{ runner.os }}-${{ env.ImageVersion }}- bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}-${{ hashFiles('bazel/import_llvm.bzl') }}
50
+ key : ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}-${{ hashFiles('bazel/import_llvm.bzl') }}
66
51
restore-keys : |
67
- ${{ runner.os }}-${{ env.ImageVersion }}- bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}-
52
+ ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}-
68
53
69
54
- name : " Run `bazel build`"
70
55
run : |
71
- bazel build --incompatible_strict_action_env - c opt //...
56
+ bazel build -c opt //...
72
57
73
58
- name : " Run `bazel test`"
74
59
run : |
75
- bazel test --incompatible_strict_action_env - c opt //...
60
+ bazel test -c opt //...
0 commit comments