diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fb1f6eb65b..8debeeda44 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,6 +20,22 @@ jobs: steps: - uses: actions/checkout@v3 + # just triggers rustup to download the toolchain + - name: Cache Toolchain + uses: actions/cache@v3 + with: + path: ~/.rustup + key: ${{ runner.os }}-rust-toolchain-${{ hashFiles('rust-toolchain.toml') }} + - name: Cache Dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-rust-deps-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} - name: Build run: cargo build --verbose - name: Run tests