From 371104884620d988153b3f78656e5907d7412142 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Sat, 1 Aug 2026 18:34:34 -0600 Subject: [PATCH] Run pre-existing-gradle-home smoke test on Linux only This job pre-creates ~/.gradle, which is exactly what stops setup-gradle relocating the Gradle User Home to D:\a\.gradle on Windows. The seed build saves its cache entry rooted at D:\a\.gradle, and cache entries are identified by key *and* by a version derived from the cache paths, so the relocated Gradle User Home never matches: the job requests a byte-identical key and still gets "no match found", then fails the --offline build. The other Windows jobs in this workflow are unaffected, and the ubuntu leg passes because Linux has no equivalent relocation. Testing Gradle User Home relocation semantics is integration-level rather than smoke-level behaviour, so run this job on Linux only. Co-Authored-By: Claude Opus 5 (1M context) --- .../workflows/smoke-test-restore-gradle-home.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/smoke-test-restore-gradle-home.yml b/.github/workflows/smoke-test-restore-gradle-home.yml index 1f097199..2ca453cb 100644 --- a/.github/workflows/smoke-test-restore-gradle-home.yml +++ b/.github/workflows/smoke-test-restore-gradle-home.yml @@ -114,15 +114,16 @@ jobs: working-directory: .github/workflow-samples/groovy-dsl run: ./gradlew test - # Test that a pre-existing gradle-user-home can be overwritten by the restored cache + # Test that a pre-existing gradle-user-home can be overwritten by the restored cache. + # + # Deliberately not run against the 'runner-os' matrix: creating ~/.gradle up-front is precisely + # what stops setup-gradle relocating the Gradle User Home to D:\a\.gradle on Windows, so this job + # would look for a cache entry rooted at a different path than the one the seed build saved. + # Cache entries are identified by key *and* by a version derived from the cache paths, so that + # never matches. This is integration-level behaviour rather than a smoke test, so run it on Linux. restore-gradle-home-pre-existing-gradle-home: needs: restore-gradle-home-seed-build - strategy: - max-parallel: 1 - fail-fast: false - matrix: - os: ${{fromJSON(inputs.runner-os)}} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3