From 09d28943e189d6f9b42f70027c276c04ca57c829 Mon Sep 17 00:00:00 2001 From: H1ghBre4k3r Date: Mon, 15 Jul 2024 01:56:34 +0200 Subject: [PATCH] chore: add rust-cache to workflows --- .github/workflows/ci.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 523c2ae..9629c45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - self-hosted runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: @@ -37,6 +37,8 @@ jobs: toolchain: ${{ matrix.rust }} override: true + - uses: Swatinem/rust-cache@v2 + - run: cargo build --all - run: cargo build --all --release @@ -51,19 +53,21 @@ jobs: - self-hosted runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: stable + - uses: Swatinem/rust-cache@v2 + - run: cargo test linting: name: Linting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true @@ -72,13 +76,15 @@ jobs: toolchain: stable components: clippy + - uses: Swatinem/rust-cache@v2 + - run: cargo clippy --all-targets formatting: name: Formatting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true @@ -87,4 +93,6 @@ jobs: toolchain: stable components: rustfmt + - uses: Swatinem/rust-cache@v2 + - run: cargo fmt -- --check