Skip to content

Commit 44cd170

Browse files
authored
chore(ci): Bump caches (#222)
1 parent f577f83 commit 44cd170

File tree

5 files changed

+28
-13
lines changed

5 files changed

+28
-13
lines changed

.github/workflows/packaging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
- uses: Swatinem/rust-cache@v2
112112
with:
113113
# Update this key to force a new cache (but share with the python.yml workflow)
114-
prefix-key: "python-v1"
114+
prefix-key: "python-v2"
115115

116116
- name: Install docs requirements
117117
run: |

.github/workflows/python-wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- uses: Swatinem/rust-cache@v2
6161
with:
6262
# Update this key to force a new cache
63-
prefix-key: "python-wheel-windows-latest-v1"
63+
prefix-key: "python-wheel-windows-latest-v2"
6464

6565
- name: Clone vcpkg
6666
uses: actions/checkout@v4
@@ -117,7 +117,7 @@ jobs:
117117
- uses: Swatinem/rust-cache@v2
118118
with:
119119
# Update this key to force a new cache
120-
prefix-key: "python-wheel-macOS-latest-v1"
120+
prefix-key: "python-wheel-macOS-latest-v2"
121121

122122
- name: Clone vcpkg
123123
uses: actions/checkout@v4

.github/workflows/python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
with:
9393
path: vcpkg/packages
9494
# Bump the number at the end of this line to force a new dependency build
95-
key: vcpkg-installed-${{ runner.os }}-${{ runner.arch }}-${{ env.VCPKG_REF }}-1
95+
key: vcpkg-installed-${{ runner.os }}-${{ runner.arch }}-${{ env.VCPKG_REF }}-2
9696

9797
- name: Install vcpkg dependencies
9898
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
@@ -112,7 +112,7 @@ jobs:
112112
- uses: Swatinem/rust-cache@v2
113113
with:
114114
# Update this key to force a new cache (sync with packaging.yml)
115-
prefix-key: "python-v1"
115+
prefix-key: "python-v2"
116116

117117
- name: Install
118118
run: |

.github/workflows/r.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,19 @@ jobs:
6161
use-public-rspm: true
6262

6363
- name: Use stable Rust
64-
id: rust
64+
if: matrix.config.os != 'windows-latest'
6565
run: |
6666
rustup toolchain install stable --no-self-update
6767
rustup default stable
6868
69-
# GHA runner installs GNU target by default, but --no-self-update might
70-
# remove it, so run `target add` to ensure the GNU target installed.
71-
- name: Setup Rust (Windows)
69+
# Set the default toolchain here so that rust-cache saves/restores
70+
# the correct target. (The R package will use this target regardless,
71+
# this just in theory helps the cache)
72+
- name: Use stable Rust (windows)
7273
if: matrix.config.os == 'windows-latest'
73-
run: rustup target add x86_64-pc-windows-gnu
74+
run: |
75+
rustup toolchain install stable-x86_64-pc-windows-gnu --no-self-update
76+
rustup default stable-x86_64-pc-windows-gnu
7477
7578
- name: Install dependencies (Linux)
7679
if: matrix.config.os == 'ubuntu-latest'
@@ -83,7 +86,18 @@ jobs:
8386
- uses: Swatinem/rust-cache@v2
8487
with:
8588
# Update this key to force a new cache
86-
prefix-key: "r-v2"
89+
prefix-key: "r-v3"
90+
# The R package uses its own target directory
91+
workspaces: ". -> r/sedonadb/src/rust/target"
92+
93+
# Explicitly specify for Windows, which otherwise chooses a shorter version
94+
# to work around a path length limitation when building from longer starting paths.
95+
# This allows us to use a common cache configuration for Windows, MacOS, and Linux
96+
- name: Set R/Rust target directory
97+
if: matrix.config.os == 'windows-latest'
98+
run: |
99+
echo "SEDONADB_TARGET_DIR=$(pwd -W)/r/sedonadb/src/rust/target" >> $GITHUB_ENV
100+
shell: bash
87101

88102
- uses: r-lib/actions/setup-r-dependencies@v2
89103
with:

.github/workflows/rust.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
with:
9292
path: vcpkg/packages
9393
# Bump the number at the end of this line to force a new dependency build
94-
key: vcpkg-installed-${{ runner.os }}-${{ runner.arch }}-${{ env.VCPKG_REF }}-1
94+
key: vcpkg-installed-${{ runner.os }}-${{ runner.arch }}-${{ env.VCPKG_REF }}-2
9595

9696
- name: Install vcpkg dependencies
9797
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
@@ -106,10 +106,11 @@ jobs:
106106
run: |
107107
rustup toolchain install stable --no-self-update
108108
rustup default stable
109+
109110
- uses: Swatinem/rust-cache@v2
110111
with:
111112
# Update this key to force a new cache
112-
prefix-key: "rust-${{ matrix.name }}-v3"
113+
prefix-key: "rust-${{ matrix.name }}-v4"
113114

114115
- name: Free Disk Space (Ubuntu)
115116
uses: jlumbroso/free-disk-space@main

0 commit comments

Comments
 (0)