mirror of
https://github.com/actions/setup-python.git
synced 2025-06-08 14:37:00 +09:00
check failures fix
This commit is contained in:
parent
23543aaee9
commit
5f0e3d56e0
2 changed files with 1016 additions and 1100 deletions
77
dist/cache-save/index.js
vendored
77
dist/cache-save/index.js
vendored
|
@ -86644,22 +86644,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||||
}) : function(o, v) {
|
}) : function(o, v) {
|
||||||
o["default"] = v;
|
o["default"] = v;
|
||||||
});
|
});
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || (function () {
|
||||||
|
var ownKeys = function(o) {
|
||||||
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||||
|
var ar = [];
|
||||||
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||||
|
return ar;
|
||||||
|
};
|
||||||
|
return ownKeys(o);
|
||||||
|
};
|
||||||
|
return function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
})();
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.State = void 0;
|
exports.State = void 0;
|
||||||
const cache = __importStar(__nccwpck_require__(5116));
|
const cache = __importStar(__nccwpck_require__(5116));
|
||||||
|
@ -86677,12 +86678,9 @@ class CacheDistributor {
|
||||||
this.cacheDependencyPath = cacheDependencyPath;
|
this.cacheDependencyPath = cacheDependencyPath;
|
||||||
this.CACHE_KEY_PREFIX = 'setup-python';
|
this.CACHE_KEY_PREFIX = 'setup-python';
|
||||||
}
|
}
|
||||||
handleLoadedCache() {
|
async handleLoadedCache() { }
|
||||||
return __awaiter(this, void 0, void 0, function* () { });
|
async restoreCache() {
|
||||||
}
|
const { primaryKey, restoreKey } = await this.computeKeys();
|
||||||
restoreCache() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const { primaryKey, restoreKey } = yield this.computeKeys();
|
|
||||||
if (primaryKey.endsWith('-')) {
|
if (primaryKey.endsWith('-')) {
|
||||||
const file = this.packageManager === 'pip'
|
const file = this.packageManager === 'pip'
|
||||||
? `${this.cacheDependencyPath
|
? `${this.cacheDependencyPath
|
||||||
|
@ -86691,11 +86689,11 @@ class CacheDistributor {
|
||||||
: this.cacheDependencyPath.split('\n').join(',');
|
: this.cacheDependencyPath.split('\n').join(',');
|
||||||
throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository`);
|
throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository`);
|
||||||
}
|
}
|
||||||
const cachePath = yield this.getCacheGlobalDirectories();
|
const cachePath = await this.getCacheGlobalDirectories();
|
||||||
core.saveState(State.CACHE_PATHS, cachePath);
|
core.saveState(State.CACHE_PATHS, cachePath);
|
||||||
let matchedKey;
|
let matchedKey;
|
||||||
try {
|
try {
|
||||||
matchedKey = yield cache.restoreCache(cachePath, primaryKey, restoreKey);
|
matchedKey = await cache.restoreCache(cachePath, primaryKey, restoreKey);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
const message = err.message;
|
const message = err.message;
|
||||||
|
@ -86704,9 +86702,8 @@ class CacheDistributor {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey);
|
core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey);
|
||||||
yield this.handleLoadedCache();
|
await this.handleLoadedCache();
|
||||||
this.handleMatchResult(matchedKey, primaryKey);
|
this.handleMatchResult(matchedKey, primaryKey);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
handleMatchResult(matchedKey, primaryKey) {
|
handleMatchResult(matchedKey, primaryKey) {
|
||||||
if (matchedKey) {
|
if (matchedKey) {
|
||||||
|
@ -86757,27 +86754,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||||
}) : function(o, v) {
|
}) : function(o, v) {
|
||||||
o["default"] = v;
|
o["default"] = v;
|
||||||
});
|
});
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || (function () {
|
||||||
|
var ownKeys = function(o) {
|
||||||
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||||
|
var ar = [];
|
||||||
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||||
|
return ar;
|
||||||
|
};
|
||||||
|
return ownKeys(o);
|
||||||
|
};
|
||||||
|
return function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
})();
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.run = void 0;
|
exports.run = run;
|
||||||
const core = __importStar(__nccwpck_require__(7484));
|
const core = __importStar(__nccwpck_require__(7484));
|
||||||
const cache = __importStar(__nccwpck_require__(5116));
|
const cache = __importStar(__nccwpck_require__(5116));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(9896));
|
const fs_1 = __importDefault(__nccwpck_require__(9896));
|
||||||
|
@ -86785,12 +86783,11 @@ const cache_distributor_1 = __nccwpck_require__(2326);
|
||||||
// Added early exit to resolve issue with slow post action step:
|
// Added early exit to resolve issue with slow post action step:
|
||||||
// - https://github.com/actions/setup-node/issues/878
|
// - https://github.com/actions/setup-node/issues/878
|
||||||
// https://github.com/actions/cache/pull/1217
|
// https://github.com/actions/cache/pull/1217
|
||||||
function run(earlyExit) {
|
async function run(earlyExit) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
try {
|
try {
|
||||||
const cache = core.getInput('cache');
|
const cache = core.getInput('cache');
|
||||||
if (cache) {
|
if (cache) {
|
||||||
yield saveCache(cache);
|
await saveCache(cache);
|
||||||
if (earlyExit) {
|
if (earlyExit) {
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
@ -86800,11 +86797,8 @@ function run(earlyExit) {
|
||||||
const err = error;
|
const err = error;
|
||||||
core.setFailed(err.message);
|
core.setFailed(err.message);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
exports.run = run;
|
async function saveCache(packageManager) {
|
||||||
function saveCache(packageManager) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const cachePathState = core.getState(cache_distributor_1.State.CACHE_PATHS);
|
const cachePathState = core.getState(cache_distributor_1.State.CACHE_PATHS);
|
||||||
if (!cachePathState) {
|
if (!cachePathState) {
|
||||||
core.warning('Cache paths are empty. Please check the previous logs and make sure that the python version is specified');
|
core.warning('Cache paths are empty. Please check the previous logs and make sure that the python version is specified');
|
||||||
|
@ -86828,7 +86822,7 @@ function saveCache(packageManager) {
|
||||||
}
|
}
|
||||||
let cacheId = 0;
|
let cacheId = 0;
|
||||||
try {
|
try {
|
||||||
cacheId = yield cache.saveCache(cachePaths, primaryKey);
|
cacheId = await cache.saveCache(cachePaths, primaryKey);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
const message = err.message;
|
const message = err.message;
|
||||||
|
@ -86839,7 +86833,6 @@ function saveCache(packageManager) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.info(`Cache saved with the key: ${primaryKey}`);
|
core.info(`Cache saved with the key: ${primaryKey}`);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
function isCacheDirectoryExists(cacheDirectory) {
|
function isCacheDirectoryExists(cacheDirectory) {
|
||||||
const result = cacheDirectory.reduce((previousValue, currentValue) => {
|
const result = cacheDirectory.reduce((previousValue, currentValue) => {
|
||||||
|
|
677
dist/setup/index.js
vendored
677
dist/setup/index.js
vendored
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue