mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
[Ubuntu] Slight rework of the PyPy installation (#4381)
This commit is contained in:
@@ -74,14 +74,14 @@ function InstallPyPy
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Installation PyPy
|
# Installation PyPy
|
||||||
uri="https://downloads.python.org/pypy/"
|
pypyVersions=$(curl https://downloads.python.org/pypy/versions.json)
|
||||||
download_with_retries $uri "/tmp" "pypyUrls.html" compressed
|
|
||||||
pypyVersions="$(cat /tmp/pypyUrls.html | grep 'linux64' | awk -v uri="$uri" -F'>|<' '{print uri$5}')"
|
|
||||||
toolsetVersions=$(get_toolset_value '.toolcache[] | select(.name | contains("PyPy")) | .versions[]')
|
toolsetVersions=$(get_toolset_value '.toolcache[] | select(.name | contains("PyPy")) | .versions[]')
|
||||||
|
|
||||||
for toolsetVersion in $toolsetVersions; do
|
for toolsetVersion in $toolsetVersions; do
|
||||||
latestMajorPyPyVersion=$(echo "${pypyVersions}" | grep -E "pypy${toolsetVersion}-v[0-9]+\.[0-9]+\.[0-9]+-" | head -1)
|
latestMajorPyPyVersion=$(echo $pypyVersions |
|
||||||
|
jq -r --arg toolsetVersion $toolsetVersion '.[]
|
||||||
|
| select((.python_version | startswith($toolsetVersion)) and .stable == true).files[]
|
||||||
|
| select(.arch == "x64" and .platform == "linux").download_url' | head -1)
|
||||||
if [[ -z "$latestMajorPyPyVersion" ]]; then
|
if [[ -z "$latestMajorPyPyVersion" ]]; then
|
||||||
echo "Failed to get PyPy version '$toolsetVersion'"
|
echo "Failed to get PyPy version '$toolsetVersion'"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user