Skip to content

Commit

Permalink
Only cache on dev
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemnoel committed Oct 28, 2024
1 parent a97c8f9 commit 32dc34a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/benchmark-pg_analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
key: ${{ matrix.pg_version }}-${{ steps.pgrx.outputs.version }}
cache-targets: true
cache-all-crates: true
save-if: ${{ github.ref == 'refs/heads/dev' }}

- name: Install pgrx & pg_analytics
run: |
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/check-pg_analytics-schema-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ jobs:
with:
fetch-depth: 0 # Fetch the entire history

- name: Extract pgrx Version
id: pgrx
run: echo version=$(cargo tree --depth 1 -i pgrx -p pg_analytics | head -n 1 | cut -f2 -dv) >> $GITHUB_OUTPUT

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

Expand All @@ -47,10 +51,9 @@ jobs:
- name: Install Rust Cache
uses: ubicloud/rust-cache@v2
with:
prefix-key: "v1"
shared-key: ${{ runner.os }}-rust-cache-pg_analytics-${{ HashFiles('Cargo.lock') }}
prefix-key: "v1-rust"
key: ${{ env.pg_version }}-${{ steps.pgrx.outputs.version }}
cache-targets: true
cache-on-failure: true
cache-all-crates: true
save-if: ${{ github.ref == 'refs/heads/dev' }}

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ jobs:
- name: Install Rust Cache
uses: ubicloud/rust-cache@v2
with:
prefix-key: "v1-lint-rust"
prefix-key: "v1-rust"
key: ${{ matrix.pg_version }}-${{ steps.pgrx.outputs.version }}
cache-targets: true
cache-all-crates: true
save-if: ${{ github.ref == 'refs/heads/dev' }}

- name: Install & Configure Supported PostgreSQL Version
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-pg_analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
key: ${{ matrix.pg_version }}-${{ steps.pgrx.outputs.version }}
cache-targets: true
cache-all-crates: true
save-if: ${{ github.ref == 'refs/heads/dev' }}

- name: Install & Configure Supported PostgreSQL Version
if: steps.check_skip.outputs.skip_remaining_steps != 'true'
Expand Down

0 comments on commit 32dc34a

Please sign in to comment.