mirror of
https://github.com/actions/setup-python.git
synced 2026-01-20 04:38:56 +08:00
add check-latest for pypy
This commit is contained in:
parent
58a8109aea
commit
8723b8aa5a
8 changed files with 165 additions and 31 deletions
|
|
@ -34,17 +34,18 @@ async function run() {
|
|||
}
|
||||
try {
|
||||
const version = core.getInput('python-version');
|
||||
const checkLatest = core.getBooleanInput('check-latest');
|
||||
if (version) {
|
||||
let pythonVersion: string;
|
||||
const arch: string = core.getInput('architecture') || os.arch();
|
||||
if (isPyPyVersion(version)) {
|
||||
const installed = await finderPyPy.findPyPyVersion(version, arch);
|
||||
const installed = await finderPyPy.findPyPyVersion(version, arch, checkLatest);
|
||||
pythonVersion = `${installed.resolvedPyPyVersion}-${installed.resolvedPythonVersion}`;
|
||||
core.info(
|
||||
`Successfully set up PyPy ${installed.resolvedPyPyVersion} with Python (${installed.resolvedPythonVersion})`
|
||||
);
|
||||
} else {
|
||||
const installed = await finder.useCpythonVersion(version, arch);
|
||||
const installed = await finder.useCpythonVersion(version, arch, checkLatest);
|
||||
pythonVersion = installed.version;
|
||||
core.info(`Successfully set up ${installed.impl} (${pythonVersion})`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue