forked from WasmEdge/wasmedge-rust-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Xin Liu <[email protected]>
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Continuous integration | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: [push] | ||
|
||
jobs: | ||
|
||
build_macos: | ||
name: MacOS | ||
runs-on: [self-hosted, macos-12, ARM64] | ||
strategy: | ||
matrix: | ||
rust: [1.70.0] | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout WasmEdge Runtime | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: WasmEdge/WasmEdge | ||
path: WasmEdge | ||
|
||
- name: Install build tools | ||
run: brew install llvm ninja boost cmake | ||
|
||
- name: Build WasmEdge with Release mode | ||
working-directory: WasmEdge | ||
run: | | ||
export LLVM_DIR="/usr/local/opt/llvm/lib/cmake" | ||
export CC=clang | ||
export CXX=clang++ | ||
rm -rf build | ||
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release . | ||
cmake --build build | ||
cmake --install build | ||
- name: Install Rust-nightly | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rustfmt, clippy | ||
|
||
- name: Run cargo fmt | ||
run: cargo +nightly fmt --all -- --check | ||
|
||
- name: Clippy | ||
run: | | ||
cargo +nightly clippy -V | ||
cargo +nightly clippy --lib --examples --features aot,ffi -- -D warnings | ||
- name: Install Rust-stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
|
||
- name: Test Rust Bindings | ||
run: | | ||
cargo +nightly -Z sparse-registry update | ||
cargo test --workspace --exclude async-wasi --locked --features aot,ffi -- --nocapture |