Skip to content

Adding support for more PyPy versions and installing them on-flight#168

Merged
konradpabjan merged 7 commits into
actions:mainfrom
dmitry-shibanov:v-dmshib/add-pypy-installation
Dec 17, 2020
Merged

Adding support for more PyPy versions and installing them on-flight#168
konradpabjan merged 7 commits into
actions:mainfrom
dmitry-shibanov:v-dmshib/add-pypy-installation

Conversation

@dmitry-shibanov

@dmitry-shibanov dmitry-shibanov commented Dec 14, 2020

Copy link
Copy Markdown
Contributor

Description

This pull-request adds support for specifying PyPy via PyPy version and Python version.
Closes #136 and #17

Supported input syntax

The new supported syntax:

pypy-3.6-v7.3.3
pypy-3.6-v7.3.x
pypy-3.6-v7.x
pypy-3.6 (pypy-3.7, pypy-2.7) (points to latest version of PyPy)
pypy-3.6-v7.3.3rc1
pypy-3.6-nightly

Also, we keep old syntax for backward compatibility:

pypy2 # (points to 2.7)
pypy3 # (points to 3.6)

We don't have plans to deprecate and we are going to keep them for now.

Technical points

The list of available versions

Current implementation uses the list of available versions from https://downloads.python.org/pypy/versions.json
It was discussed and confirmed with PyPy team: https://foss.heptapod.net/pypy/pypy/-/issues/3354

Storing exact version of PyPy in "PYPY_VERSION" file in PyPy folder

Currently, PyPy versions are saved in toolcache. Toolcache has the following structure <toolcache_root>/PyPy/<python_version>/x64.
So it is not possible to determine from path what version of PyPy is located in folder. For example, on machine, we have PyPy 7.3.1 with python 3.6 in toolcache on path <toolcache_root>/PyPy/3.6/x64. We need some way to determine what version of PyPy in this folder.
We have consider calling pypy --version and parsing output but this approach doesn't work for RC versions because pypy --version doesn't show exact RC number in output.
We have decided to write exact installed version in file and put it to PyPy folder. This approach works perfectly and it is faster than parsing output. These files will be added to Hosted images in a few weeks.
The single drawback, action won't consume PyPy that was installed manually without this action.

Installation time

  • MacOS: 20 seconds
  • Ubuntu: 13 seconds
  • Windows: 40-55 seconds
  • All versions of Python for the latest PyPy will be cached on image and updated with a week delay.

Support of RC and nightly versions

  • The RC versions and nightly versions are also supported.
  • Nightly versions are not saved in local cache and always downloaded and installed for now

Self-hosted agents

This action also supports self-hosted agents and works on them

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support PyPy3.7 separate from PyPy3.6

9 participants