aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskari Pirhonen <xxc3ncoredxx@gmail.com>2023-10-30 21:50:01 -0500
committerSam James <sam@gentoo.org>2023-11-11 02:55:29 +0000
commit17212caaf8673b250de1502610120e5fc322cd53 (patch)
tree929d9811bc2aeab835194cd6f1d570e1210194e2 /.builds
parentebuild: add some missing newlines in errors (diff)
downloadportage-17212caaf8673b250de1502610120e5fc322cd53.tar.gz
portage-17212caaf8673b250de1502610120e5fc322cd53.tar.bz2
portage-17212caaf8673b250de1502610120e5fc322cd53.zip
sr.ht ci: small housekeeping
- use venvs again - use a separate native .ini for each python version - move meson setup into setup-tests - add (commented out) python 3.12 - print total elapsed test time for portage test suite Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to '.builds')
-rw-r--r--.builds/ci.yml16
1 files changed, 12 insertions, 4 deletions
diff --git a/.builds/ci.yml b/.builds/ci.yml
index 2c1659c84..0a4034e1c 100644
--- a/.builds/ci.yml
+++ b/.builds/ci.yml
@@ -12,6 +12,8 @@ environment:
- '3.9'
- '3.10'
- '3.11'
+ # Python 3.12 seems to (at least sometimes) timeout
+ # - '3.12'
# Testing PyPy is currently broken, see bug #903709
# - 'pypy3'
tasks:
@@ -21,18 +23,24 @@ tasks:
- setup-tests: |
sudo apt-get install -y --no-install-recommends meson
for py in "${PYTHON_VERSIONS[@]}"; do
+ source ".venv-$py/bin/activate"
# setuptools needed for 3.12+ because of https://github.com/mesonbuild/meson/issues/7702.
- ".venv-$py/bin/pip" install pytest setuptools
+ pip install pytest setuptools
+ printf "[binaries]\npython = '%s'\n" "$(command -v python)" \
+ | tee "/tmp/native-$py.ini"
+ meson setup --native-file "/tmp/native-$py.ini" "/tmp/build-$py" portage
+ deactivate
done
- test-install: |
for py in "${PYTHON_VERSIONS[@]}"; do
- echo -e "[binaries]\npython = '${PWD}/.venv-${py}/bin/python'" > /tmp/native.ini
- meson setup --native-file /tmp/native.ini "/tmp/build-$py" portage
- meson install -C "/tmp/build-$py"
+ time meson install -C "/tmp/build-$py"
done
- test-portage: |
+ start_time=$EPOCHSECONDS
for py in "${PYTHON_VERSIONS[@]}"; do
meson test -C "/tmp/build-$py" --verbose
done
+ end_time=$EPOCHSECONDS
+ printf "Total elapsed time: %d seconds\n" $((end_time - start_time))