poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Add caching for cirrus ci tasks

Open abn opened this issue 5 years ago • 2 comments

Initual ci support for freebsd was handled in #2297 and #2309. The support for caching was dropped due to inconsistencies in behaviour.

Fom https://github.com/python-poetry/poetry/pull/2311#discussion_r409115317

From what I can tell, the issue probably has to do with how the virtual environment creation is done on FreeBSD systems either due to the system python package itself or how cirrus-ci sets up the build environment.

The primary difference, outside of platform specifics, in py3.7 and py2.7 virutal environment creation is the use of the built-in venv module and external virtualenv package respectively. I am aware that the newer versions of behave differently to the built-in module in that on systems like FreeBSD, the lib64 directory is not a symlink to the lib directory.

In the case of py3.7, a cache hit as no effect (ie. packages are downloaded again) and in the case of py2.7 a cache hit causes the test suite to fail as mentioned above.

Sample snippet:

  venv_cache:
    folder: ".venv"
    fingerprint_script: echo freebsd-$($PYTHON -c "import sys; print('-'.join(str(v) for v in sys.version_info))")-$(sha512 poetry.lock)
  deps_script: |
    $PYTHON -m poetry run pip --version >/dev/null 2>&1 || rm -vrf .venv
    $PYTHON -m poetry install

abn avatar Apr 16 '20 22:04 abn

@finswimmer not sure if this was completed.

abn avatar May 24 '22 08:05 abn

@neersighted I think you were doing something around Cirrus recently.

Secrus avatar Dec 16 '22 20:12 Secrus