Skip to content

Merge pull request #170 from HITweihailiuxu/main #1340

Merge pull request #170 from HITweihailiuxu/main

Merge pull request #170 from HITweihailiuxu/main #1340

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *' # Every day at midnight
env:
CARGO_TERM_COLOR: always
jobs:
checks:
strategy:
matrix:
directories: [vmm/sandbox, vmm/task, shim, quark, runc]
features: [--all-features]
include:
- directories: wasm
features: --features=wasmedge
wasmEdge: 0.13.5
- directories: wasm
features: --features="wasmedge, wasmedge_wasi_nn"
wasmEdge: 0.13.5
- directories: wasm
features: --features=wasmtime
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install nightly --component rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install WasmEdge
if: ${{ matrix.wasmEdge }}
run: curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v ${{ matrix.wasmEdge }} >> /dev/null
- name: Check
working-directory: ${{ matrix.directories }}
run: cargo check --examples --tests ${{ matrix.features }}
- name: Nightly fmt
working-directory: ${{ matrix.directories }}
run: cargo +nightly fmt --all -- --check
- name: Clippy
working-directory: ${{ matrix.directories }}
run: cargo clippy ${{ matrix.features }} -- -D warnings
- name: Deny
working-directory: ${{ matrix.directories }}
run: cargo install cargo-deny@0.15.1 && cargo deny -L warn ${{ matrix.features }} check
tests:
strategy:
matrix:
directories: [vmm/sandbox, vmm/task, shim, quark, runc]
features: [--all-features]
include:
- directories: wasm
features: --features=wasmedge
wasmEdge: 0.13.5
- directories: wasm
features: --features=wasmtime
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install WasmEdge
if: ${{ matrix.wasmEdge }}
run: curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo -E bash -s -- -v ${{ matrix.wasmEdge }} >> /dev/null
- name: Test
env:
RUST_BACKTRACE: full
RUSTFLAGS: -D warnings
working-directory: ${{ matrix.directories }}
run: sudo -E $(command -v cargo) test ${{ matrix.features }}