From adaf569b84db21242b16aba621b71ad4e3ee10ad Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Tue, 14 Oct 2025 10:32:29 -0500 Subject: [PATCH 1/8] bump caches --- .github/workflows/packaging.yml | 2 +- .github/workflows/python-wheels.yml | 4 ++-- .github/workflows/python.yml | 4 ++-- .github/workflows/r.yml | 7 ++++++- .github/workflows/rust.yml | 16 ++-------------- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index c4c116e6..4e640fa3 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -111,7 +111,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: # Update this key to force a new cache (but share with the python.yml workflow) - prefix-key: "python-v1" + prefix-key: "python-v2" - name: Install docs requirements run: | diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 441d7b07..2232cc87 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -60,7 +60,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: # Update this key to force a new cache - prefix-key: "python-wheel-windows-latest-v1" + prefix-key: "python-wheel-windows-latest-v2" - name: Clone vcpkg uses: actions/checkout@v4 @@ -117,7 +117,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: # Update this key to force a new cache - prefix-key: "python-wheel-macOS-latest-v1" + prefix-key: "python-wheel-macOS-latest-v2" - name: Clone vcpkg uses: actions/checkout@v4 diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 2f447b5f..fd242e54 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -92,7 +92,7 @@ jobs: with: path: vcpkg/packages # Bump the number at the end of this line to force a new dependency build - key: vcpkg-installed-${{ runner.os }}-${{ runner.arch }}-${{ env.VCPKG_REF }}-1 + key: vcpkg-installed-${{ runner.os }}-${{ runner.arch }}-${{ env.VCPKG_REF }}-2 - name: Install vcpkg dependencies if: steps.cache-vcpkg.outputs.cache-hit != 'true' @@ -112,7 +112,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: # Update this key to force a new cache (sync with packaging.yml) - prefix-key: "python-v1" + prefix-key: "python-v2" - name: Install run: | diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 2a384e6d..ab697350 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -51,6 +51,9 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes + # Explicitly specify for Windows, which otherwise chooses a shorter version + # This allows us to use a common cache configuration for Windows, MacOS, and Linux + SEDONADB_TARGET_DIR: "${{ github.workspace }}/r/sedonadb/src/rust/target" steps: - uses: actions/checkout@v4 @@ -83,7 +86,9 @@ jobs: - uses: Swatinem/rust-cache@v2 with: # Update this key to force a new cache - prefix-key: "r-v2" + prefix-key: "r-v3" + # The R package uses its own target directory + workspaces: ". -> r/sedonadb/src/rust/target" - uses: r-lib/actions/setup-r-dependencies@v2 with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f7ea8d1b..8efd8a45 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -91,7 +91,7 @@ jobs: with: path: vcpkg/packages # Bump the number at the end of this line to force a new dependency build - key: vcpkg-installed-${{ runner.os }}-${{ runner.arch }}-${{ env.VCPKG_REF }}-1 + key: vcpkg-installed-${{ runner.os }}-${{ runner.arch }}-${{ env.VCPKG_REF }}-2 - name: Install vcpkg dependencies if: steps.cache-vcpkg.outputs.cache-hit != 'true' @@ -109,19 +109,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: # Update this key to force a new cache - prefix-key: "rust-${{ matrix.name }}-v3" - - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - # Free up space by removing tools we don't need - tool-cache: false # Keep tool cache as we need build tools - android: true # Remove Android SDK (not needed) - dotnet: true # Remove .NET runtime (not needed) - haskell: true # Remove Haskell toolchain (not needed) - large-packages: false # Keep essential packages including build-essential - swap-storage: true # Remove swap file to free space - docker-images: true # Remove docker images (not needed) + prefix-key: "rust-${{ matrix.name }}-v4" - name: Install dependencies shell: bash From 04138b17c122c19f58dbfb7690998e665de41f22 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Tue, 14 Oct 2025 10:52:03 -0500 Subject: [PATCH 2/8] try a different strategy for windows --- .github/workflows/r.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index ab697350..5ae1cd2e 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -51,9 +51,6 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes - # Explicitly specify for Windows, which otherwise chooses a shorter version - # This allows us to use a common cache configuration for Windows, MacOS, and Linux - SEDONADB_TARGET_DIR: "${{ github.workspace }}/r/sedonadb/src/rust/target" steps: - uses: actions/checkout@v4 @@ -90,6 +87,15 @@ jobs: # The R package uses its own target directory workspaces: ". -> r/sedonadb/src/rust/target" + # Explicitly specify for Windows, which otherwise chooses a shorter version + # to work around a path length limitation when building from longer starting paths. + # This allows us to use a common cache configuration for Windows, MacOS, and Linux + - name: Set R/Rust target directory + if: matrix.config.os == 'windows-latest' + run: | + echo "SEDONADB_TARGET_DIR=$(pwd -W)/r/sedonadb/src/rust/target" >> $GITHUB_ENV + shell: bash + - uses: r-lib/actions/setup-r-dependencies@v2 with: needs: check From 448db636b10deb193b54a21bee0de17e5f92450f Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 16 Oct 2025 09:30:50 -0500 Subject: [PATCH 3/8] put the disk space freer back --- .github/workflows/rust.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8efd8a45..6b026d31 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -111,6 +111,18 @@ jobs: # Update this key to force a new cache prefix-key: "rust-${{ matrix.name }}-v4" + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # Free up space by removing tools we don't need + tool-cache: false # Keep tool cache as we need build tools + android: true # Remove Android SDK (not needed) + dotnet: true # Remove .NET runtime (not needed) + haskell: true # Remove Haskell toolchain (not needed) + large-packages: false # Keep essential packages including build-essential + swap-storage: true # Remove swap file to free space + docker-images: true # Remove docker images (not needed) + - name: Install dependencies shell: bash run: | From 43346f6b165c0c69b843b5c2f7de7cc7ea50b212 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 16 Oct 2025 10:26:57 -0500 Subject: [PATCH 4/8] tiny bump to check cache usefulness --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6b026d31..7ff3d98a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -119,7 +119,7 @@ jobs: android: true # Remove Android SDK (not needed) dotnet: true # Remove .NET runtime (not needed) haskell: true # Remove Haskell toolchain (not needed) - large-packages: false # Keep essential packages including build-essential + large-packages: false # Remove large packages (not build-essential) swap-storage: true # Remove swap file to free space docker-images: true # Remove docker images (not needed) From 2a11a9916d0e9c431d46f4f50f6b74693c8e080b Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 16 Oct 2025 11:04:08 -0500 Subject: [PATCH 5/8] maybe cache the correct target on Windows --- .github/workflows/r.yml | 10 ++++++++++ .github/workflows/rust.yml | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 5ae1cd2e..daf9b5da 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -61,11 +61,21 @@ jobs: use-public-rspm: true - name: Use stable Rust + if: matrix.config.os != 'windows-latest' id: rust run: | rustup toolchain install stable --no-self-update rustup default stable + # Set the default toolchain here so that rust-cache saves/restores + # the correct target. (The R package will use this target regardless) + - name: Use stable Rust (windows) + if: matrix.config.os == 'windows-latest' + id: rust + run: | + rustup toolchain install stable --no-self-update + rustup default stable-x86_64-pc-windows-gnu + # GHA runner installs GNU target by default, but --no-self-update might # remove it, so run `target add` to ensure the GNU target installed. - name: Setup Rust (Windows) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7ff3d98a..60959114 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -106,6 +106,7 @@ jobs: run: | rustup toolchain install stable --no-self-update rustup default stable + - uses: Swatinem/rust-cache@v2 with: # Update this key to force a new cache @@ -119,7 +120,7 @@ jobs: android: true # Remove Android SDK (not needed) dotnet: true # Remove .NET runtime (not needed) haskell: true # Remove Haskell toolchain (not needed) - large-packages: false # Remove large packages (not build-essential) + large-packages: false # Keep essential packages including build-essential swap-storage: true # Remove swap file to free space docker-images: true # Remove docker images (not needed) From 0420ac6008d77f4fcf18d0c455253f9134957fb2 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 16 Oct 2025 11:08:06 -0500 Subject: [PATCH 6/8] fix workflow --- .github/workflows/r.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index daf9b5da..82dd7863 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -62,7 +62,6 @@ jobs: - name: Use stable Rust if: matrix.config.os != 'windows-latest' - id: rust run: | rustup toolchain install stable --no-self-update rustup default stable @@ -71,17 +70,10 @@ jobs: # the correct target. (The R package will use this target regardless) - name: Use stable Rust (windows) if: matrix.config.os == 'windows-latest' - id: rust run: | - rustup toolchain install stable --no-self-update + rustup toolchain install x86_64-pc-windows-gnu --no-self-update rustup default stable-x86_64-pc-windows-gnu - # GHA runner installs GNU target by default, but --no-self-update might - # remove it, so run `target add` to ensure the GNU target installed. - - name: Setup Rust (Windows) - if: matrix.config.os == 'windows-latest' - run: rustup target add x86_64-pc-windows-gnu - - name: Install dependencies (Linux) if: matrix.config.os == 'ubuntu-latest' run: sudo apt-get update && sudo apt-get install -y libgeos-dev From ef58f716eb47194679423cbb52d9a940fc6dda96 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 16 Oct 2025 11:09:25 -0500 Subject: [PATCH 7/8] maybe fix again --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 82dd7863..db60c0f9 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -71,7 +71,7 @@ jobs: - name: Use stable Rust (windows) if: matrix.config.os == 'windows-latest' run: | - rustup toolchain install x86_64-pc-windows-gnu --no-self-update + rustup toolchain install stable-x86_64-pc-windows-gnu --no-self-update rustup default stable-x86_64-pc-windows-gnu - name: Install dependencies (Linux) From 485083946f87157dfa264a457c5a7b30634f427e Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 16 Oct 2025 11:50:43 -0500 Subject: [PATCH 8/8] bump to check cache --- .github/workflows/r.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index db60c0f9..151809b7 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -67,7 +67,8 @@ jobs: rustup default stable # Set the default toolchain here so that rust-cache saves/restores - # the correct target. (The R package will use this target regardless) + # the correct target. (The R package will use this target regardless, + # this just in theory helps the cache) - name: Use stable Rust (windows) if: matrix.config.os == 'windows-latest' run: |