Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Start using Cirrus CI #24597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -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 [email protected] ccache ffmpeg ninja qt6
echo /opt/homebrew/opt/[email protected]/libexec/bin | sudo tee /etc/paths.d/brew
echo /opt/homebrew/opt/ccache/libexec | sudo tee -a /etc/paths.d/brew
brew link [email protected]
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"
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/tests/test_contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down