Skip to content

Commit

Permalink
compact CI
Browse files Browse the repository at this point in the history
  • Loading branch information
duc-nx committed Aug 9, 2024
1 parent 101480e commit 2fc583b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
15 changes: 9 additions & 6 deletions .github/actions/rust-cache/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: 'Rust Cache'
description: 'Set up Rust and cache dependencies'
name: Rust Cache
description: Set up Rust and cache dependencies
runs:
using: "composite"
using: composite
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt, clippy
target: riscv32i-unknown-none-elf
- uses: actions/[email protected]
with:
path: |
Expand All @@ -12,6 +18,3 @@ runs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
25 changes: 3 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,15 @@ on:
- main

jobs:
check-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- run: cargo fmt --all --check
- run: cd nova-benches && cargo fmt --check

check-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-cache
- run: rustup target add riscv32i-unknown-none-elf
- run: cargo check --all-features
- run: cargo check --all-features --examples
- run: cargo fmt --all --check
- run: cargo check --bins --examples --tests --benches --all-targets --all-features
- run: cargo check -p example --target=riscv32i-unknown-none-elf
- run: cd nova-benches && cargo check --benches
- run: cargo test --release --bins --examples --tests --benches --all-targets --all-features

cargo-clippy:
runs-on: ubuntu-latest
Expand All @@ -35,14 +24,6 @@ jobs:
- uses: ./.github/actions/rust-cache
- run: cargo clippy --all-targets --all-features

test:
needs: check-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-cache
- run: cargo test -r --all-features

test-smoke:
needs: check-build
runs-on: ubuntu-latest
Expand Down

0 comments on commit 2fc583b

Please sign in to comment.