Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: reduce caching overhead for build steps #2686

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@ jobs:
key: ${{ runner.os }}-cargo-pkg-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-pkg-build-
- uses: actions/cache@v4
name: build cache
name: build-cache
with:
path: |
target/
!target/**/glaredb
!target/**/pgprototest
key: ${{ runner.os }}-cargo-glaredb-build-${{ github.ref_name }}
restore-keys: |
${{ runner.os }}-cargo-glaredb-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-glaredb-build-
restore-keys: ${{ runner.os }}-cargo-glaredb-build-${{ hashFiles('**/Cargo.lock') }}
- run: just build
- run: cargo build --bin pgprototest
- uses: actions/cache/save@v4
Expand Down Expand Up @@ -100,10 +98,7 @@ jobs:
with:
path: ~/.cargo/
key: ${{ runner.os }}-cargo-pkg-lint-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-pkg-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-pkg-lint-
${{ runner.os }}-cargo-pkg-build-
restore-keys: ${{ runner.os }}-cargo-pkg-build-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache/restore@v4
name: build cache
with:
Expand Down Expand Up @@ -134,11 +129,8 @@ jobs:
with:
path: ~/.cargo/
key: ${{ runner.os }}-cargo-pkg-python-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-pkg-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-pkg-python-
${{ runner.os }}-cargo-pkg-build-
- uses: actions/cache@v4
restore-keys: ${{ runner.os }}-cargo-pkg-build-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache/restore@v4
name: build cache
with:
path: |
Expand Down Expand Up @@ -204,10 +196,6 @@ jobs:
with:
path: ~/.cargo/
key: ${{ runner.os }}-cargo-pkg-unit-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-pkg-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-pkg-unit-
${{ runner.os }}-cargo-pkg-build-
- uses: actions/cache/restore@v4
name: build cache
with:
Expand All @@ -233,7 +221,7 @@ jobs:
needs: ["build"]
# parent branches can't use caches from child branches, so no need
# to update this cache _except_ on main.
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/cache@v4
name: cache check
Expand Down
Loading