diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d2afc3d..efec10f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,15 @@ env: RUST_MIN_STACK: 8000000 jobs: + fmt: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Fmt + run: cargo fmt --all --check + build: runs-on: ubuntu-latest @@ -24,7 +33,7 @@ jobs: id: cache-restore with: path: target - key: ubuntu-latest + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install dependencies run: sudo apt install -y libboost-dev @@ -36,9 +45,9 @@ jobs: id: cache-save with: path: target - key: ubuntu-latest + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - lint: + clippy: runs-on: ubuntu-latest needs: build @@ -49,14 +58,11 @@ jobs: id: cache with: path: target - key: ubuntu-latest + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Clippy run: cargo clippy --workspace --all-targets --all-features -- -D warnings - - name: Fmt - run: cargo fmt --all --check - tests: runs-on: ubuntu-latest needs: build @@ -68,7 +74,7 @@ jobs: id: cache with: path: target - key: ubuntu-latest + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Test run: cargo test --all-features --workspace --all-targets && cargo test --all-features --workspace --doc