Skip to content

Commit

Permalink
Merge pull request #53 from Burning1020/update-ci
Browse files Browse the repository at this point in the history
ci: update ci.yml
  • Loading branch information
abel-von authored Jul 28, 2023
2 parents a08a8dd + 4c33671 commit 052022d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 38 deletions.
69 changes: 31 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: CI

on:
push:
pull_request:
Expand All @@ -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

Expand All @@ -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.
4 changes: 4 additions & 0 deletions vmm/sandbox/rustfmt.toml
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"
4 changes: 4 additions & 0 deletions vmm/task/rustfmt.toml
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"

0 comments on commit 052022d

Please sign in to comment.