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

fix: normalize cache keys #2539

Merged
merged 2 commits into from
Jan 31, 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
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
Loading