Skip to content

Commit

Permalink
ci(macos): new workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Liu <[email protected]>
  • Loading branch information
apepkuss committed Jul 3, 2023
1 parent 698e046 commit 8a1fa0c
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/macos.yml
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

0 comments on commit 8a1fa0c

Please sign in to comment.