Skip to content

Commit

Permalink
Merge pull request #95 from Mossaka/add-fmt-to-ci
Browse files Browse the repository at this point in the history
CI: Add rustfmt and cargo clippy to CI
  • Loading branch information
cpuguy83 committed Apr 26, 2023
2 parents 74c08ce + 256fbc0 commit c2665d7
Show file tree
Hide file tree
Showing 11 changed files with 349 additions and 250 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,29 @@ env:
CARGO_TERM_COLOR: always

jobs:
fmt:
runs-on: "ubuntu-latest"
steps:
- uses: Swatinem/rust-cache@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.69.0
components: rustfmt, clippy
- name: Setup OCI runtime build env
run: |
sudo apt -y update
sudo apt install -y pkg-config libsystemd-dev libdbus-glib-1-dev build-essential libelf-dev libseccomp-dev libclang-dev
- name: Setup WasmEdge build env
run: |
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --version=0.11.2
echo "LD_LIBRARY_PATH=$HOME/.wasmedge/lib" >> $GITHUB_ENV
- name: Run cargo fmt
run: |
cargo fmt --all -- --check
- name: Run cargo clippy
run: |
cargo clippy --all --all-targets -- -D warnings
build:
strategy:
matrix:
Expand All @@ -22,7 +45,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.69.0
- name: Setup OCI runtime build env
run: |
sudo apt -y update
Expand Down
Loading

0 comments on commit c2665d7

Please sign in to comment.