feat(cache): Distinguish architectures of caches (#58)
Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>
This commit is contained in:
parent
568ddd6940
commit
176c044a20
4
dist/setup-pdm.js
vendored
4
dist/setup-pdm.js
vendored
@ -91048,8 +91048,8 @@ var cache3 = __toESM(require_cache2());
|
||||
var import_glob = __toESM(require_glob2());
|
||||
async function calculateCacheKeys(pythonVersion, cacheDependencyPath) {
|
||||
const hash = await (0, import_glob.hashFiles)(cacheDependencyPath);
|
||||
const primaryKey = `setup-pdm-${import_node_process3.default.env.RUNNER_OS}-python-${pythonVersion}-${hash}`;
|
||||
const restoreKey = `setup-pdm-${import_node_process3.default.env.RUNNER_OS}-python-${pythonVersion}-`;
|
||||
const primaryKey = `setup-pdm-${import_node_process3.default.env.RUNNER_OS}-${import_node_process3.default.env.RUNNER_ARCH}-python-${pythonVersion}-${hash}`;
|
||||
const restoreKey = `setup-pdm-${import_node_process3.default.env.RUNNER_OS}-${import_node_process3.default.env.RUNNER_ARCH}-python-${pythonVersion}-`;
|
||||
return { primaryKey, restoreKeys: [restoreKey] };
|
||||
}
|
||||
async function cacheDependencies(pdmBin, pythonVersion) {
|
||||
|
@ -7,8 +7,8 @@ import { getOutput } from './utils'
|
||||
|
||||
async function calculateCacheKeys(pythonVersion: string, cacheDependencyPath: string): Promise<{ primaryKey: string, restoreKeys: string[] }> {
|
||||
const hash = await hashFiles(cacheDependencyPath)
|
||||
const primaryKey = `setup-pdm-${process.env.RUNNER_OS}-python-${pythonVersion}-${hash}`
|
||||
const restoreKey = `setup-pdm-${process.env.RUNNER_OS}-python-${pythonVersion}-`
|
||||
const primaryKey = `setup-pdm-${process.env.RUNNER_OS}-${process.env.RUNNER_ARCH}-python-${pythonVersion}-${hash}`
|
||||
const restoreKey = `setup-pdm-${process.env.RUNNER_OS}-${process.env.RUNNER_ARCH}-python-${pythonVersion}-`
|
||||
return { primaryKey, restoreKeys: [restoreKey] }
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user