@@ -68,42 +68,60 @@ jobs:
68
68
include :
69
69
- name : ' V8 on Linux/x86_64'
70
70
runtime : ' v8'
71
+ repo : ' v8'
71
72
os : ubuntu-20.04
73
+ arch : x86_64
72
74
action : test
73
75
flags : ' --define crypto=system'
74
76
- name : ' V8 on macOS/x86_64'
75
77
runtime : ' v8'
78
+ repo : ' v8'
76
79
os : macos-11
80
+ arch : x86_64
77
81
action : test
78
82
- name : ' WAMR on Linux/x86_64'
79
83
runtime : ' wamr'
84
+ repo : ' com_github_bytecodealliance_wasm_micro_runtime'
80
85
os : ubuntu-20.04
86
+ arch : x86_64
81
87
action : test
82
88
- name : ' WAMR on macOS/x86_64'
83
89
runtime : ' wamr'
90
+ repo : ' com_github_bytecodealliance_wasm_micro_runtime'
84
91
os : macos-11
92
+ arch : x86_64
85
93
action : test
86
94
- name : ' Wasmtime on Linux/x86_64'
87
95
runtime : ' wasmtime'
96
+ repo : ' com_github_bytecodealliance_wasmtime'
88
97
os : ubuntu-20.04
98
+ arch : x86_64
89
99
action : test
90
100
- name : ' Wasmtime on Linux/aarch64'
91
101
runtime : ' wasmtime'
102
+ repo : ' com_github_bytecodealliance_wasmtime'
92
103
os : ubuntu-20.04
104
+ arch : aarch64
93
105
action : build
94
106
run_under : docker run --rm --env HOME=$HOME --env USER=$(id -un) --volume "$HOME:$HOME" --workdir $(pwd) --user $(id -u):$(id -g) --platform linux/arm64 piotrsikora/build-tools:bazel-4.2.2-clang-13-gcc-11
95
107
- name : ' Wasmtime on Linux/s390x'
96
108
runtime : ' wasmtime'
109
+ repo : ' com_github_bytecodealliance_wasmtime'
97
110
os : ubuntu-20.04
111
+ arch : s390x
98
112
action : build
99
113
run_under : docker run --rm --env HOME=$HOME --env USER=$(id -un) --volume "$HOME:$HOME" --workdir $(pwd) --user $(id -u):$(id -g) --platform linux/s390x piotrsikora/build-tools:bazel-4.2.2-clang-13-gcc-11
100
114
- name : ' Wasmtime on macOS/x86_64'
101
115
runtime : ' wasmtime'
116
+ repo : ' com_github_bytecodealliance_wasmtime'
102
117
os : macos-11
118
+ arch : x86_64
103
119
action : test
104
120
- name : ' WAVM on Linux/x86_64'
105
121
runtime : ' wavm'
122
+ repo : ' com_github_wavm_wavm'
106
123
os : ubuntu-20.04
124
+ arch : x86_64
107
125
action : test
108
126
109
127
steps :
@@ -121,14 +139,21 @@ jobs:
121
139
if : startsWith(matrix.run_under, 'docker')
122
140
run : docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
123
141
142
+ - name : Set cache key
143
+ id : cache-key
144
+ run : echo "::set-output name=uniq::$(bazel query --output build //external:${{ matrix.repo }} | grep -E 'sha256|commit' | cut -d\" -f2)"
145
+
124
146
- name : Bazel cache
125
147
if : ${{ matrix.runtime != 'wasmtime' || startsWith(matrix.run_under, 'docker') }}
126
148
uses : actions/cache@v2
127
149
with :
128
150
path : |
129
151
~/.cache/bazel
130
152
/private/var/tmp/_bazel_runner/
131
- key : bazel-${{ matrix.os }}-${{ matrix.runtime }}-${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.raze.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }}
153
+ key : ${{ matrix.arch }}-${{ matrix.os }}-${{ matrix.runtime }}-${{ steps.cache-key.outputs.uniq }}-${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.raze.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }}
154
+ restore-keys : |
155
+ ${{ matrix.arch }}-${{ matrix.os }}-${{ matrix.runtime }}-${{ steps.cache-key.outputs.uniq }}-
156
+ ${{ matrix.arch }}-${{ matrix.os }}-${{ matrix.runtime }}
132
157
133
158
- name : Bazel build/test
134
159
run : >
0 commit comments