From 40bdb7ee684cdbe8f5c1937e85c43652e33eabcc Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Wed, 14 May 2025 20:20:30 -0700 Subject: [PATCH] ci: cache build artifacts (#124) --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41b28b0..32df88e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,14 @@ jobs: id: toolchain with: components: clippy + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }} - run: cargo clippy --tests --no-deps -- -D warnings format: @@ -41,6 +49,14 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.86.0 id: toolchain + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }} - run: cargo test corpus: @@ -54,6 +70,14 @@ jobs: - uses: tree-sitter/setup-action/cli@v1 - uses: dtolnay/rust-toolchain@1.86.0 id: toolchain + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }} - name: Compile run: | @@ -99,6 +123,14 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.86.0 id: toolchain + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }} - name: Check schema generation run: | # Generate schema