Compare commits

..

6 Commits

Author SHA1 Message Date
Priyagupta108
09262e015b Test macos-14-large x64 runner 2025-07-29 15:21:15 +05:30
Priya Gupta
06417d4504 Update e2e-cache.yml (test-macos-x64-runner) 2025-07-29 14:28:44 +05:30
Priya Gupta
d1bb3a8c04 Update e2e-cache-freethreaded.yml(test-macos-x64-runner) 2025-07-29 14:22:59 +05:30
Priya Gupta
ade6528851 Test macos x64 runner 2025-07-24 11:52:05 +05:30
priya-kinthali
3c6f142cc0 update documentation (#1156) 2025-07-23 13:32:04 -05:00
Marc Mueller
88ffd4d597 Include python version in PyPy python-version output (#1110) 2025-07-21 14:01:05 -05:00
14 changed files with 1239 additions and 1427 deletions

View File

@@ -6,7 +6,7 @@ on:
- '**.md'
push:
branches:
- main
- test-macos-x64-runner
- releases/*
paths-ignore:
- '**.md'
@@ -23,13 +23,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-22.04,
ubuntu-24.04-arm,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version: [3.13.0t, 3.13.1t, 3.13.2t]
steps:
@@ -50,13 +44,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-22.04,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version: [3.13.1t, 3.13.2t, 3.13.5t]
steps:
@@ -80,13 +68,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-22.04,
ubuntu-24.04-arm,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version: [3.13.0, 3.13.1, 3.13.2]
steps:
@@ -112,13 +94,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-22.04,
ubuntu-24.04-arm,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version: [3.13.0t, 3.13.1t, 3.13.2t]
steps:
@@ -140,13 +116,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-22.04,
ubuntu-24.04-arm,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version: [3.13.1t, 3.13.2t, 3.13.5t]
steps:
@@ -171,13 +141,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-22.04,
ubuntu-24.04-arm,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version: [3.13.0t, 3.13.1t, 3.13.2t]
steps:
@@ -199,13 +163,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-22.04,
ubuntu-24.04-arm,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version: [3.13.0t, 3.13.1t, 3.13.2t]
steps:

View File

@@ -6,7 +6,7 @@ on:
- '**.md'
push:
branches:
- main
- test-macos-x64-runner
- releases/*
paths-ignore:
- '**.md'
@@ -23,13 +23,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-22.04,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version:
[
@@ -63,13 +57,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-22.04,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version:
['3.10', 'pypy-3.10-v7.x', '3.11', 'pypy-3.11-v7.x', '3.12', '3.13']
@@ -120,13 +108,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-22.04,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version:
[
@@ -161,13 +143,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-22.04,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version:
[
@@ -202,13 +178,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-22.04,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version:
['3.10', 'pypy-3.10-v7.x', '3.11', 'pypy-3.11-v7.x', '3.12', '3.13']
@@ -258,13 +228,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-22.04,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
@@ -286,13 +250,7 @@ jobs:
matrix:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-22.04,
ubuntu-22.04-arm,
windows-latest,
macos-latest,
macos-13
macos-14-large
]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:

View File

@@ -3,7 +3,7 @@ name: e2e tests
on:
push:
branches:
- main
- test-macos-x64-runner
paths-ignore:
- '**.md'
pull_request:
@@ -19,13 +19,7 @@ jobs:
matrix:
operating-system:
[
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-latest,
ubuntu-24.04-arm,
macos-latest,
macos-13
macos-14-large
]
steps:
- name: Checkout

View File

@@ -3,7 +3,7 @@ name: Validate GraalPy e2e
on:
push:
branches:
- main
- test-macos-x64-runner
paths-ignore:
- '**.md'
pull_request:
@@ -20,12 +20,7 @@ jobs:
matrix:
os:
[
macos-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
graalpy:
- 'graalpy-22.3'
@@ -75,12 +70,7 @@ jobs:
matrix:
os:
[
macos-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
graalpy: ['graalpy22.3', 'graalpy23.0', 'graalpy23.1', 'graalpy24.1']
@@ -106,7 +96,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, macos-13]
os: [macos-14-large]
steps:
- uses: actions/checkout@v4
- name: Setup GraalPy and check latest

View File

@@ -3,7 +3,7 @@ name: Validate PyPy e2e
on:
push:
branches:
- main
- test-macos-x64-runner
paths-ignore:
- '**.md'
pull_request:
@@ -22,13 +22,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
pypy:
- 'pypy-2.7'
@@ -85,15 +79,7 @@ jobs:
fail-fast: false
matrix:
os:
- macos-13
- macos-14
- macos-15
- windows-2022
- windows-2025
- ubuntu-22.04
- ubuntu-24.04
- ubuntu-22.04-arm
- ubuntu-24.04-arm
- macos-14-large
pypy: ['pypy-2.7', 'pypy-3.10', 'pypy-3.11']
steps:
@@ -138,13 +124,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
pypy: ['pypy2.7', 'pypy3.9', 'pypy3.10-nightly', 'pypy3.11']
@@ -172,13 +152,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
steps:
- uses: actions/checkout@v4
@@ -214,13 +188,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
steps:
- uses: actions/checkout@v4

View File

@@ -3,7 +3,7 @@ name: Validate Python e2e freethread
on:
push:
branches:
- main
- test-macos-x64-runner
paths-ignore:
- '**.md'
pull_request:
@@ -22,13 +22,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.13.0t, 3.13.1t, 3.13.2t]
steps:
@@ -59,13 +53,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.13.0t, 3.13.1t, 3.13.2t]
steps:
@@ -99,13 +87,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.13.0t, 3.13.1t, 3.13.2t]
steps:
@@ -137,13 +119,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.13.0, 3.13.1, 3.13.2]
steps:
@@ -178,13 +154,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.13.0, 3.13.1, 3.13.2]
steps:
@@ -219,13 +189,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.13.0t, 3.13.1t, 3.13.2t, 3.14t-dev]
steps:
@@ -250,13 +214,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
steps:
- name: Checkout
@@ -287,13 +245,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
steps:
- name: Checkout
@@ -324,13 +276,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
steps:
- name: Checkout
@@ -362,13 +308,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.13.0t, 3.13.1t, 3.13.2t]
steps:
@@ -395,13 +335,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
python-version: [3.13t, 3.14t-dev]
steps:
@@ -422,13 +356,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
steps:
- uses: actions/checkout@v4
@@ -451,13 +379,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.13.1, 3.13.2, 3.14-dev, 3.14.0-alpha.6]
steps:

View File

@@ -3,7 +3,7 @@ name: Validate Python e2e
on:
push:
branches:
- main
- test-macos-x64-runner
paths-ignore:
- '**.md'
pull_request:
@@ -22,13 +22,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2]
steps:
@@ -66,13 +60,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2]
steps:
@@ -113,13 +101,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2]
steps:
@@ -158,13 +140,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.9.13, 3.10.11, 3.11.9, '==3.12.3', 3.13.2]
steps:
@@ -208,13 +184,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2]
steps:
@@ -258,13 +228,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: [pypy3.11-7.3.18, graalpy-24.1.2, 3.13.2, 3.14-dev]
exclude:
@@ -292,13 +256,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
steps:
- name: Checkout
@@ -335,13 +293,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
steps:
- name: Checkout
@@ -372,13 +324,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
steps:
- name: Checkout
@@ -410,13 +356,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
ubuntu-latest,
ubuntu-24.04-arm
macos-14-large
]
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
@@ -443,13 +383,7 @@ jobs:
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
macos-14-large
]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
@@ -475,14 +409,8 @@ jobs:
fail-fast: false
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
ubuntu-latest,
macos-13
[
macos-14-large
]
steps:
- uses: actions/checkout@v4

View File

@@ -94,6 +94,8 @@ steps:
>The requirements file format allows for specifying dependency versions using logical operators (for example chardet>=3.0.4) or specifying dependencies without any versions. In this case the pip install -r requirements.txt command will always try to install the latest available package version. To be sure that the cache will be used, please stick to a specific dependency version and update it manually if necessary.
>The `setup-python` action does not handle authentication for pip when installing packages from private repositories. For help, refer [pips VCS support documentation](https://pip.pypa.io/en/stable/topics/vcs-support/) or visit the [pip repository](https://github.com/pypa/pip).
See examples of using `cache` and `cache-dependency-path` for `pipenv` and `poetry` in the section: [Caching packages](docs/advanced-usage.md#caching-packages) of the [Advanced usage](docs/advanced-usage.md) guide.
## Advanced usage

View File

@@ -86644,23 +86644,22 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
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;
var result = {};
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);
return result;
};
})();
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
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 }));
exports.State = void 0;
const cache = __importStar(__nccwpck_require__(5116));
@@ -86678,32 +86677,36 @@ class CacheDistributor {
this.cacheDependencyPath = cacheDependencyPath;
this.CACHE_KEY_PREFIX = 'setup-python';
}
async handleLoadedCache() { }
async restoreCache() {
const { primaryKey, restoreKey } = await this.computeKeys();
if (primaryKey.endsWith('-')) {
const file = this.packageManager === 'pip'
? `${this.cacheDependencyPath
.split('\n')
.join(',')} or ${constants_1.CACHE_DEPENDENCY_BACKUP_PATH}`
: 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`);
}
const cachePath = await this.getCacheGlobalDirectories();
core.saveState(State.CACHE_PATHS, cachePath);
let matchedKey;
try {
matchedKey = await cache.restoreCache(cachePath, primaryKey, restoreKey);
}
catch (err) {
const message = err.message;
core.info(`[warning]${message}`);
core.setOutput('cache-hit', false);
return;
}
core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey);
await this.handleLoadedCache();
this.handleMatchResult(matchedKey, primaryKey);
handleLoadedCache() {
return __awaiter(this, void 0, void 0, function* () { });
}
restoreCache() {
return __awaiter(this, void 0, void 0, function* () {
const { primaryKey, restoreKey } = yield this.computeKeys();
if (primaryKey.endsWith('-')) {
const file = this.packageManager === 'pip'
? `${this.cacheDependencyPath
.split('\n')
.join(',')} or ${constants_1.CACHE_DEPENDENCY_BACKUP_PATH}`
: 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`);
}
const cachePath = yield this.getCacheGlobalDirectories();
core.saveState(State.CACHE_PATHS, cachePath);
let matchedKey;
try {
matchedKey = yield cache.restoreCache(cachePath, primaryKey, restoreKey);
}
catch (err) {
const message = err.message;
core.info(`[warning]${message}`);
core.setOutput('cache-hit', false);
return;
}
core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey);
yield this.handleLoadedCache();
this.handleMatchResult(matchedKey, primaryKey);
});
}
handleMatchResult(matchedKey, primaryKey) {
if (matchedKey) {
@@ -86754,28 +86757,27 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
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;
var result = {};
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);
return result;
};
})();
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
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) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.run = run;
exports.run = void 0;
const core = __importStar(__nccwpck_require__(7484));
const cache = __importStar(__nccwpck_require__(5116));
const fs_1 = __importDefault(__nccwpck_require__(9896));
@@ -86783,56 +86785,61 @@ const cache_distributor_1 = __nccwpck_require__(2326);
// Added early exit to resolve issue with slow post action step:
// - https://github.com/actions/setup-node/issues/878
// https://github.com/actions/cache/pull/1217
async function run(earlyExit) {
try {
const cache = core.getInput('cache');
if (cache) {
await saveCache(cache);
if (earlyExit) {
process.exit(0);
function run(earlyExit) {
return __awaiter(this, void 0, void 0, function* () {
try {
const cache = core.getInput('cache');
if (cache) {
yield saveCache(cache);
if (earlyExit) {
process.exit(0);
}
}
}
}
catch (error) {
const err = error;
core.setFailed(err.message);
}
catch (error) {
const err = error;
core.setFailed(err.message);
}
});
}
async function saveCache(packageManager) {
const cachePathState = core.getState(cache_distributor_1.State.CACHE_PATHS);
if (!cachePathState) {
core.warning('Cache paths are empty. Please check the previous logs and make sure that the python version is specified');
return;
}
const cachePaths = JSON.parse(cachePathState);
core.debug(`paths for caching are ${cachePaths.join(', ')}`);
if (!isCacheDirectoryExists(cachePaths)) {
throw new Error(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`);
}
const primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY);
const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY);
if (!primaryKey) {
core.warning('Error retrieving key from state.');
return;
}
else if (matchedKey === primaryKey) {
// no change in target directories
core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`);
return;
}
let cacheId = 0;
try {
cacheId = await cache.saveCache(cachePaths, primaryKey);
}
catch (err) {
const message = err.message;
core.info(`[warning]${message}`);
return;
}
if (cacheId == -1) {
return;
}
core.info(`Cache saved with the key: ${primaryKey}`);
exports.run = run;
function saveCache(packageManager) {
return __awaiter(this, void 0, void 0, function* () {
const cachePathState = core.getState(cache_distributor_1.State.CACHE_PATHS);
if (!cachePathState) {
core.warning('Cache paths are empty. Please check the previous logs and make sure that the python version is specified');
return;
}
const cachePaths = JSON.parse(cachePathState);
core.debug(`paths for caching are ${cachePaths.join(', ')}`);
if (!isCacheDirectoryExists(cachePaths)) {
throw new Error(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`);
}
const primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY);
const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY);
if (!primaryKey) {
core.warning('Error retrieving key from state.');
return;
}
else if (matchedKey === primaryKey) {
// no change in target directories
core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`);
return;
}
let cacheId = 0;
try {
cacheId = yield cache.saveCache(cachePaths, primaryKey);
}
catch (err) {
const message = err.message;
core.info(`[warning]${message}`);
return;
}
if (cacheId == -1) {
return;
}
core.info(`Cache saved with the key: ${primaryKey}`);
});
}
function isCacheDirectoryExists(cacheDirectory) {
const result = cacheDirectory.reduce((previousValue, currentValue) => {

2029
dist/setup/index.js vendored

File diff suppressed because it is too large Load Diff

9
package-lock.json generated
View File

@@ -34,7 +34,7 @@
"jest-circus": "^29.7.0",
"prettier": "^3.5.3",
"ts-jest": "^29.3.2",
"typescript": "^5.8.3"
"typescript": "^5.4.2"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -5255,11 +5255,10 @@
}
},
"node_modules/typescript": {
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"

View File

@@ -50,6 +50,6 @@
"jest-circus": "^29.7.0",
"prettier": "^3.5.3",
"ts-jest": "^29.3.2",
"typescript": "^5.8.3"
"typescript": "^5.4.2"
}
}

View File

@@ -96,7 +96,10 @@ export async function findPyPyVersion(
core.addPath(pythonLocation);
core.addPath(_binDir);
}
core.setOutput('python-version', 'pypy' + resolvedPyPyVersion);
core.setOutput(
'python-version',
`pypy${resolvedPythonVersion}-${resolvedPyPyVersion}`
);
core.setOutput('python-path', pythonPath);
return {resolvedPyPyVersion, resolvedPythonVersion};

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es2021", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */