forked from WasmEdge/WasmEdge
-
Notifications
You must be signed in to change notification settings - Fork 0
490 lines (473 loc) · 21.8 KB
/
build-extensions.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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
name: Test WasmEdge extensions
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
paths:
- ".github/workflows/build-extensions.yml"
- ".github/actions/expand-variables/**"
- ".github/workflows/reusable-build-extensions**"
- ".github/workflows/reusable-call-linter.yml"
- "plugins/**"
- "test/**"
- "thirdparty/**"
- "tools/**"
- "CMakeLists.txt"
- "cmake/**"
- "utils/wasi-nn/**"
- "utils/wasi-crypto/**"
pull_request:
branches:
- master
- "proposal/**"
paths:
- ".github/workflows/build-extensions.yml"
- ".github/actions/expand-variables/**"
- ".github/workflows/reusable-build-extensions**"
- ".github/workflows/reusable-call-linter.yml"
- "plugins/**"
- "test/**"
- "thirdparty/**"
- "tools/**"
- "CMakeLists.txt"
- "cmake/**"
- "utils/wasi-nn/**"
- "utils/wasi-crypto/**"
permissions:
contents: read
jobs:
# TODO: Refactor `lint` with `on.workflow_run`
# https://docs.github.com/en/actions/using-workflows/triggering-a-workflow
lint:
uses: ./.github/workflows/reusable-call-linter.yml
get_version:
name: Retrieve version information
needs: lint
runs-on: ubuntu-latest
outputs:
version: ${{ steps.prep.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ensure git safe directory
run: |
git config --global --add safe.directory $(pwd)
- name: Get version
id: prep
run: |
# Retrieve annotated tags. Details: https://github.com/actions/checkout/issues/290
git fetch --tags --force
echo "Set version: $(git describe --match "[0-9].[0-9]*" --tag)"
echo "version=$(git describe --match '[0-9].[0-9]*' --tag)" >> $GITHUB_OUTPUT
# Due to the dependencies and exclusions of WASI-NN, build them saperately.
build_ubuntu_wasi_nn:
permissions:
contents: write
strategy:
matrix:
include:
- name: Plugins_g++
compiler: g++
docker_tag: ubuntu-build-gcc
build_type: Release
- name: Plugins_clang++
compiler: clang++
docker_tag: ubuntu-build-clang
build_type: Release
name: WASI-NN (Ubuntu, ${{ matrix.compiler }}, ${{ matrix.build_type }})
runs-on: ubuntu-latest
env:
output_dir: build/plugins/wasi_nn
test_dir: build/test/plugins/wasi_nn
build_options: -DWASMEDGE_PLUGIN_WASI_NN_BACKEND=PyTorch -DWASMEDGE_PLUGIN_WASI_NN_BACKEND=OpenVINO -DWASMEDGE_PLUGIN_WASI_NN_BACKEND=TensorFlowLite -DWASMEDGE_PLUGIN_WASI_NN_BACKEND=GGML
tar_names: wasi_nn-pytorch wasi_nn-openvino wasi_nn-tensorflowlite wasi_nn-ggml
test_bin: wasiNNTests
output_bin: libwasmedgePluginWasiNN.so
OPENVINO_VERSION: "2023.0.2"
OPENVINO_YEAR: "2023"
PYTORCH_VERSION: "1.8.2"
PYTORCH_INSTALL_TO: "."
needs: [ get_version ]
container:
image: wasmedge/wasmedge:${{ matrix.docker_tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ensure git safe directory
run: |
git config --global --add safe.directory $(pwd)
- name: Install dependencies
shell: bash
run: |
apt update
apt install -y unzip libopenblas-dev pkg-config protobuf-compiler-grpc libgrpc-dev libgrpc++-dev
bash utils/wasi-nn/install-openvino.sh
bash utils/wasi-nn/install-pytorch.sh
- name: Build and test WASI-NN using ${{ matrix.compiler }} with ${{ matrix.build_type }} mode
shell: bash
run: |
export Torch_DIR=$(pwd)/${PYTORCH_INSTALL_TO}/libtorch
ldconfig
plugin_array=(${tar_names})
option_array=(${build_options})
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DWASMEDGE_BUILD_TESTS=ON -DWASMEDGE_USE_LLVM=OFF -DWASMEDGE_BUILD_TOOLS=OFF
for (( i=0; i<${#plugin_array[@]}; i++ ));
do
echo "Building ${plugin_array[$i]} backend:"
cmake -Bbuild -GNinja ${option_array[$i]}
cmake --build build --target ${test_bin}
echo "Testing ${plugin_array[$i]} backend:"
cd ${test_dir}
./${test_bin}
cd -
echo "Copying ${plugin_array[$i]} backend:"
cp -f ${output_dir}/${output_bin} ${output_bin}
tar -zcvf plugin_${plugin_array[$i]}.tar.gz ${output_bin}
done
- name: Test WASI-NN RPC mode with GGML
shell: bash
run: |
set -eux
# wasi_nn_rpcserver is built in a clean "build2" dir
cmake -Bbuild2 -GNinja
cmake --build build2
export WASI_NN_RPC_TEST_URI=unix:///tmp/wasi_nn_rpc.sock
WASMEDGE_PLUGIN_PATH=build/plugins/wasi_nn build2/tools/wasmedge/wasi_nn_rpcserver \
--nn-rpc-uri=$WASI_NN_RPC_TEST_URI \
--nn-preload=default:GGML:AUTO:build/test/plugins/wasi_nn/wasinn_ggml_fixtures/orca_mini.gguf &
sleep 3
cd ${test_dir}
# The test binary consumes $WASI_NN_RPC_TEST_URI
./${test_bin} --gtest_filter=WasiNNTest.GGMLBackendWithRPC
- name: Upload artifact - wasi_nn-pytorch
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasi_nn-pytorch-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasi_nn-pytorch.tar.gz
- name: Upload artifact - wasi_nn-openvino
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasi_nn-openvino-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasi_nn-openvino.tar.gz
- name: Upload artifact - wasi_nn-tensorflowlite
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasi_nn-tensorflowlite-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasi_nn-tensorflowlite.tar.gz
- name: Upload artifact - wasi_nn-ggml
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasi_nn-ggml-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasi_nn-ggml.tar.gz
build_windows_wasi_nn:
permissions:
contents: write
name: WASI-NN (Windows Server 2022)
runs-on: windows-2022
env:
output_dir: build/plugins/wasi_nn
test_dir: build/test/plugins/wasi_nn
build_options: -DWASMEDGE_PLUGIN_WASI_NN_BACKEND=GGML
tar_names: wasi_nn-ggml
test_bin: wasiNNTests
output_bin: wasmedgePluginWasiNN.dll
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ensure git safe directory
run: |
git config --global --add safe.directory $(pwd)
- name: Install dependency
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install cmake ninja vswhere
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: 19041
- name: Build WasmEdge
run: |
$vsPath = (vswhere -latest -property installationPath)
Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.19041.0"
$llvm = "LLVM-16.0.6-win64-MultiThreadedDLL.zip"
curl -sLO https://github.com/WasmEdge/llvm-windows/releases/download/llvmorg-16.0.6/LLVM-16.0.6-win64-MultiThreadedDLL.zip -o $llvm
Expand-Archive -Path $llvm
$llvm_dir = "$pwd\\LLVM-16.0.6-win64-MultiThreadedDLL\\LLVM-16.0.6-win64\\lib\\cmake\\llvm"
$cmake_sys_version = "10.0.19041.0"
cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_version" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL "-DLLVM_DIR=$llvm_dir" -DWASMEDGE_BUILD_TESTS=ON -DWASMEDGE_USE_LLVM=OFF -DWASMEDGE_BUILD_TOOLS=OFF
Write-Output "Building $Env:tar_names backend:"
cmake -Bbuild -GNinja "$Env:build_options"
cmake --build build --target "$Env:test_bin"
$Env:PATH += ";$pwd\\build\\lib\\api"
Write-Output "Testing $Env:tar_names backend:"
cmake -E chdir "$Env:test_dir" "$Env:test_bin"
Write-Output "Copying $Env:tar_names backend:"
Copy-Item "$Env:output_dir/$Env:output_bin" -Destination "./$Env:output_bin"
Write-Output "Compress-Archive -Path $Env:output_bin -DestinationPath plugin_${Env:tar_names}.zip -CompressionLevel Optimal"
Compress-Archive -Path "$Env:output_bin" -DestinationPath "plugin_${Env:tar_names}.zip" -CompressionLevel Optimal
ls "plugin_${Env:tar_names}.zip"
- name: Upload artifact - wasi_nn-ggml
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasi_nn-ggml-${{ needs.get_version.outputs.version }}-windows.zip
path: plugin_wasi_nn-ggml.zip
build_ubuntu:
permissions:
contents: write
strategy:
matrix:
include:
- name: Plugins_g++
compiler: g++
docker_tag: ubuntu-build-gcc-plugins-deps
build_type: Release
- name: Plugins_clang++
compiler: clang++
docker_tag: ubuntu-build-clang-plugins-deps
build_type: Release
name: Plugins (Ubuntu, ${{ matrix.compiler }}, ${{ matrix.build_type }})
runs-on: ubuntu-latest
env:
output_prefix: build/plugins
test_prefix: build/test/plugins
build_options: -DWASMEDGE_PLUGIN_WASI_CRYPTO=ON -DWASMEDGE_PLUGIN_WASI_LOGGING=ON -DWASMEDGE_PLUGIN_PROCESS=ON -DWASMEDGE_PLUGIN_TENSORFLOW=ON -DWASMEDGE_PLUGIN_TENSORFLOWLITE=ON -DWASMEDGE_PLUGIN_IMAGE=ON -DWASMEDGE_PLUGIN_WASM_BPF=ON -DWASMEDGE_PLUGIN_OPENCVMINI=ON -DWASMEDGE_PLUGIN_ZLIB=ON -DWASMEDGE_PLUGIN_FFMPEG=ON
tar_names: wasi_crypto wasi_logging wasmedge_process wasmedge_tensorflow wasmedge_tensorflowlite wasmedge_image wasm_bpf wasmedge_opencvmini wasmedge_zlib wasmedge_ffmpeg
test_bins: wasiCryptoTests wasiLoggingTests wasmedgeProcessTests wasmedgeTensorflowTests wasmedgeTensorflowLiteTests wasmedgeImageTests wasmBpfTests wasmedgeOpencvminiTests wasmedgeZlibTests wasmedgeFFmpegTests
output_bins: libwasmedgePluginWasiCrypto.so libwasmedgePluginWasiLogging.so libwasmedgePluginWasmEdgeProcess.so libwasmedgePluginWasmEdgeTensorflow.so libwasmedgePluginWasmEdgeTensorflowLite.so libwasmedgePluginWasmEdgeImage.so libwasmedgePluginWasmBpf.so libwasmedgePluginWasmEdgeOpenCVMini.so libwasmedgePluginWasmEdgeZlib.so libwasmedgePluginWasmEdgeFFmpeg.so
needs: [ get_version ]
container:
image: wasmedge/wasmedge:${{ matrix.docker_tag }}
# Required for mounting debugfs
# Tests of wasm_bpf also require privileges
options: --privileged
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
apt update
apt install -y libssl-dev
apt install -y libelf-dev zlib1g-dev pkg-config
apt install -y clang-15
apt install -y cargo
apt install -y yasm
# Running tests of wasm_bpf requires proper ebpf running environment
mount -t debugfs none /sys/kernel/debug
bash utils/ffmpeg/install-ffmpeg-v6.0.sh
- name: Build plugins using ${{ matrix.compiler }} with ${{ matrix.build_type }} mode
shell: bash
run: |
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100
update-alternatives --install /usr/bin/llvm-strip llvm-strip /usr/bin/llvm-strip-15 100
testbin_array=(${test_bins})
export PKG_CONFIG_PATH=$(pwd)/FFmpeg-n6.0/output/lib/pkgconfig
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DWASMEDGE_BUILD_TESTS=ON -DWASMEDGE_USE_LLVM=OFF -DWASMEDGE_BUILD_TOOLS=OFF ${build_options}
for (( i=0; i<${#testbin_array[@]}; i++ ));
do
echo "Building ${testbin_array[$i]} :"
cmake --build build --target ${testbin_array[$i]}
done
- name: Test plugins
shell: bash
run: |
export LD_LIBRARY_PATH=$(pwd)/FFmpeg-n6.0/output/lib:$LD_LIBRARY_PATH
plugin_array=(${tar_names})
testbin_array=(${test_bins})
for (( i=0; i<${#plugin_array[@]}; i++ ));
do
echo "Testing ${plugin_array[$i]} :"
cd ${test_prefix}/${plugin_array[$i]}
./${testbin_array[$i]}
cd -
done
- name: Prepare the plugins tar.gz package
shell: bash
run: |
plugin_array=(${tar_names})
outbin_array=(${output_bins})
for (( i=0; i<${#plugin_array[@]}; i++ ));
do
echo "Copying ${plugin_array[$i]} :"
cp ${output_prefix}/${plugin_array[$i]}/${outbin_array[$i]} ${outbin_array[$i]}
tar -zcvf plugin_${plugin_array[$i]}.tar.gz ${outbin_array[$i]}
done
- name: Upload artifact - wasi_crypto
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasi_crypto-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasi_crypto.tar.gz
- name: Upload artifact - wasi_logging
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasi_logging-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasi_logging.tar.gz
- name: Upload artifact - wasmedge_process
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_process-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasmedge_process.tar.gz
- name: Upload artifact - wasmedge_tensorflow
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_tensorflow-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasmedge_tensorflow.tar.gz
- name: Upload artifact - wasmedge_tensorflowlite
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_tensorflowlite-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasmedge_tensorflowlite.tar.gz
- name: Upload artifact - wasmedge_image
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_image-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasmedge_image.tar.gz
- name: Upload artifact - wasm_bpf
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasm_bpf-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasm_bpf.tar.gz
- name: Upload artifact - wasmedge_opencvmini
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_opencvmini-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasmedge_opencvmini.tar.gz
- name: Upload artifact - wasmedge_zlib
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_zlib-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasmedge_zlib.tar.gz
- name: Upload artifact - wasmedge_ffmpeg
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_ffmpeg-${{ needs.get_version.outputs.version }}-ubuntu22.04-${{ matrix.compiler }}.tar.gz
path: plugin_wasmedge_ffmpeg.tar.gz
build_manylinux:
permissions:
contents: write
name: manylinux, g++, Release
needs: get_version
uses: ./.github/workflows/reusable-build-extensions.yml
with:
version: ${{ needs.get_version.outputs.version }}
build_macos:
permissions:
contents: write
strategy:
matrix:
include:
- name: Plugins_MacOS_12
system: MacOS 12
host_runner: macos-12
darwin_version: darwin_21
build_type: Release
arch: x86_64
- name: Plugins_MacOS_arm64
system: MacOS 14 (arm64)
host_runner: macos-14
darwin_version: darwin_22
build_type: Release
arch: arm64
name: Plugins (${{ matrix.system }}, clang++, ${{ matrix.build_type }})
runs-on: ${{ matrix.host_runner }}
env:
output_prefix: build/plugins
test_prefix: build/test/plugins
build_options: -DWASMEDGE_PLUGIN_WASI_CRYPTO=ON -DWASMEDGE_PLUGIN_WASI_LOGGING=ON -DWASMEDGE_PLUGIN_TENSORFLOW=ON -DWASMEDGE_PLUGIN_TENSORFLOWLITE=ON -DWASMEDGE_PLUGIN_IMAGE=ON -DWASMEDGE_PLUGIN_OPENCVMINI=ON -DWASMEDGE_PLUGIN_FFMPEG=ON
tar_names: wasi_crypto wasi_logging wasmedge_tensorflow wasmedge_tensorflowlite wasmedge_image wasmedge_opencvmini wasmedge_ffmpeg
test_bins: wasiCryptoTests wasiLoggingTests wasmedgeTensorflowTests wasmedgeTensorflowLiteTests wasmedgeImageTests wasmedgeOpencvminiTests wasmedgeFFmpegTests
output_bins: libwasmedgePluginWasiCrypto.dylib libwasmedgePluginWasiLogging.dylib libwasmedgePluginWasmEdgeTensorflow.dylib libwasmedgePluginWasmEdgeTensorflowLite.dylib libwasmedgePluginWasmEdgeImage.dylib libwasmedgePluginWasmEdgeOpenCVMini.dylib libwasmedgePluginWasmEdgeFFmpeg.dylib
needs: [ get_version ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and install dependencies
run: |
eval $(/opt/homebrew/bin/brew shellenv)
brew install llvm@16 ninja cmake openssl opencv rust ffmpeg@6
- name: Build WasmEdge plugins using clang++ with ${{ matrix.build_type }} mode
shell: bash
run: |
eval $(/opt/homebrew/bin/brew shellenv)
testbin_array=(${test_bins})
export PKG_CONFIG_PATH="$(brew --prefix)/opt/ffmpeg@6/lib/pkgconfig:$PKG_CONFIG_PATH"
export LLVM_DIR="$(brew --prefix)/opt/llvm@16/lib/cmake"
export CC=clang
export CXX=clang++
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DWASMEDGE_BUILD_TESTS=ON -DWASMEDGE_USE_LLVM=OFF -DWASMEDGE_BUILD_TOOLS=OFF ${build_options} -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl
for (( i=0; i<${#testbin_array[@]}; i++ ));
do
echo "Building ${testbin_array[$i]} :"
cmake --build build --target ${testbin_array[$i]}
done
- name: Test WasmEdge plugins
shell: bash
run: |
eval $(/opt/homebrew/bin/brew shellenv)
plugin_array=(${tar_names})
testbin_array=(${test_bins})
for (( i=0; i<${#plugin_array[@]}; i++ ));
do
if [[ ${plugin_array[$i]} == "wasmedge_opencvmini" ]]; then
echo "Temporary disable ${plugin_array[$i]} testing"
continue
fi
echo "Testing ${plugin_array[$i]} :"
cd ${test_prefix}/${plugin_array[$i]}
./${testbin_array[$i]}
cd -
done
- name: Prepare the WasmEdge plugins tar.gz package
shell: bash
run: |
eval $(/opt/homebrew/bin/brew shellenv)
plugin_array=(${tar_names})
outbin_array=(${output_bins})
for (( i=0; i<${#plugin_array[@]}; i++ ));
do
echo "Copying ${plugin_array[$i]} :"
cp ${output_prefix}/${plugin_array[$i]}/${outbin_array[$i]} ${outbin_array[$i]}
tar -zcvf plugin_${plugin_array[$i]}.tar.gz ${outbin_array[$i]}
done
- name: Upload artifact - wasi_crypto
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasi_crypto-${{ needs.get_version.outputs.version }}-${{ matrix.darwin_version }}_${{ matrix.arch }}.tar.gz
path: plugin_wasi_crypto.tar.gz
- name: Upload artifact - wasi_logging
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasi_logging-${{ needs.get_version.outputs.version }}-${{ matrix.darwin_version }}_${{ matrix.arch }}.tar.gz
path: plugin_wasi_logging.tar.gz
- name: Upload artifact - wasmedge_tensorflow
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_tensorflow-${{ needs.get_version.outputs.version }}-${{ matrix.darwin_version }}_${{ matrix.arch }}.tar.gz
path: plugin_wasmedge_tensorflow.tar.gz
- name: Upload artifact - wasmedge_tensorflowlite
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_tensorflowlite-${{ needs.get_version.outputs.version }}-${{ matrix.darwin_version }}_${{ matrix.arch }}.tar.gz
path: plugin_wasmedge_tensorflowlite.tar.gz
- name: Upload artifact - wasmedge_image
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_image-${{ needs.get_version.outputs.version }}-${{ matrix.darwin_version }}_${{ matrix.arch }}.tar.gz
path: plugin_wasmedge_image.tar.gz
- name: Upload artifact - wasmedge_opencvmini
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_opencvmini-${{ needs.get_version.outputs.version }}-${{ matrix.darwin_version }}_${{ matrix.arch }}.tar.gz
path: plugin_wasmedge_opencvmini.tar.gz
- name: Upload artifact - wasmedge_ffmpeg
uses: actions/upload-artifact@v3
with:
name: WasmEdge-plugin-wasmedge_ffmpeg-${{ needs.get_version.outputs.version }}-${{ matrix.darwin_version }}_${{ matrix.arch }}.tar.gz
path: plugin_wasmedge_ffmpeg.tar.gz