forked from WasmEdge/WasmEdge
-
-
Notifications
You must be signed in to change notification settings - Fork 0
447 lines (407 loc) · 27.2 KB
/
test-python-install-script.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
name: test-python-install-script
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
paths:
- '.github/workflows/test-python-install-script.yml'
- 'utils/install.sh'
- 'utils/uninstall.sh'
- 'utils/install.py'
pull_request:
branches:
- master
paths:
- '.github/workflows/test-python-install-script.yml'
- 'utils/install.sh'
- 'utils/uninstall.sh'
- 'utils/install.py'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Setup Python env
uses: actions/setup-python@v4
- name: Install black
run: pip install black
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check formatting for installer
run: |
black --check --verbose --diff ./utils/install.py
linux:
strategy:
fail-fast: false
matrix:
include:
- name: CentOS 8 Stream
host_runner: ubuntu-latest
package_manager: yum
docker_image: quay.io/centos/centos:stream8
python_package: python3 python2
python2_ex: python2
python3_ex: python3
extra_setup_command: yum install -y diffutils
- name: CentOS 7
host_runner: ubuntu-latest
package_manager: yum
docker_image: centos:7.9.2009
python_package: python3 python2
python2_ex: python2
python3_ex: python3
extra_setup_command: echo "No extra command"
- name: Ubuntu 20.04
host_runner: ubuntu-latest
package_manager: apt
docker_image: ubuntu:20.04
python_package: python2 python3
python2_ex: python2
python3_ex: python3
extra_setup_command: apt update && apt install -y lsb-release
- name: Ubuntu 18.04
host_runner: ubuntu-latest
package_manager: apt
docker_image: ubuntu:18.04
python_package: python3 python2.7
python2_ex: python2.7
python3_ex: python3
extra_setup_command: echo "No extra command"
- name: Ubuntu 16.04
host_runner: ubuntu-latest
package_manager: apt
docker_image: ubuntu:16.04
python_package: python2.7
python2_ex: python2.7
python3_ex: python3.7
extra_setup_command: apt update -y && apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget && wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz && tar xzf Python-3.7.4.tgz && cd Python-3.7.4 && ./configure && make -j && make install && cd ..
- name: manylinux2014 aarch64
host_runner: linux-arm64
package_manager: yum
docker_image: wasmedge/wasmedge:manylinux2014_aarch64
python_package: python2 python3
python2_ex: python2
python3_ex: python3
extra_setup_command: echo "No extra command"
name: ${{ matrix.name }}
runs-on: ${{ matrix.host_runner }}
container:
image: ${{ matrix.docker_image }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install git and curl
run: |
${{ matrix.extra_setup_command }}
${{ matrix.package_manager }} update -y
${{ matrix.package_manager }} install -y git curl
- name: Install Python
run: |
${{ matrix.package_manager }} install -y ${{ matrix.python_package }}
- name: Install WasmEdge latest release
run: |
${{ matrix.python2_ex }} utils/install.py -D
${{ matrix.python3_ex }} utils/install.py -D
- name: Uninstall WasmEdge
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge latest release with all extensions
run: |
${{ matrix.python2_ex }} utils/install.py -e all -D
${{ matrix.python3_ex }} utils/install.py -e all -D
- name: Uninstall WasmEdge with all extensions
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge specific release (0.10.0)
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
${{ matrix.python2_ex }} utils/install.py -v 0.10.0 -D
${{ matrix.python3_ex }} utils/install.py -v 0.10.0 -D
- name: Uninstall WasmEdge
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge deprecated release (0.9.0) - Fail purposefully
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
${{ matrix.python2_ex }} utils/install.py -v 0.9.0 -D 2>&1 | grep -q "Version not supported. Min Version: 0.10.0" && echo "Pass: Version not supported. Min Version: 0.10.0 found" \
|| (echo "Failed: Version not supported. Min Version: 0.10.0 not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.9.0 -D 2>&1 | grep -q "Version not supported. Min Version: 0.10.0" && echo "Pass: Version not supported. Min Version: 0.10.0 found" \
|| (echo "Failed: Version not supported. Min Version: 0.10.0 not found" && exit 1)
- name: Install WasmEdge specific release (0.10.0) with all extensions
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
${{ matrix.python2_ex }} utils/install.py -e all -v 0.10.0 -D
${{ matrix.python3_ex }} utils/install.py -e all -v 0.10.0 -D
- name: Install WasmEdge with all extensions compatible with min version for all platforms
run: |
${{ matrix.python2_ex }} utils/install.py -e all --version=0.10.1-alpha.1 -D
${{ matrix.python3_ex }} utils/install.py -e all --version=0.10.1-alpha.1 -D
- name: Uninstall WasmEdge with all extensions
run: |
bash utils/uninstall.sh -q -V
- name: Install versions multiple times
run: |
${{ matrix.python2_ex }} utils/install.py -e all -D
${{ matrix.python2_ex }} utils/install.py -e all -v 0.10.1-alpha.1 -D
${{ matrix.python2_ex }} utils/install.py -e all -v 0.10.0 -D
${{ matrix.python3_ex }} utils/install.py -e all -D
- name: Uninstall WasmEdge
run: |
bash utils/uninstall.sh -q -V
- name: Uninstall WasmEdge and Source Line removal check
run: |
${{ matrix.python2_ex }} utils/install.py && bash utils/uninstall.sh -q
if echo >> ~/.bashrc && grep -qE ".wasmedge/env" ~/.bashrc; then echo "Failed: Source Lines found" && cat ~/.bashrc && exit 1;else echo "Pass: Source Lines Removed"; fi;
if echo >> ~/.bash_profile && grep -qE ".wasmedge/env" ~/.bash_profile; then echo "Failed: Source Lines found" && cat ~/.bash_profile && exit 1;else echo "Pass: Source Lines Removed"; fi;
if echo >> ~/.profile && grep -qE ".wasmedge/env" ~/.profile; then echo "Failed: Source Lines found" && cat ~/.profile && exit 1;else echo "Pass: Source Lines Removed"; fi;
${{ matrix.python3_ex }} utils/install.py && bash utils/uninstall.sh -q
if echo >> ~/.bashrc && grep -qE ".wasmedge/env" ~/.bashrc; then echo "Failed: Source Lines found" && cat ~/.bashrc && exit 1;else echo "Pass: Source Lines Removed"; fi;
if echo >> ~/.bash_profile && grep -qE ".wasmedge/env" ~/.bash_profile; then echo "Failed: Source Lines found" && cat ~/.bash_profile && exit 1;else echo "Pass: Source Lines Removed"; fi;
if echo >> ~/.profile && grep -qE ".wasmedge/env" ~/.profile; then echo "Failed: Source Lines found" && cat ~/.profile && exit 1;else echo "Pass: Source Lines Removed"; fi;
- name: Plugins Install check
run: |
${{ matrix.python2_ex }} utils/install.py -v 0.10.0-alpha.1
ls ~/.wasmedge/plugin/ | grep .so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.13.0 --plugins wasmedge_tensorflowlite
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasmEdgeTensorflowLite.so && echo "Pass: Plugins found" || (echo "Fail: Wasmedge Tensorflowlite Plugin not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.13.0 --plugins wasmedge_tensorflow
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasmEdgeTensorflow.so && echo "Pass: Plugins found" || (echo "Fail: Wasmedge Tensorflowlite Plugin not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.10.0-alpha.1 -p ~/new_wasmedge
ls ~/new_wasmedge/plugin/ | grep .so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.10.0-alpha.1 -p /usr
ls /usr/lib/wasmedge/ | grep libwasmedgePluginWasmEdgeProcess.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.0-alpha.1
ls ~/.wasmedge/plugin/ | grep .so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.13.0 --plugins wasmedge_tensorflowlite
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasmEdgeTensorflowLite.so && echo "Pass: Plugins found" || (echo "Fail: Wasmedge Tensorflowlite Plugin not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.13.0 --plugins wasmedge_tensorflow
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasmEdgeTensorflow.so && echo "Pass: Plugins found" || (echo "Fail: Wasmedge Tensorflowlite Plugin not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.0-alpha.1 -p ~/new_wasmedge
ls ~/new_wasmedge/plugin/ | grep .so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.0-alpha.1 -p /usr
ls /usr/lib/wasmedge/ | grep libwasmedgePluginWasmEdgeProcess.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
- name: Externally Specified plugin install check (single)(Ubuntu)
if: ${{ matrix.name == 'Ubuntu 20.04' }}
run: |
# Single plugin download
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-alpha.1 --plugins wasi_nn-openvino -D
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-alpha.1 -p ~/new_wasmedge --plugins wasi_nn-openvino -D
ls ~/new_wasmedge/plugin/ | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-alpha.1 -p /usr --plugins wasi_nn-openvino -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-alpha.1 --plugins wasi_nn-openvino -D
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-alpha.1 -p ~/new_wasmedge --plugins wasi_nn-openvino -D
ls ~/new_wasmedge/plugin/ | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-alpha.1 -p /usr --plugins wasi_nn-openvino -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
- name: Externally Specified plugin install check (single)(Ubuntu) - WASI-NN GGML (>= 0.13.4)
if: ${{ matrix.name == 'Ubuntu 20.04' }}
run: |
# Single plugin download
${{ matrix.python2_ex }} utils/install.py -v 0.13.4 --plugins wasi_nn-ggml -D
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.13.4 -p ~/new_wasmedge --plugins wasi_nn-ggml -D
ls ~/new_wasmedge/plugin/ | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.13.4 -p /usr --plugins wasi_nn-ggml -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.13.4 --plugins wasi_nn-ggml -D
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.13.4 -p ~/new_wasmedge --plugins wasi_nn-ggml -D
ls ~/new_wasmedge/plugin/ | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.13.4 -p /usr --plugins wasi_nn-ggml -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep libwasmedgePluginWasiNN.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
- name: Externally Specified plugins install check (wrong name)(Ubuntu)
if: ${{ matrix.name == 'Ubuntu 20.04' }}
run: |
# Unknown plugin
${{ matrix.python2_ex }} utils/install.py --plugins unknown_plugin_name_on_purpose unknown_plugin_name_on_purpose -D
(ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasiCrypto.so && echo "Fail: Plugins found" && exit 1) || (echo "Pass: Plugins not found")
${{ matrix.python3_ex }} utils/install.py --plugins unknown_plugin_name_on_purpose -D
(ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasiCrypto.so && echo "Fail: Plugins found" && exit 1) || (echo "Pass: Plugins not found")
- name: Check if distro-specific downloads are selected(Ubuntu)
if: ${{ matrix.name == 'Ubuntu 20.04' }}
run: |
${{ matrix.python2_ex }} utils/install.py -e tensorflow -D 2>&1 | grep -q "DEBUG - Downloading dist package: ubuntu20.04_x86_64.tar.gz" && echo "Pass: Ubuntu Package selected for tensorflow" || (echo "Fail: Ubuntu Package not selected for tensorflow" && exit 1)
${{ matrix.python3_ex }} utils/install.py -e tensorflow -D 2>&1 | grep -q "DEBUG - Downloading dist package: ubuntu20.04_x86_64.tar.gz" && echo "Pass: Ubuntu Package selected for tensorflow" || (echo "Fail: Ubuntu Package not selected for tensorflow" && exit 1)
${{ matrix.python2_ex }} utils/install.py -e image -D -v 0.12.0 2>&1 | grep -q "DEBUG - Downloading dist package: ubuntu20.04_x86_64.tar.gz" && echo "Pass: Ubuntu Package selected for image" || (echo "Fail: Ubuntu Package not selected for image" && exit 1)
${{ matrix.python3_ex }} utils/install.py -e image -D -v 0.12.0 2>&1 | grep -q "DEBUG - Downloading dist package: ubuntu20.04_x86_64.tar.gz" && echo "Pass: Ubuntu Package selected for image" || (echo "Fail: Ubuntu Package not selected for image" && exit 1)
- name: Check if distro-specific downloads are selected(Non-Ubuntu)
if: ${{ matrix.name != 'Ubuntu 20.04' }}
run: |
${{ matrix.python2_ex }} utils/install.py -e tensorflow -D 2>&1 | grep -q "DEBUG - Downloading dist package: ubuntu20.04_x86_64.tar.gz" && (echo "Fail: Ubuntu Package selected for tensorflow" && exit 1) || (echo "Pass: Ubuntu Package not selected for tensorflow")
${{ matrix.python3_ex }} utils/install.py -e tensorflow -D 2>&1 | grep -q "DEBUG - Downloading dist package: ubuntu20.04_x86_64.tar.gz" && (echo "Fail: Ubuntu Package selected for tensorflow" && exit 1) || (echo "Pass: Ubuntu Package not selected for tensorflow")
${{ matrix.python2_ex }} utils/install.py -e image -D -v 0.12.0 2>&1 | grep -q "DEBUG - Downloading dist package: ubuntu20.04_x86_64.tar.gz" && (echo "Fail: Ubuntu Package selected for image" && exit 1) || (echo "Pass: Ubuntu Package not selected for image")
${{ matrix.python3_ex }} utils/install.py -e image -D -v 0.12.0 2>&1 | grep -q "DEBUG - Downloading dist package: ubuntu20.04_x86_64.tar.gz" && (echo "Fail: Ubuntu Package selected for image" && exit 1) || (echo "Pass: Ubuntu Package not selected for image")
- name: Externally Specified plugin install check (single)(Non Ubuntu)
if: ${{ matrix.name != 'manylinux2014 aarch64' }}
run: |
# Single plugin download
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-rc.1 --plugins wasi_crypto -D
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-rc.1 -p ~/new_wasmedge --plugins wasi_crypto -D
ls ~/new_wasmedge/plugin/ | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python2_ex }} utils/install.py -v 0.10.1-rc.1 -p /usr --plugins wasi_crypto -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-rc.1 --plugins wasi_crypto -D
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-rc.1 -p ~/new_wasmedge --plugins wasi_crypto -D
ls ~/new_wasmedge/plugin/ | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
${{ matrix.python3_ex }} utils/install.py -v 0.10.1-rc.1 -p /usr --plugins wasi_crypto -D
(ls /usr/lib/wasmedge/; ls /usr/lib/wasmedge/;)2>&1 | grep libwasmedgePluginWasiCrypto.so && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
- name: Install multiple versions and Tensorflow extension/plugins for pre and post 0.13.x
run: |
${{ matrix.python3_ex }} utils/install.py -e tensorflow -D 2>&1 -v 0.12.0
${{ matrix.python3_ex }} utils/install.py -e tensorflow -D 2>&1 -v 0.13.0
${{ matrix.python3_ex }} utils/install.py -e tensorflow -D 2>&1
${{ matrix.python2_ex }} utils/install.py -e tensorflow -D 2>&1 -v 0.12.0
${{ matrix.python2_ex }} utils/install.py -e tensorflow -D 2>&1 -v 0.13.0
${{ matrix.python2_ex }} utils/install.py -e tensorflow -D 2>&1
- name: Install multiple versions and Image extension/plugins for pre and post 0.13.x
run: |
${{ matrix.python3_ex }} utils/install.py -e image -D 2>&1 -v 0.12.0
${{ matrix.python3_ex }} utils/install.py -e image -D 2>&1 -v 0.13.0
${{ matrix.python3_ex }} utils/install.py -e image -D 2>&1
${{ matrix.python2_ex }} utils/install.py -e image -D 2>&1 -v 0.12.0
${{ matrix.python2_ex }} utils/install.py -e image -D 2>&1 -v 0.13.0
${{ matrix.python2_ex }} utils/install.py -e image -D 2>&1
- name: Check for differences in the installation
run: |
PYTHON_EXECUTABLE=${{ matrix.python3_ex }} bash utils/installer_changes.sh "$HOME"/.wasmedge
PYTHON_EXECUTABLE=${{ matrix.python3_ex }} bash utils/installer_changes.sh "$HOME"/new_folder
PYTHON_EXECUTABLE=${{ matrix.python3_ex }} bash utils/installer_changes.sh /usr/local
PYTHON_EXECUTABLE=${{ matrix.python3_ex }} bash utils/installer_changes.sh /usr
PYTHON_EXECUTABLE=${{ matrix.python3_ex }} bash utils/installer_changes.sh "$HOME"/.wasmedge "-e all" "-v 0.12.1"
PYTHON_EXECUTABLE=${{ matrix.python3_ex }} bash utils/installer_changes.sh "$HOME"/new_folder "-e all" "-v 0.12.1"
PYTHON_EXECUTABLE=${{ matrix.python3_ex }} bash utils/installer_changes.sh /usr/local "-e all" "-v 0.12.1"
PYTHON_EXECUTABLE=${{ matrix.python3_ex }} bash utils/installer_changes.sh /usr "-e all" "-v 0.12.1"
- name: Latest Release Check
run: |
_res_git_=$(git ls-remote --refs --tags "https://github.com/WasmEdge/WasmEdge.git" | cut -d '/' -f 3 | awk '{ if ($1 ~ /-/) print; else print $0"_" ; }' | sort --version-sort | sed 's/_$//' | grep -e '^[0-9]\+.[0-9]\+.[0-9]\+$' | tail -1)
_res_curl_=$(curl -w "%{url_effective}\n" -I -L -s -S https://github.com/WasmEdge/WasmEdge/releases/latest -o /dev/null | grep -Eo '[0-9]+.[0-9]+.[0-9]+*')
[ "$_res_git_" = "$_res_curl_" ] && echo "Pass: Fetched version equals release" ||
(echo "Fail: Fetched version does not equal GitHub Ref: Fetched:$_res_git_ CI:$_res_curl_" && exit 1)
macos:
strategy:
fail-fast: false
matrix:
include:
- name: MacOS-latest
host_runner: macos-latest
package_manager: brew
- name: MacOS-arm64
host_runner: mac-arm64
package_manager: brew
name: ${{ matrix.name }}
runs-on: ${{ matrix.host_runner }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install python
run: |
eval $(/opt/homebrew/bin/brew shellenv)
${{ matrix.package_manager }} install python
- name: Install WasmEdge latest release
run: |
python3 utils/install.py -D
- name: Uninstall WasmEdge
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge latest release with all extensions
if: ${{ matrix.name != 'MacOS-arm64' }}
run: |
python3 utils/install.py -e all -D
- name: Uninstall WasmEdge with all extensions
if: ${{ matrix.name != 'MacOS-arm64' }}
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge specific release (0.10.0)
run: |
python3 utils/install.py -v 0.10.0 -D
- name: Uninstall WasmEdge
run: |
bash utils/uninstall.sh -q -V
- name: Install WasmEdge deprecated release (0.9.0) - Fails purposefully
run: |
python3 utils/install.py -v 0.9.0 -D 2>&1 | grep -q "Version not supported. Min Version: 0.10.0" && echo "Pass: Version not supported. Min Version: 0.10.0 found" \
|| (echo "Failed: Version not supported. Min Version: 0.10.0 message not found" && exit 1)
- name: Install WasmEdge specific release (0.10.0) with all extensions
if: ${{ matrix.name != 'MacOS-arm64' }}
run: |
python3 utils/install.py -e all -v 0.10.0 -D
- name: Uninstall WasmEdge with all extensions
if: ${{ matrix.name != 'MacOS-arm64' }}
run: |
bash utils/uninstall.sh -q -V
- name: Plugins Install check MacOS-x86
if: ${{ matrix.name != 'MacOS-arm64' }}
run: |
python3 utils/install.py -v 0.10.0-alpha.1
ls ~/.wasmedge/plugin/ | grep .dylib && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
python3 utils/install.py -v 0.13.1 --plugins wasmedge_tensorflow
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasmEdgeTensorflow.dylib && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
python3 utils/install.py -v 0.13.1 --plugins wasmedge_tensorflowlite
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasmEdgeTensorflowLite.dylib && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
python3 utils/install.py -v 0.10.0-alpha.1 -p ~/new_wasmedge
ls ~/new_wasmedge/plugin/ | grep .dylib && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
# MacOS container does not have access for /usr directory
# python3 utils/install.py -v 0.10.0-alpha.1 -p /usr
# ls /usr/lib/wasmedge/ | grep libwasmedgePluginWasmEdgeProcess.dylib && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
- name: Plugins Install check MacOS-arm64
if: ${{ matrix.name == 'MacOS-arm64' }}
run: |
python3 utils/install.py -v 0.13.1 --plugins wasmedge_tensorflow
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasmEdgeTensorflow.dylib && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
python3 utils/install.py -v 0.13.1 --plugins wasmedge_tensorflowlite
ls ~/.wasmedge/plugin/ | grep libwasmedgePluginWasmEdgeTensorflowLite.dylib && echo "Pass: Plugins found" || (echo "Fail: Plugins not found" && exit 1)
- name: Install multiple versions and Tensorflow extension/plugins for pre and post 0.13.x
if: ${{ matrix.name != 'MacOS-arm64' }}
run: |
python3 utils/install.py -e tensorflow -D 2>&1 -v 0.12.0
python3 utils/install.py --plugins wasmedge_tensorflow -D 2>&1 -v 0.13.1
python3 utils/install.py --plugins wasmedge_tensorflow -D 2>&1
- name: Install multiple versions and Tensorflow extension/plugins for pre and post 0.13.x
if: ${{ matrix.name == 'MacOS-arm64' }}
run: |
python3 utils/install.py --plugins wasmedge_tensorflow -D 2>&1 -v 0.13.1
python3 utils/install.py --plugins wasmedge_tensorflow -D 2>&1
- name: Install multiple versions and Image extension/plugins for pre and post 0.13.x
if: ${{ matrix.name != 'MacOS-arm64' }}
run: |
python3 utils/install.py -e image -D 2>&1 -v 0.12.0
python3 utils/install.py --plugins wasmedge_image -D 2>&1 -v 0.13.1
python3 utils/install.py --plugins wasmedge_image -D 2>&1
- name: Install multiple versions and Image extension/plugins for pre and post 0.13.x
if: ${{ matrix.name == 'MacOS-arm64' }}
run: |
python3 utils/install.py --plugins wasmedge_image -D 2>&1 -v 0.13.1
python3 utils/install.py --plugins wasmedge_image -D 2>&1
- name: Check for differences in the installation
if: ${{ matrix.name == 'MacOS-arm64' }}
run: |
bash utils/installer_changes.sh $HOME/.wasmedge
bash utils/installer_changes.sh $HOME/new_folder
- name: Check for differences in the installation
if: ${{ matrix.name != 'MacOS-arm64' }}
run: |
PYTHON_EXECUTABLE=python3 bash utils/installer_changes.sh "$HOME"/.wasmedge
PYTHON_EXECUTABLE=python3 bash utils/installer_changes.sh "$HOME"/new_folder
PYTHON_EXECUTABLE=python3 bash utils/installer_changes.sh /usr/local
PYTHON_EXECUTABLE=python3 bash utils/installer_changes.sh /usr
PYTHON_EXECUTABLE=python3 bash utils/installer_changes.sh "$HOME"/.wasmedge "-e all" "-v 0.12.1"
PYTHON_EXECUTABLE=python3 bash utils/installer_changes.sh "$HOME"/new_folder "-e all" "-v 0.12.1"
PYTHON_EXECUTABLE=python3 bash utils/installer_changes.sh /usr/local "-e all" "-v 0.12.1"
PYTHON_EXECUTABLE=python3 bash utils/installer_changes.sh /usr "-e all" "-v 0.12.1"
- name: Latest Release Check
run: |
_res_git_=$(git ls-remote --refs --tags "https://github.com/WasmEdge/WasmEdge.git" | cut -d '/' -f 3 | awk '{ if ($1 ~ /-/) print; else print $0"_" ; }' | sort --version-sort | sed 's/_$//' | grep -e '^[0-9]\+.[0-9]\+.[0-9]\+$' | tail -1)
_res_curl_=$(curl -w "%{url_effective}\n" -I -L -s -S https://github.com/WasmEdge/WasmEdge/releases/latest -o /dev/null | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
[ "$_res_git_" = "$_res_curl_" ] && echo "Pass: Fetched version equals release" ||
(echo "Fail: Fetched version does not equal GitHub Ref: Fetched:$_res_git_ CI:$_res_curl_" && exit 1)