Skip to content

Commit

Permalink
[CI] Update rust-static-lib workflow (WasmEdge#96)
Browse files Browse the repository at this point in the history
* ci(rust-static-lib): update workflow

Signed-off-by: Xin Liu <sam@secondstate.io>

* ci(rust-static-lib): update workflow

Signed-off-by: Xin Liu <sam@secondstate.io>

* ci(rust-static-lib): update workflow

Signed-off-by: Xin Liu <sam@secondstate.io>

* ci(rust-static-lib): update workflow

Signed-off-by: Xin Liu <sam@secondstate.io>

* ci(rust-static-lib): remove `libboost-all-dev` dep

Signed-off-by: Xin Liu <sam@secondstate.io>

---------

Signed-off-by: Xin Liu <sam@secondstate.io>
  • Loading branch information
apepkuss authored Nov 16, 2023
1 parent 6d72f15 commit 6be2ef9
Showing 1 changed file with 10 additions and 32 deletions.
42 changes: 10 additions & 32 deletions .github/workflows/rust-static-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,50 +25,28 @@ jobs:
os: [ubuntu-22.04]
rust: [1.73, 1.72, 1.71]
container:
image: wasmedge/wasmedge:latest
image: wasmedge/wasmedge:ubuntu-build-clang

steps:
- uses: actions/checkout@v3
- name: Checkout WasmEdge Rust SDK
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install dependencies
run: |
apt update
apt install -y software-properties-common libboost-all-dev llvm-15-dev liblld-15-dev ninja-build
# - name: Build WasmEdge with Release mode
# run: |
# cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_LINK_LLVM_STATIC=ON -DWASMEDGE_BUILD_SHARED_LIB=OFF -DWASMEDGE_BUILD_STATIC_LIB=ON -DWASMEDGE_BUILD_TOOLS=OFF -DWASMEDGE_BUILD_PLUGINS=OFF .
# cmake --build build

- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy

- name: Rustfmt
working-directory: bindings/rust/
run: cargo +nightly fmt --all -- --check

- name: Clippy
working-directory: bindings/rust/
run: |
export WASMEDGE_DIR="$(pwd)/../../"
export WASMEDGE_BUILD_DIR="$(pwd)/../../build"
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features static -- -D warnings
apt install -y software-properties-common llvm-15-dev liblld-15-dev ninja-build
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}

- name: Test Rust Bindings
working-directory: bindings/rust/
- name: Test Rust SDK
run: |
cargo test -p wasmedge-sdk --all --examples --features static,aot,wasmedge_process,ffi -- --nocapture --test-threads=1
- name: Test Rust SDK with async feature
run: |
export WASMEDGE_DIR="$(pwd)/../../"
export WASMEDGE_BUILD_DIR="$(pwd)/../../build"
cargo +nightly -Z sparse-registry update
cargo test --workspace --features static --locked -- --test-threads=1
cargo test --examples --features static --locked -- --test-threads=1
cargo test -p wasmedge-sdk --all --examples --features static,aot,async,wasmedge_process,ffi -- --nocapture --test-threads=1

0 comments on commit 6be2ef9

Please sign in to comment.