@@ -64430,8 +64430,17 @@ class PipCache extends cache_distributor_1.default {
64430
64430
computeKeys() {
64431
64431
return __awaiter(this, void 0, void 0, function* () {
64432
64432
const hash = yield glob.hashFiles(this.cacheDependencyPath);
64433
- const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
64434
- const restoreKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}`;
64433
+ let primaryKey = '';
64434
+ let restoreKey = '';
64435
+ if (utils_1.IS_LINUX) {
64436
+ const osRelease = yield utils_1.getLinuxOSReleaseInfo();
64437
+ primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${osRelease}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
64438
+ restoreKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${osRelease}-python-${this.pythonVersion}-${this.packageManager}`;
64439
+ }
64440
+ else {
64441
+ primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
64442
+ restoreKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}`;
64443
+ }
64435
64444
return {
64436
64445
primaryKey,
64437
64446
restoreKey: [restoreKey]
@@ -65357,16 +65366,26 @@ var __importStar = (this && this.__importStar) || function (mod) {
65357
65366
__setModuleDefault(result, mod);
65358
65367
return result;
65359
65368
};
65369
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
65370
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
65371
+ return new (P || (P = Promise))(function (resolve, reject) {
65372
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
65373
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
65374
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
65375
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
65376
+ });
65377
+ };
65360
65378
var __importDefault = (this && this.__importDefault) || function (mod) {
65361
65379
return (mod && mod.__esModule) ? mod : { "default": mod };
65362
65380
};
65363
65381
Object.defineProperty(exports, "__esModule", ({ value: true }));
65364
- exports.isCacheFeatureAvailable = exports.isGhes = exports.validatePythonVersionFormatForPyPy = exports.writeExactPyPyVersionFile = exports.readExactPyPyVersionFile = exports.getPyPyVersionFromPath = exports.isNightlyKeyword = exports.validateVersion = exports.createSymlinkInFolder = exports.WINDOWS_PLATFORMS = exports.WINDOWS_ARCHS = exports.I
A3E2
S_LINUX = exports.IS_WINDOWS = void 0;
65382
+ exports.getLinuxOSReleaseInfo = exports. isCacheFeatureAvailable = exports.isGhes = exports.validatePythonVersionFormatForPyPy = exports.writeExactPyPyVersionFile = exports.readExactPyPyVersionFile = exports.getPyPyVersionFromPath = exports.isNightlyKeyword = exports.validateVersion = exports.createSymlinkInFolder = exports.WINDOWS_PLATFORMS = exports.WINDOWS_ARCHS = exports.IS_LINUX = exports.IS_WINDOWS = void 0;
65365
65383
const cache = __importStar(__nccwpck_require__(7799));
65366
65384
const core = __importStar(__nccwpck_require__(2186));
65367
65385
const fs_1 = __importDefault(__nccwpck_require__(7147));
65368
65386
const path = __importStar(__nccwpck_require__(1017));
65369
65387
const semver = __importStar(__nccwpck_require__(1383));
65388
+ const exec = __importStar(__nccwpck_require__(1514));
65370
65389
exports.IS_WINDOWS = process.platform === 'win32';
65371
65390
exports.IS_LINUX = process.platform === 'linux';
65372
65391
exports.WINDOWS_ARCHS = ['x86', 'x64'];
@@ -65450,6 +65469,17 @@ function isCacheFeatureAvailable() {
65450
65469
return true;
65451
65470
}
65452
65471
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
65472
+ function getLinuxOSReleaseInfo() {
65473
+ return __awaiter(this, void 0, void 0, function* () {
65474
+ const { stdout, stderr, exitCode } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], {
65475
+ silent: true
65476
+ });
65477
+ const [osRelease, osVersion] = stdout.trim().split('\n');
65478
+ core.debug(`OS Release: ${osRelease}, Version: ${osVersion}`);
65479
+ return `${osVersion}-${osRelease}`;
65480
+ });
65481
+ }
65482
+ exports.getLinuxOSReleaseInfo = getLinuxOSReleaseInfo;
65453
65483
65454
65484
65455
65485
/***/ }),
0 commit comments