@@ -28,12 +28,12 @@ jobs:
28
28
29
29
# Work-out whether we need to re-build the examples. We need to re-build the
30
30
# examples if either _any_ fo the examples has changed, or the WASM cache
31
- # has expired
31
+ # has expired, or the ./funcs folder have changed
32
32
needs-build :
33
33
if : github.event.pull_request.draft == false
34
34
runs-on : ubuntu-latest
35
35
outputs :
36
- needs-wasm : ${{ steps.wasm-cache.outputs.cache-hit != 'true' }}
36
+ needs-wasm : ${{ ( steps.wasm-cache.outputs.cache-hit != 'true') || (steps.filter.outputs.funcs-changed == 'true') }}
37
37
steps :
38
38
- name : " Checkout code"
39
39
uses : actions/checkout@v4
52
52
path : ./wasm
53
53
key : wasm-${{ steps.submodule-commit.outputs.digest }}
54
54
lookup-only : true
55
+ # Check if any of the submodules have been modified
56
+ - uses : dorny/paths-filter@v3
57
+ id : filter
58
+ with :
59
+ filters : |
60
+ funcs-changed:
61
+ - 'func/**'
62
+
55
63
56
64
build-examples :
57
65
needs : needs-build
73
81
rustup default stable
74
82
rustup target add wasm32-wasip1
75
83
./bin/inv_wrapper.sh rabe jwt
84
+ - name : " Build OpenCV"
85
+ run : ./bin/inv_wrapper.sh opencv
76
86
- name : " Build FFmpeg"
77
87
run : ./bin/inv_wrapper.sh ffmpeg
78
88
- name : " Build ImageMagick"
@@ -93,14 +103,22 @@ jobs:
93
103
run : ./bin/inv_wrapper.sh tensorflow
94
104
- name : " Build PolyBench/C"
95
105
run : ./bin/inv_wrapper.sh polybench polybench --native
106
+ - name : " Manually re-compile libz (the sysroot has a version with atomics)"
107
+ run : |
108
+ git submodule update --init
109
+ ./bin/inv_wrapper.sh zlib
110
+ working-directory : ./cpp
96
111
- name : " Build functions used in the tests"
97
112
run : ./bin/inv_wrapper.sh func.tests
98
113
- name : " Get CPP/Python commits"
99
114
id : submodule-commit
100
115
run : |
101
116
apt install -y zstd
102
117
git config --global --add safe.directory "$GITHUB_WORKSPACE"
103
- echo "digest=$(git submodule status | awk '{ print $1; }' | md5sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
118
+ submodule_digest=$(git submodule status | awk '{ print $1; }' | md5sum | awk '{ print $1}')
119
+ func_digest=$(find 'func' -type f -exec md5sum {} + | sort | md5sum | awk '{ print $1 }')
120
+ echo "${submodule_digest}-${func_digest}"
121
+ echo "digest=$(echo -n '${submodule_digest}-${func_digest}' | md5sum | awk '{ print $1 }')" >> $GITHUB_OUTPUT
104
122
# Also move to a different path to restore from
105
123
mv /usr/local/faasm/wasm ./wasm
106
124
# If we are here we _always_ want to overwrite the cache
@@ -168,7 +186,11 @@ jobs:
168
186
run : |
169
187
sudo apt install -y zstd
170
188
git config --global --add safe.directory "$GITHUB_WORKSPACE"
171
- echo "digest=$(git submodule status | awk '{ print $1; }' | md5sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
189
+ submodule_digest=$(git submodule status | awk '{ print $1; }' | md5sum | awk '{ print $1}')
190
+ func_digest=$(find 'func' -type f -exec md5sum {} + | sort | md5sum | awk '{ print $1 }')
191
+ echo "${submodule_digest}-${func_digest}"
192
+ echo "digest=$(echo -n '${submodule_digest}-${func_digest}' | md5sum | awk '{ print $1 }')" >> $GITHUB_OUTPUT
193
+ # echo "digest=$(git submodule status | awk '{ print $1; }' | md5sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
172
194
- name : " Get WASM cache"
173
195
uses : actions/cache/restore@v4
174
196
id : cpp-wasm-cache
@@ -182,6 +204,14 @@ jobs:
182
204
- name : " Print logs if wasm-upload fails"
183
205
if : failure() && (steps.wasm-upload.outcome == 'failure')
184
206
run : faasmctl logs -s upload
207
+ - name : " Run OpenCV check"
208
+ if : " contains(env.FAASM_WASM_VM, 'wamr')"
209
+ timeout-minutes : 2
210
+ run : faasmctl invoke opencv pca --cmdline "faasm://opencv/composers"
211
+ - name : " Run OpenCV k-NN Inference"
212
+ if : " contains(env.FAASM_WASM_VM, 'wamr')"
213
+ timeout-minutes : 2
214
+ run : faasmctl invoke opencv check --cmdline "faasm://opencv/bus_photo.bmp faasm://opencv/out.bmp"
185
215
- name : " Run MPI kernels"
186
216
timeout-minutes : 2
187
217
run : |
0 commit comments