diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 36edf37d..2f0f392c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -24,6 +24,10 @@ jobs: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" + steps: - uses: actions/checkout@v2 - name: Install Rust @@ -32,6 +36,16 @@ jobs: toolchain: 1.76.0 override: true components: rustfmt, clippy + - name: Cache Cargo registry + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.4 - name: FMT run: cargo fmt --all -- --check - name: Clippy