Skip to content

Commit 717bb64

Browse files
authored
[CI] Enable daily run for each workflow (second-state#32)
* [CI] Enable PyTorch workflow Signed-off-by: hydai <z54981220@gmail.com> * [CI] change to the correct rust folder Signed-off-by: hydai <z54981220@gmail.com> * [CI] Use checkout@v3 Signed-off-by: hydai <z54981220@gmail.com> * [CI] change back to the pwd Signed-off-by: hydai <z54981220@gmail.com> * [Script] OpenVINO 2023 relies on libpython3.8 Signed-off-by: hydai <z54981220@gmail.com> * [CI] Refine the naming of the workflows Signed-off-by: hydai <z54981220@gmail.com> * [CI] Try to check the openvino versions Signed-off-by: hydai <z54981220@gmail.com> * [CI] Use openvino-2023.0.0 Signed-off-by: hydai <z54981220@gmail.com> * [CI] Make OpenVINO run daily Signed-off-by: hydai <z54981220@gmail.com> * [CI] Use openvino-2023.0.2 because WASI-NN OpenVINO plugin uses that version Signed-off-by: hydai <z54981220@gmail.com> --------- Signed-off-by: hydai <z54981220@gmail.com>
1 parent 3db57ce commit 717bb64

File tree

6 files changed

+108
-23
lines changed

6 files changed

+108
-23
lines changed

‎.github/workflows/build_openvino_mobilenet.yml‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
name: OpenVINO Mobilenet Example
22

33
on:
4+
schedule:
5+
- cron: "0 0 * * *"
46
push:
7+
branches: [master]
58
paths:
69
- ".github/workflows/build_openvino_mobilenet.yml"
710
- "openvino-mobilenet-raw/**"
811
- "openvino-mobilenet-image/**"
912
- "scripts/install_openvino.sh"
1013
pull_request:
1114
branches: [master]
12-
paths-ignore:
13-
- "**/*.md"
15+
paths:
16+
- ".github/workflows/build_openvino_mobilenet.yml"
17+
- "openvino-mobilenet-raw/**"
18+
- "openvino-mobilenet-image/**"
19+
- "scripts/install_openvino.sh"
1420

1521
env:
1622
CARGO_TERM_COLOR: always
@@ -50,14 +56,11 @@ jobs:
5056
CMAKE_BUILD_TYPE: "Release"
5157
VERSION: "0.13.4"
5258
run: |
53-
ldconfig
5459
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $VERSION -p /usr/local --plugins wasi_nn-openvino
55-
ldconfig
5660
5761
- name: Build and run openvino-mobilenet-raw
5862
working-directory: openvino-mobilenet-raw
5963
run: |
60-
ldconfig
6164
bash download_mobilenet.sh
6265
cd rust
6366
cargo build --target wasm32-wasi --release
@@ -67,7 +70,6 @@ jobs:
6770
- name: Build and run openvino-mobilenet-image
6871
working-directory: openvino-mobilenet-image
6972
run: |
70-
ldconfig
7173
bash download_mobilenet.sh
7274
cd rust
7375
cargo build --target wasm32-wasi --release

‎.github/workflows/build_openvino_road_seg_adas.yml‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
name: OpenVINO Road Segmentation ADAS Example
22

33
on:
4+
schedule:
5+
- cron: "0 0 * * *"
46
push:
7+
branches: [master]
58
paths:
69
- ".github/workflows/build_openvino_road_seg_adas.yml"
710
- "openvino-road-segmentation-adas/**"
811
- "scripts/install_openvino.sh"
912
pull_request:
1013
branches: [master]
11-
paths-ignore:
12-
- "**/*.md"
14+
paths:
15+
- ".github/workflows/build_openvino_road_seg_adas.yml"
16+
- "openvino-road-segmentation-adas/**"
17+
- "scripts/install_openvino.sh"
1318

1419
env:
1520
CARGO_TERM_COLOR: always
@@ -49,14 +54,11 @@ jobs:
4954
CMAKE_BUILD_TYPE: "Release"
5055
VERSION: "0.13.4"
5156
run: |
52-
ldconfig
5357
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $VERSION -p /usr/local --plugins wasi_nn-openvino
54-
ldconfig
5558
5659
- name: Build and run openvino-road-segmentation-adas
5760
working-directory: openvino-road-segmentation-adas
5861
run: |
59-
ldconfig
6062
cd openvino-road-seg-adas
6163
cargo build --target=wasm32-wasi --release
6264
cp target/wasm32-wasi/release/openvino-road-seg-adas.wasm ..

‎.github/workflows/llama.yml‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
name: Build and Test llama2 examples
1+
name: ggml llama2 examples
22

33
on:
4+
schedule:
5+
- cron: "0 0 * * *"
46
workflow_dispatch:
57
inputs:
68
logLevel:
@@ -9,32 +11,38 @@ on:
911
default: 'info'
1012
push:
1113
branches: [ '*' ]
14+
paths:
15+
- ".github/workflows/llama.yml"
16+
- "wasmedge-ggml-llama/**"
1217
pull_request:
1318
branches: [ '*' ]
19+
paths:
20+
- ".github/workflows/llama.yml"
21+
- "wasmedge-ggml-llama/**"
1422

1523
jobs:
1624
build:
1725

1826
runs-on: ubuntu-20.04
1927

2028
steps:
21-
- uses: actions/checkout@v2
22-
29+
- uses: actions/checkout@v3
30+
2331
- name: Install apt-get packages
2432
run: |
2533
sudo ACCEPT_EULA=Y apt-get update
2634
sudo ACCEPT_EULA=Y apt-get upgrade
2735
sudo apt-get install wget git curl software-properties-common build-essential
28-
36+
2937
- name: Install Rust target for wasm
3038
run: |
3139
rustup target add wasm32-wasi
32-
40+
3341
- name: Install WasmEdge + WASI-NN + GGML
3442
run: |
3543
VERSION=0.13.4
3644
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -v $VERSION --plugins wasi_nn-ggml -p /usr/local
37-
45+
3846
- name: Example
3947
run: |
4048
cd wasmedge-ggml-llama

‎.github/workflows/pytorch.yml‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: PyTorch examples
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
inputs:
8+
logLevel:
9+
description: 'Log level'
10+
required: true
11+
default: 'info'
12+
push:
13+
branches: [ '*' ]
14+
paths:
15+
- ".github/workflows/pytorch.yml"
16+
- "pytorch-mobilenet-image/**"
17+
pull_request:
18+
branches: [ '*' ]
19+
paths:
20+
- ".github/workflows/pytorch.yml"
21+
- "pytorch-mobilenet-image/**"
22+
23+
jobs:
24+
build:
25+
26+
runs-on: ubuntu-20.04
27+
28+
steps:
29+
- uses: actions/checkout@v3
30+
31+
- name: Install apt-get packages
32+
run: |
33+
sudo ACCEPT_EULA=Y apt-get update
34+
sudo ACCEPT_EULA=Y apt-get upgrade
35+
sudo apt-get install wget git curl software-properties-common build-essential
36+
37+
- name: Install Rust target for wasm
38+
run: |
39+
rustup target add wasm32-wasi
40+
41+
- name: Install WasmEdge + WASI-NN + PyTorch
42+
run: |
43+
VERSION=0.13.4
44+
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -v $VERSION --plugins wasi_nn-pytorch -p /usr/local
45+
export PYTORCH_VERSION="1.8.2"
46+
# For the Ubuntu 20.04 or above, use the libtorch with cxx11 abi.
47+
export PYTORCH_ABI="libtorch-cxx11-abi"
48+
curl -s -L -O --remote-name-all https://download.pytorch.org/libtorch/lts/1.8/cpu/${PYTORCH_ABI}-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip
49+
unzip -q "${PYTORCH_ABI}-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip"
50+
rm -f "${PYTORCH_ABI}-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip"
51+
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/libtorch/lib
52+
53+
- name: Example
54+
run: |
55+
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/libtorch/lib
56+
cd pytorch-mobilenet-image/rust
57+
cargo build --target wasm32-wasi --release
58+
cd ..
59+
wasmedge compile rust/target/wasm32-wasi/release/wasmedge-wasinn-example-mobilenet-image.wasm wasmedge-wasinn-example-mobilenet-image-aot.wasm
60+
wasmedge compile rust/target/wasm32-wasi/release/wasmedge-wasinn-example-mobilenet-image-named-model.wasm wasmedge-wasinn-example-mobilenet-image-named-model-aot.wasm
61+
echo "Run without named model"
62+
wasmedge --dir .:. wasmedge-wasinn-example-mobilenet-image-aot.wasm mobilenet.pt input.jpg
63+
echo "Run with named model"
64+
wasmedge --dir .:. --nn-preload demo:PyTorch:CPU:mobilenet.pt wasmedge-wasinn-example-mobilenet-image-named-model-aot.wasm demo input.jpg

‎.github/workflows/tflite.yml‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
name: Build and Test TFlite examples
1+
name: TFlite examples
22

33
on:
4+
schedule:
5+
- cron: "0 0 * * *"
46
workflow_dispatch:
57
inputs:
68
logLevel:
@@ -9,16 +11,22 @@ on:
911
default: 'info'
1012
push:
1113
branches: [ '*' ]
14+
paths:
15+
- ".github/workflows/tflite.yml"
16+
- "tflite-birds_v1-image/**"
1217
pull_request:
1318
branches: [ '*' ]
19+
paths:
20+
- ".github/workflows/tflite.yml"
21+
- "tflite-birds_v1-image/**"
1422

1523
jobs:
1624
build:
1725

1826
runs-on: ubuntu-20.04
1927

2028
steps:
21-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v3
2230

2331
- name: Install apt-get packages
2432
run: |

‎scripts/install_openvino.sh‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env bash
22
set -e
3-
echo "Installing OpenVINO with version 2023.0.2"
3+
echo "Installing OpenVINO with version 2023.0.0"
44
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
55
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
66
echo "deb https://apt.repos.intel.com/openvino/2023 ubuntu20 main" | tee /etc/apt/sources.list.d/intel-openvino-2023.list
77
apt update
8-
apt-get -y install openvino
9-
ldconfig
10-
export PATH=/usr/lib/x86_64-linux-gnu:$PATH
8+
apt upgrade -y
9+
apt search openvino
10+
apt-get -y install openvino-2023.0.2
11+
export PATH=/usr/lib/x86_64-linux-gnu:$PATH

0 commit comments

Comments
 (0)