Skip to content

Commit

Permalink
ci: rust has to use wasm32-wasip1 instead of wasm32-wasi
Browse files Browse the repository at this point in the history
Signed-off-by: hydai <[email protected]>
  • Loading branch information
hydai committed Jan 9, 2025
1 parent bc5a061 commit 0a95d2b
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 71 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build_openvino_mobilenet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: wasm32-wasi
target: wasm32-wasip1

- name: Install dependencies
run: |
Expand All @@ -63,15 +63,15 @@ jobs:
run: |
bash download_mobilenet.sh
cd rust
cargo build --target wasm32-wasi --release
cargo build --target wasm32-wasip1 --release
cd ..
wasmedge --dir .:. ./rust/target/wasm32-wasi/release/wasmedge-wasinn-example-mobilenet.wasm mobilenet.xml mobilenet.bin tensor-1x224x224x3-f32.bgr
wasmedge --dir .:. ./rust/target/wasm32-wasip1/release/wasmedge-wasinn-example-mobilenet.wasm mobilenet.xml mobilenet.bin tensor-1x224x224x3-f32.bgr
- name: Build and run openvino-mobilenet-image
working-directory: openvino-mobilenet-image
run: |
bash download_mobilenet.sh
cd rust
cargo build --target wasm32-wasi --release
cargo build --target wasm32-wasip1 --release
cd ..
wasmedge --dir .:. ./rust/target/wasm32-wasi/release/wasmedge-wasinn-example-mobilenet-image.wasm mobilenet.xml mobilenet.bin input.jpg
wasmedge --dir .:. ./rust/target/wasm32-wasip1/release/wasmedge-wasinn-example-mobilenet-image.wasm mobilenet.xml mobilenet.bin input.jpg
6 changes: 3 additions & 3 deletions .github/workflows/build_openvino_road_seg_adas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: wasm32-wasi
target: wasm32-wasip1

- name: Install dependencies
run: |
Expand All @@ -60,7 +60,7 @@ jobs:
working-directory: openvino-road-segmentation-adas
run: |
cd openvino-road-seg-adas
cargo build --target=wasm32-wasi --release
cp target/wasm32-wasi/release/openvino-road-seg-adas.wasm ..
cargo build --target=wasm32-wasip1 --release
cp target/wasm32-wasip1/release/openvino-road-seg-adas.wasm ..
cd ..
wasmedge --dir .:. openvino-road-seg-adas.wasm ./model/road-segmentation-adas-0001.xml ./model/road-segmentation-adas-0001.bin ./image/empty_road_mapillary.jpg
6 changes: 3 additions & 3 deletions .github/workflows/build_pytorch_yolo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: wasm32-wasi
target: wasm32-wasip1

- name: Install LibTorch
working-directory: scripts
Expand All @@ -57,7 +57,7 @@ jobs:
run: |
cd pytorch-yolo-image
cd rust
cargo build --target=wasm32-wasi --release
cp target/wasm32-wasi/release/wasmedge-wasinn-example-yolo-image.wasm ..
cargo build --target=wasm32-wasip1 --release
cp target/wasm32-wasip1/release/wasmedge-wasinn-example-yolo-image.wasm ..
cd ..
wasmedge --dir .:. wasmedge-wasinn-example-yolo-image.wasm ./yolov8n.torchscript ./input.jpg
6 changes: 3 additions & 3 deletions .github/workflows/chatTTS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install Rust target for wasm
run: |
rustup target add wasm32-wasi
rustup target add wasm32-wasip1
- name: Checkout WasmEdge
uses: actions/checkout@v4
Expand All @@ -42,11 +42,11 @@ jobs:
path: WasmEdge-WASINN-examples

- name: Build wasm
run: cargo build --target wasm32-wasi --release
run: cargo build --target wasm32-wasip1 --release
working-directory: WasmEdge-WASINN-examples/wasmedge-chatTTS

- name: Execute
run: WASMEDGE_PLUGIN_PATH=WasmEdge/build/plugins/wasi_nn WasmEdge/build/tools/wasmedge/wasmedge --dir .:. WasmEdge-WASINN-examples/wasmedge-chatTTS/target/wasm32-wasi/release/wasmedge-chattts.wasm
run: WASMEDGE_PLUGIN_PATH=WasmEdge/build/plugins/wasi_nn WasmEdge/build/tools/wasmedge/wasmedge --dir .:. WasmEdge-WASINN-examples/wasmedge-chatTTS/target/wasm32-wasip1/release/wasmedge-chattts.wasm

