@@ -33,40 +33,32 @@ jobs:
33
33
if : github.event.pull_request.draft == false
34
34
runs-on : ubuntu-latest
35
35
outputs :
36
- needs-wasm : ${{ ( steps.filter.outputs.examples-changed == 'true') || (steps. wasm-cache.outputs.cache-hit != 'true') }}
36
+ needs-wasm : ${{ steps.wasm-cache.outputs.cache-hit != 'true' }}
37
37
steps :
38
38
- name : " Checkout code"
39
39
uses : actions/checkout@v4
40
- # Check if any of the submodules have been modified
41
- - uses : dorny/paths-filter@v3
42
- id : filter
43
40
with :
44
- filters : |
45
- examples-changed:
46
- - './examples/**'
41
+ submodules : true
47
42
# Check if we have a WASM cache hit
48
- - name : " Get CPP/Python commits "
43
+ - name : " Get digest of all submodules "
49
44
id : submodule-commit
50
45
run : |
51
- git submodule update --init ./cpp
52
- git submodule update --init ./python
53
46
sudo apt install -y zstd
54
47
git config --global --add safe.directory "$GITHUB_WORKSPACE"
55
- echo "cpp-commit=$(git submodule status ./cpp | cut '-d ' -f 2)" >> $GITHUB_OUTPUT
56
- echo "py-commit=$(git submodule status ./python | cut '-d ' -f 2)" >> $GITHUB_OUTPUT
48
+ echo "digest=$(git submodule status | awk '{ print $1; }' | md5sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
57
49
- uses : actions/cache/restore@v4
58
50
id : wasm-cache
59
51
with :
60
52
path : ./wasm
61
- key : wasm-${{ steps.submodule-commit.outputs.cpp-commit }}-${{ steps.submodule-commit.outputs.py-commit }}
53
+ key : wasm-${{ steps.submodule-commit.outputs.digest }}
62
54
lookup-only : true
63
55
64
56
build-examples :
65
57
needs : needs-build
66
58
if : ${{ needs.needs-build.outputs.needs-wasm == 'true' }}
67
59
runs-on : ubuntu-latest
68
60
container :
69
- image : faasm.azurecr.io/examples-build:0.3.1_0.3.1
61
+ image : faasm.azurecr.io/examples-build:0.4.0_0.4.0
70
62
credentials :
71
63
username : ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
72
64
password : ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
100
92
run : |
101
93
apt install -y zstd
102
94
git config --global --add safe.directory "$GITHUB_WORKSPACE"
103
- echo "cpp-commit=$(git submodule status ./cpp | cut '-d ' -f 2)" >> $GITHUB_OUTPUT
104
- echo "py-commit=$(git submodule status ./python | cut '-d ' -f 2)" >> $GITHUB_OUTPUT
95
+ echo "digest=$(git submodule status | awk '{ print $1; }' | md5sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
105
96
# Also move to a different path to restore from
106
97
mv /usr/local/faasm/wasm ./wasm
107
98
# If we are here we _always_ want to overwrite the cache
@@ -110,7 +101,7 @@ jobs:
110
101
if : always()
111
102
with :
112
103
path : ./wasm
113
- key : wasm-${{ steps.submodule-commit.outputs.cpp-commit }}-${{ steps.submodule-commit.outputs.py-commit }}
104
+ key : wasm-${{ steps.submodule-commit.outputs.digest }}
114
105
115
106
run-examples-faasmctl :
116
107
needs : [build-examples]
@@ -128,9 +119,8 @@ jobs:
128
119
run :
129
120
shell : bash
130
121
env :
131
- CONAN_CACHE_MOUNT_SOURCE : ~/.conan
132
122
FAASM_INI_FILE : ./faasm.ini
133
- FAASM_VERSION : 0.21.2
123
+ FAASM_VERSION : 0.22.0
134
124
FAASM_WASM_VM : ${{ matrix.faasm_wasm_vm }}
135
125
steps :
136
126
- uses : csegarragonz/set-compose-version-action@main
@@ -149,6 +139,7 @@ jobs:
149
139
remove-docker-images : ' true'
150
140
remove-dotnet : ' true'
151
141
remove-haskell : ' true'
142
+
152
143
- name : " Checkout code"
153
144
uses : actions/checkout@v4
154
145
- name : " Install faasmctl"
@@ -179,7 +170,11 @@ jobs:
179
170
key : wasm-${{ steps.submodule-commit.outputs.cpp-commit }}-${{ steps.submodule-commit.outputs.py-commit }}
180
171
fail-on-cache-miss : true
181
172
- name : " Upload all WASM files to the cluster"
173
+ id : wasm-upload
182
174
run : ./bin/inv_wrapper.sh wasm.upload
175
+ - name : " Print logs if wasm-upload fails"
176
+ if : failure() && (steps.wasm-upload.outcome == 'failure')
177
+ run : faasmctl logs -s upload
183
178
- name : " Run MPI kernels"
184
179
timeout-minutes : 2
185
180
run : |
@@ -205,13 +200,12 @@ jobs:
205
200
faasmctl invoke kernels-mpi p2p --cmdline '10 1024 1024' --mpi-world-size 4
206
201
faasmctl invoke kernels-mpi transpose --cmdline '10 1024 32' --mpi-world-size 4
207
202
- name : " Run OpenMP kernels"
208
- if : " contains(env.FAASM_WASM_VM, 'wavm ')"
203
+ if : " contains(env.FAASM_WASM_VM, 'wamr ')"
209
204
timeout-minutes : 2
210
205
run : |
211
206
faasmctl invoke kernels-omp global --cmdline '2 10 1024'
212
207
faasmctl invoke kernels-omp p2p --cmdline '2 10 1024 1024'
213
- # The sparse OpenMP kernel fails during the result integrity checks
214
- # faasmctl invoke kernels-omp sparse --cmdline '2 10 10 5'
208
+ faasmctl invoke kernels-omp sparse --cmdline '2 10 10 5'
215
209
# The transpose OpenMP kernel can not be cross-compiled due to problems
216
210
# with the static_for signature and symbol definition
217
211
# faasmctl invoke kernels-omp transpose --cmdline '10 1024 32'
@@ -254,10 +248,11 @@ jobs:
254
248
faasmctl invoke polybench poly_jacobi-1d
255
249
faasmctl invoke polybench poly_jacobi-2d
256
250
faasmctl invoke polybench poly_seidel-2d
257
- - name : " Run ImageMagick"
258
- if : " contains(env.FAASM_WASM_VM, 'wavm')"
259
- timeout-minutes : 1
260
- run : faasmctl invoke imagemagick main --cmdline 'faasm://im/sample_image.png -flip faasm://im/image_out.png'
251
+ # TODO(wamr-tf): TF Check broken with WAVM, uncomment when WAMR supports it
252
+ # - name: "Run ImageMagick"
253
+ # if: "contains(env.FAASM_WASM_VM, 'wamr')"
254
+ # timeout-minutes: 1
255
+ # run: faasmctl invoke imagemagick main --cmdline 'faasm://im/sample_image.png -flip faasm://im/image_out.png'
261
256
- name : " Run LAMMPS"
262
257
timeout-minutes : 1
263
258
run : faasmctl invoke lammps main --cmdline '-in faasm://lammps-data/in.controller.wall' --mpi-world-size 4
@@ -268,15 +263,18 @@ jobs:
268
263
- name : " Run LAMMPS migration-net binary"
269
264
timeout-minutes : 1
270
265
run : faasmctl invoke lammps migration-net --cmdline '-in faasm://lammps-data/in.controller.wall' --mpi-world-size 4 --input-data '1 2 10 2'
271
- # 08/12/2023 - LULESH is broken with a memory leak
272
- # - name: "Run LULESH"
273
- # timeout-minutes: 1
274
- # if: "contains(env.FAASM_WASM_VM, 'wavm')"
275
- # run: faasmctl invoke lulesh main --cmdline '-i 5 -s 20 -r 11 -c 1 -b 1' --input-data '4'
276
- - name : " Run TFlite check"
266
+ - name : " Run LULESH"
277
267
timeout-minutes : 1
278
- if : " contains(env.FAASM_WASM_VM, 'wavm')"
279
- run : faasmctl invoke tf check
268
+ if : " contains(env.FAASM_WASM_VM, 'wamr')"
269
+ run : faasmctl invoke lulesh main --cmdline '-i 5 -s 20 -r 11 -c 1 -b 1' --input-data '4'
270
+ # TODO(wamr-tf): TF Check broken with WAVM, uncomment when WAMR supports it
271
+ # - name: "Run TFlite check"
272
+ # timeout-minutes: 1
273
+ # if: "contains(env.FAASM_WASM_VM, 'wamr')"
274
+ # run: faasmctl invoke tf check
280
275
- name : " Run FFmpeg check"
281
276
timeout-minutes : 1
282
277
run : faasmctl invoke ffmpeg check
278
+ - name : " Print logs in case of failure"
279
+ if : failure()
280
+ run : faasmctl logs -s worker
0 commit comments