From e37022e4145edf07711c6d4b92fe1e6a6417f900 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Sat, 3 Dec 2022 13:12:18 +0100 Subject: [PATCH] Start using Cirrus CI Co-authored-by: Elliott Sales de Andrade --- .cirrus.yml | 124 +++++++++++++++++++++++++++ lib/matplotlib/tests/test_axes.py | 3 +- lib/matplotlib/tests/test_contour.py | 3 +- 3 files changed, 127 insertions(+), 3 deletions(-) create mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 000000000000..86b093560b43 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,124 @@ +--- +linux_aarch64_test_task: + arm_container: + image: python:3.11-slim + cpu: 4 + memory: 12G + + name: "aarch64 Linux Python 3.11 test" + skip: "changesIncludeOnly('doc/*')" + env: + CIRRUS_CLONE_DEPTH: 0 + + pip_cache: + folder: ~/.cache/pip + + os_deps_script: | + apt-get update + apt-get install -yy --no-install-recommends \ + ccache \ + cm-super \ + dvipng \ + ffmpeg \ + fonts-dejavu \ + fonts-freefont-otf \ + fonts-noto-cjk \ + g++ \ + gcc \ + ghostscript \ + git \ + inkscape \ + lmodern \ + make \ + ninja-build \ + texlive \ + texlive-latex-extra \ + texlive-luatex \ + texlive-pictures \ + texlive-xetex \ + tk \ + xvfb + fetch_tags_script: | + git fetch --tags + venv_script: | + python3 --version + python3 -m venv mpl-dev + source mpl-dev/bin/activate + python3 -m pip install --upgrade pip setuptools + python_deps_script: | + source mpl-dev/bin/activate + python3 -m pip install --upgrade \ + 'contourpy>=1.0.1' cycler fonttools kiwisolver importlib_resources \ + numpy packaging pillow 'pyparsing!=3.1.0' python-dateutil setuptools-scm \ + 'meson-python>=0.13.1' 'pybind11>=2.6' \ + -r requirements/testing/all.txt -r requirements/testing/extra.txt + build_script: | + source mpl-dev/bin/activate + python3 -m pip install --verbose --no-build-isolation --editable . + test_script: | + source mpl-dev/bin/activate + pytest -raR -n auto --junitxml=junit/test-results.xml \ + --maxfail=50 --timeout=300 --durations=25 \ + --cov-report=xml --cov=lib --log-level=DEBUG --color=yes + always: + junit_artifacts: + path: "junit/test-results.xml" + format: junit + on_failure: + compress_test_image_script: + tar cf result_images.tar.gz result_images/ + test_image_artifacts: + path: "result_images.tar.gz" + + +macos_arm64_test_task: + macos_instance: + image: ghcr.io/cirruslabs/macos-ventura-xcode:14 + + name: "arm64 MacOS Python 3.10 test" + skip: "changesIncludeOnly('doc/*')" + env: + CIRRUS_CLONE_DEPTH: 0 + + pip_cache: + folder: ~/.cache/pip + + os_deps_script: | + brew update + brew install python-tk@3.10 ccache ffmpeg ninja qt6 + echo /opt/homebrew/opt/python@3.10/libexec/bin | sudo tee /etc/paths.d/brew + echo /opt/homebrew/opt/ccache/libexec | sudo tee -a /etc/paths.d/brew + brew link python-tk@3.10 + brew install --cask mactex-no-gui + fetch_tags_script: | + git fetch --tags + venv_script: | + eval "$(/usr/libexec/path_helper)" + python -m venv ~/mpl-dev + source ~/mpl-dev/bin/activate + python -m pip install --upgrade pip setuptools + python_deps_script: | + eval "$(/usr/libexec/path_helper)" && source ~/mpl-dev/bin/activate + python -m pip install --upgrade \ + 'contourpy>=1.0.1' cycler fonttools kiwisolver importlib_resources \ + numpy packaging pillow 'pyparsing!=3.1.0' python-dateutil setuptools-scm \ + 'meson-python>=0.13.1' 'pybind11>=2.6' \ + -r requirements/testing/all.txt -r requirements/testing/extra.txt \ + sphinx tk ipython pyqt6 pyside6 + build_script: | + eval "$(/usr/libexec/path_helper)" && source ~/mpl-dev/bin/activate + python -m pip install --verbose --no-build-isolation --editable . + test_script: | + eval "$(/usr/libexec/path_helper)" && source ~/mpl-dev/bin/activate + pytest -raR -n auto --junitxml=junit/test-results.xml \ + --maxfail=50 --timeout=300 --durations=25 \ + --cov-report=xml --cov=lib --log-level=DEBUG --color=yes + always: + junit_artifacts: + path: "junit/test-results.xml" + format: junit + on_failure: + compress_test_image_script: + tar cf result_images.tar.gz result_images/ + test_image_artifacts: + path: "result_images.tar.gz" diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 530fddf127a8..9e285cb08acd 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -8748,7 +8748,8 @@ def test_zorder_and_explicit_rasterization(): fig.savefig(b, format='pdf') -@image_comparison(["preset_clip_paths.png"], remove_text=True, style="mpl20") +@image_comparison(["preset_clip_paths.png"], remove_text=True, style="mpl20", + tol=0.016 if platform.machine() in ('aarch64', ) else 0) def test_preset_clip_paths(): fig, ax = plt.subplots() diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py index f79584be4086..7d1faeccf7fe 100644 --- a/lib/matplotlib/tests/test_contour.py +++ b/lib/matplotlib/tests/test_contour.py @@ -441,8 +441,7 @@ def test_contourf_log_extension(split_collections): @pytest.mark.parametrize("split_collections", [False, True]) @image_comparison( ['contour_addlines.png'], remove_text=True, style='mpl20', - tol=0.15 if platform.machine() in ('aarch64', 'ppc64le', 's390x') - else 0.03) + tol=0.15 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0.03) # tolerance is because image changed minutely when tick finding on # colorbars was cleaned up... def test_contour_addlines(split_collections): pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy