Skip to content

Commit

Permalink
fix: normalize cache keys (#2539)
Browse files Browse the repository at this point in the history
  • Loading branch information
tychoish committed Feb 1, 2024
1 parent 4fdd828 commit 0ef506c
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
target/
!target/**/glaredb
!target/**/pgprototest
key: ${{ runner.os }}-cargo-build-${{ github.ref_name }}
key: ${{ runner.os }}-cargo-glaredb-build-${{ github.ref_name }}
restore-keys: |
${{ runner.os }}-cargo-glaredb-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-glaredb-build-
Expand All @@ -49,12 +49,12 @@ jobs:
name: glaredb cache
with:
path: target/debug/glaredb
key: ${{ github.run_id }}
key: ${{ runner.os }}-glaredb-bin-${{ github.run_id }}
- uses: actions/cache/save@v4
name: pgprototest cache
with:
path: target/debug/pgprototest
key: ${{ github.run_id }}
key: ${{ runner.os }}-pgprototest-bin-${{ github.run_id }}


fmt:
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
target/
!target/**/glaredb
!target/**/pgprototest
key: ${{ runner.os }}-cargo-glaredb-${{ github.ref_name }}
key: ${{ runner.os }}-cargo-glaredb-build-${{ github.ref_name }}
- run: just clippy


Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
target/
!target/**/glaredb
!target/**/pgprototest
key: ${{ runner.os }}-cargo-build-${{ github.ref_name }}
key: ${{ runner.os }}-cargo-glaredb-build-${{ github.ref_name }}
- run: just python build
- run: just python test

Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
target/
!target/**/glaredb
!target/**/pgprototest
key: ${{ runner.os }}-cargo-build-${{ github.ref_name }}
key: ${{ runner.os }}-cargo-glaredb-build-${{ github.ref_name }}
- run: just js build-debug
- run: just js test

Expand Down Expand Up @@ -204,12 +204,12 @@ jobs:
target/
!target/**/glaredb
!target/**/pgprototest
key: ${{ runner.os }}-cargo-build-${{ github.ref_name }}
key: ${{ runner.os }}-cargo-glaredb-build-${{ github.ref_name }}
- uses: actions/cache/restore@v4
name: glaredb cache
with:
path: target/debug/glaredb
key: ${{ github.run_id }}
key: ${{ runner.os }}-glaredb-bin-${{ github.run_id }}
- run: just unit-tests


Expand All @@ -220,14 +220,16 @@ jobs:
needs: ["build", "python-binding-tests", "unit-tests"]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/cache/restore@v4
name: build cache
with:
path: |
target/
!target/**/glaredb
!target/**/pgprototest
key: ${{ runner.os }}-cargo-build-${{ github.ref_name }}
key: ${{ runner.os }}-cargo-glaredb-build-${{ github.ref_name }}
- uses: actions/cache/save@v4
name: build cache
with:
Expand All @@ -252,12 +254,12 @@ jobs:
name: glaredb cache
with:
path: target/debug/glaredb
key: ${{ github.run_id }}
key: ${{ runner.os }}-glaredb-bin-${{ github.run_id }}
- uses: actions/cache/restore@v4
name: pgprototest cache
with:
path: target/debug/pgprototest
key: ${{ github.run_id }}
key: ${{ runner.os }}-pgprototest-bin-${{ github.run_id }}
- run: ./scripts/protocol-test.sh
- run: just slt-bin-debug 'pgproto/*'

Expand Down Expand Up @@ -289,7 +291,7 @@ jobs:
name: glaredb cache
with:
path: target/debug/glaredb
key: ${{ github.run_id }}
key: ${{ runner.os }}-glaredb-bin-${{ github.run_id }}
- name: public sql logic tests DEBUG
if: ${{ env.ACTIONS_STEP_DEBUG == 'true' }}
run: ${{matrix.protocol.debug}}
Expand Down Expand Up @@ -320,7 +322,7 @@ jobs:
name: glaredb cache
with:
path: target/debug/glaredb
key: ${{ github.run_id }}
key: ${{ runner.os }}-glaredb-bin-${{ github.run_id }}
- uses: actions/cache@v4
name: py cache
with:
Expand All @@ -347,7 +349,7 @@ jobs:
name: glaredb cache
with:
path: target/debug/glaredb
key: ${{ github.run_id }}
key: ${{ runner.os }}-glaredb-bin-${{ github.run_id }}

- name: GCP authenticate
uses: google-github-actions/auth@v2
Expand Down Expand Up @@ -455,7 +457,7 @@ jobs:
name: glaredb cache
with:
path: target/debug/glaredb
key: ${{ github.run_id }}
key: ${{ runner.os }}-glaredb-bin-${{ github.run_id }}

- name: run tests (slt)
env:
Expand Down Expand Up @@ -521,7 +523,7 @@ jobs:
name: glaredb cache
with:
path: target/debug/glaredb
key: ${{ github.run_id }}
key: ${{ runner.os }}-glaredb-bin-${{ github.run_id }}

- name: snowflake setup (SnowSQL)
run: |
Expand Down Expand Up @@ -598,7 +600,7 @@ jobs:
name: glaredb cache
with:
path: target/debug/glaredb
key: ${{ github.run_id }}
key: ${{ runner.os }}-glaredb-bin-${{ github.run_id }}
- name: run tests (slt)
run: |
${{matrix.settings.prepare}}
Expand Down

0 comments on commit 0ef506c

Please sign in to comment.