- name: Verify output
run: test "$(file --brief output1.wav)" == 'RIFF (little-endian) data, WAVE audio, mono 24000 Hz'
Expand Down
94 changes: 47 additions & 47 deletions .github/workflows/llama.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/piper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ jobs:
working-directory: WasmEdge

- name: Install Rust target for wasm
run: rustup target add wasm32-wasi
run: rustup target add wasm32-wasip1

- name: Checkout WasmEdge-WASINN-examples
uses: actions/checkout@v4
with:
path: WasmEdge-WASINN-examples

- name: Build wasm
run: cargo build --target wasm32-wasi --release
run: cargo build --target wasm32-wasip1 --release
working-directory: WasmEdge-WASINN-examples/wasmedge-piper

- name: Download model
Expand All @@ -62,7 +62,7 @@ jobs:
rm piper_linux_x86_64.tar.gz
- name: Execute
run: WASMEDGE_PLUGIN_PATH=WasmEdge/build/plugins/wasi_nn WasmEdge/build/tools/wasmedge/wasmedge --dir .:. WasmEdge-WASINN-examples/wasmedge-piper/target/wasm32-wasi/release/wasmedge-piper.wasm
run: WASMEDGE_PLUGIN_PATH=WasmEdge/build/plugins/wasi_nn WasmEdge/build/tools/wasmedge/wasmedge --dir .:. WasmEdge-WASINN-examples/wasmedge-piper/target/wasm32-wasip1/release/wasmedge-piper.wasm

- name: Verify output
run: test "$(file --brief welcome.wav)" == 'RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 22050 Hz'
8 changes: 4 additions & 4 deletions .github/workflows/pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install Rust target for wasm
run: |
rustup target add wasm32-wasi
rustup target add wasm32-wasip1
- name: Install WasmEdge + WASI-NN + PyTorch
run: |
Expand All @@ -55,10 +55,10 @@ jobs:
run: |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/libtorch/lib
cd pytorch-mobilenet-image/rust
cargo build --target wasm32-wasi --release
cargo build --target wasm32-wasip1 --release
cd ..
wasmedge compile rust/target/wasm32-wasi/release/wasmedge-wasinn-example-mobilenet-image.wasm wasmedge-wasinn-example-mobilenet-image-aot.wasm
wasmedge compile rust/target/wasm32-wasi/release/wasmedge-wasinn-example-mobilenet-image-named-model.wasm wasmedge-wasinn-example-mobilenet-image-named-model-aot.wasm
wasmedge compile rust/target/wasm32-wasip1/release/wasmedge-wasinn-example-mobilenet-image.wasm wasmedge-wasinn-example-mobilenet-image-aot.wasm
wasmedge compile rust/target/wasm32-wasip1/release/wasmedge-wasinn-example-mobilenet-image-named-model.wasm wasmedge-wasinn-example-mobilenet-image-named-model-aot.wasm
echo "Run without named model"
wasmedge --dir .:. wasmedge-wasinn-example-mobilenet-image-aot.wasm mobilenet.pt input.jpg
echo "Run with named model"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tflite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install Rust target for wasm
run: |
rustup target add wasm32-wasi
rustup target add wasm32-wasip1
- name: Install WasmEdge + WASI-NN + TFLite
run: |
Expand All @@ -53,8 +53,8 @@ jobs:
- name: Example
run: |
cd tflite-birds_v1-image/rust
cargo build --target wasm32-wasi --release
cargo build --target wasm32-wasip1 --release
cd ..
wasmedge compile rust/target/wasm32-wasi/release/wasmedge-wasinn-example-tflite-bird-image.wasm wasmedge-wasinn-example-tflite-bird-image.wasm
wasmedge compile rust/target/wasm32-wasip1/release/wasmedge-wasinn-example-tflite-bird-image.wasm wasmedge-wasinn-example-tflite-bird-image.wasm
wasmedge --dir .:. wasmedge-wasinn-example-tflite-bird-image.wasm lite-model_aiy_vision_classifier_birds_V1_3.tflite bird.jpg

0 comments on commit 0a95d2b

Please sign in to comment.