-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from Burning1020/update-ci
ci: update ci.yml
- Loading branch information
Showing
4 changed files
with
39 additions
and
38 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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
@@ -10,50 +9,47 @@ env: | |
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check: | ||
|
||
checks: | ||
strategy: | ||
matrix: | ||
directories: [vmm/sandbox, vmm/task, shim, wasm, quark] | ||
include: | ||
- directories: wasm | ||
wasmEdge: 0.11.2 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Deny | ||
run: | | ||
pushd vmm/sandbox && cargo install cargo-deny && cargo deny -L debug --all-features check && popd | ||
pushd vmm/task && cargo deny -L debug --all-features check && popd | ||
pushd shim && cargo deny -L debug --all-features check && popd | ||
pushd wasm && cargo deny -L debug --all-features check && popd | ||
pushd quark && cargo deny -L debug --all-features check && popd | ||
- run: rustup toolchain install nightly --component rustfmt | ||
- name: Install Protoc | ||
uses: arduino/[email protected] | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install WasmEdge | ||
run: curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v 0.11.2 >> /dev/null | ||
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 | ||
run: | | ||
pushd vmm/sandbox && cargo check --examples --tests --all-features && popd | ||
pushd vmm/task && cargo check --examples --tests --all-features && popd | ||
pushd shim && cargo check --examples --tests --all-features && popd | ||
pushd wasm && cargo check --examples --tests --all-features && popd | ||
pushd quark && cargo check --examples --tests --all-features && popd | ||
working-directory: ${{ matrix.directories }} | ||
run: cargo check --examples --tests --all-features | ||
- name: Nightly fmt | ||
run: | | ||
rustup toolchain install nightly --component rustfmt | ||
pushd vmm/sandbox && cargo +nightly fmt --all -- --check --files-with-diff && popd | ||
pushd vmm/task && cargo +nightly fmt --all -- --check --files-with-diff && popd | ||
pushd shim && cargo +nightly fmt --all -- --check --files-with-diff && popd | ||
pushd wasm && cargo +nightly fmt --all -- --check --files-with-diff && popd | ||
pushd quark && cargo +nightly fmt --all -- --check --files-with-diff && popd | ||
working-directory: ${{ matrix.directories }} | ||
run: cargo +nightly fmt --all -- --check | ||
- name: Clippy | ||
run: | | ||
pushd vmm/sandbox && cargo clippy --all-features -- -D warnings && popd | ||
pushd vmm/task && cargo clippy --all-features -- -D warnings && popd | ||
pushd shim && cargo clippy --all-features -- -D warnings && popd | ||
pushd wasm && cargo clippy --all-features -- -D warnings && popd | ||
pushd quark && cargo clippy --all-features -- -D warnings && popd | ||
tests: | ||
working-directory: ${{ matrix.directories }} | ||
run: cargo clippy --all-features -- -D warnings | ||
- name: Deny | ||
working-directory: ${{ matrix.directories }} | ||
run: cargo install cargo-deny && cargo deny -L warn --all-features check | ||
|
||
|
||
tests: | ||
strategy: | ||
matrix: | ||
directories: [ vmm/sandbox, vmm/task, shim, wasm, quark ] | ||
include: | ||
- directories: wasm | ||
wasmEdge: 0.11.2 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
|
@@ -64,11 +60,8 @@ jobs: | |
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install WasmEdge | ||
run: curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v 0.11.2 >> /dev/null | ||
if: ${{ matrix.wasmEdge }} | ||
run: curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v ${{ matrix.wasmEdge }} >> /dev/null | ||
- name: Test | ||
run: | | ||
pushd vmm/sandbox && sudo -E $(command -v cargo) test --all-features && popd | ||
pushd vmm/task && sudo -E $(command -v cargo) test --all-features && popd | ||
pushd shim && sudo -E $(command -v cargo) test --all-features && popd | ||
pushd wasm && sudo -E $(command -v cargo) test --all-features && popd | ||
pushd quark && sudo -E $(command -v cargo) test --all-features && popd | ||
working-directory: ${{ matrix.directories }} | ||
run: sudo -E $(command -v cargo) test --all-features |
File renamed without changes.
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,4 @@ | ||
newline_style = "Unix" | ||
unstable_features = true | ||
group_imports = "StdExternalCrate" | ||
imports_granularity = "Crate" |
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,4 @@ | ||
newline_style = "Unix" | ||
unstable_features = true | ||
group_imports = "StdExternalCrate" | ||
imports_granularity = "Crate" |