Commit e6688f31 authored by daz's avatar daz Committed by Daz DeBoer
Browse files

Include RUNNER_ARCH in cache key

Previously, including RUNNER_OS was enough to prevent leaking incompatible
content between Gradle User Homes. With the introduction of macos-14,
we now need to differentiate between different runner architectures as well.

Fixes #138
parent 46308b92
Loading
Loading
Loading
Loading
+2 −1
Changes for sources/src/caching/cache-key.ts: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -73,7 +73,8 @@ export function getCacheKeyBase(cacheName: string, cacheProtocolVersion: string)

function getCacheKeyEnvironment(): string {
    const runnerOs = process.env['RUNNER_OS'] || ''
    return process.env[CACHE_KEY_OS_VAR] || runnerOs
    const runnerArch = process.env['RUNNER_ARCH'] || ''
    return process.env[CACHE_KEY_OS_VAR] || `${runnerOs}-${runnerArch}`
}

function getCacheKeyJob(): string {