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

Skip to content

Commit 085b47d

Browse files
oscargusQuLogic
andcommitted
Start using Cirrus CI
Co-authored-by: Elliott Sales de Andrade <[email protected]>
1 parent d3144b1 commit 085b47d

File tree

3 files changed

+127
-3
lines changed

3 files changed

+127
-3
lines changed

.cirrus.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
linux_aarch64_test_task:
3+
arm_container:
4+
image: python:3.11-slim
5+
cpu: 4
6+
memory: 12G
7+
8+
name: "aarch64 Linux Python 3.11 test"
9+
skip: "changesIncludeOnly('doc/*')"
10+
env:
11+
CIRRUS_CLONE_DEPTH: 0
12+
13+
pip_cache:
14+
folder: ~/.cache/pip
15+
16+
os_deps_script: |
17+
apt-get update
18+
apt-get install -yy --no-install-recommends \
19+
ccache \
20+
cm-super \
21+
dvipng \
22+
ffmpeg \
23+
fonts-dejavu \
24+
fonts-freefont-otf \
25+
fonts-noto-cjk \
26+
g++ \
27+
gcc \
28+
ghostscript \
29+
git \
30+
inkscape \
31+
lmodern \
32+
make \
33+
ninja-build \
34+
texlive \
35+
texlive-latex-extra \
36+
texlive-luatex \
37+
texlive-pictures \
38+
texlive-xetex \
39+
tk \
40+
xvfb
41+
fetch_tags_script: |
42+
git fetch --tags
43+
venv_script: |
44+
python3 --version
45+
python3 -m venv mpl-dev
46+
source mpl-dev/bin/activate
47+
python3 -m pip install --upgrade pip setuptools
48+
python_deps_script: |
49+
source mpl-dev/bin/activate
50+
python3 -m pip install --upgrade \
51+
'contourpy>=1.0.1' cycler fonttools kiwisolver importlib_resources \
52+
numpy packaging pillow 'pyparsing!=3.1.0' python-dateutil setuptools-scm \
53+
'meson-python>=0.13.1' 'pybind11>=2.6' \
54+
-r requirements/testing/all.txt -r requirements/testing/extra.txt
55+
build_script: |
56+
source mpl-dev/bin/activate
57+
python3 -m pip install --verbose --no-build-isolation --editable .
58+
test_script: |
59+
source mpl-dev/bin/activate
60+
python3 -mpytest -raR -n auto --junitxml=junit/test-results.xml \
61+
--maxfail=50 --timeout=300 --durations=25 \
62+
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
63+
always:
64+
junit_artifacts:
65+
path: "junit/test-results.xml"
66+
format: junit
67+
on_failure:
68+
compress_test_image_script:
69+
tar cf result_images.tar.gz result_images/
70+
test_image_artifacts:
71+
path: "result_images.tar.gz"
72+
73+
74+
macos_arm64_test_task:
75+
macos_instance:
76+
image: ghcr.io/cirruslabs/macos-ventura-xcode:14
77+
78+
name: "arm64 MacOS Python 3.10 test"
79+
skip: "changesIncludeOnly('doc/*')"
80+
env:
81+
CIRRUS_CLONE_DEPTH: 0
82+
83+
pip_cache:
84+
folder: ~/.cache/pip
85+
86+
os_deps_script: |
87+
brew update
88+
brew install [email protected] ccache ffmpeg ninja qt6
89+
echo /opt/homebrew/opt/[email protected]/libexec/bin | sudo tee /etc/paths.d/brew
90+
echo /opt/homebrew/opt/ccache/libexec | sudo tee -a /etc/paths.d/brew
91+
92+
brew install --cask mactex-no-gui
93+
fetch_tags_script: |
94+
git fetch --tags
95+
venv_script: |
96+
eval "$(/usr/libexec/path_helper)"
97+
python -m venv ~/mpl-dev
98+
source ~/mpl-dev/bin/activate
99+
python -m pip install --upgrade pip setuptools
100+
python_deps_script: |
101+
eval "$(/usr/libexec/path_helper)" && source ~/mpl-dev/bin/activate
102+
python -m pip install --upgrade \
103+
'contourpy>=1.0.1' cycler fonttools kiwisolver importlib_resources \
104+
numpy packaging pillow 'pyparsing!=3.1.0' python-dateutil setuptools-scm \
105+
'meson-python>=0.13.1' 'pybind11>=2.6' \
106+
-r requirements/testing/all.txt -r requirements/testing/extra.txt \
107+
sphinx tk ipython pyqt6 pyside6
108+
build_script: |
109+
eval "$(/usr/libexec/path_helper)" && source ~/mpl-dev/bin/activate
110+
python -m pip install --verbose --no-build-isolation --editable .
111+
test_script: |
112+
eval "$(/usr/libexec/path_helper)" && source ~/mpl-dev/bin/activate
113+
python -mpytest -raR -n auto --junitxml=junit/test-results.xml \
114+
--maxfail=50 --timeout=300 --durations=25 \
115+
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
116+
always:
117+
junit_artifacts:
118+
path: "junit/test-results.xml"
119+
format: junit
120+
on_failure:
121+
compress_test_image_script:
122+
tar cf result_images.tar.gz result_images/
123+
test_image_artifacts:
124+
path: "result_images.tar.gz"

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8748,7 +8748,8 @@ def test_zorder_and_explicit_rasterization():
87488748
fig.savefig(b, format='pdf')
87498749

87508750

8751-
@image_comparison(["preset_clip_paths.png"], remove_text=True, style="mpl20")
8751+
@image_comparison(["preset_clip_paths.png"], remove_text=True, style="mpl20",
8752+
tol=0.016 if platform.machine() in ('aarch64', ) else 0)
87528753
def test_preset_clip_paths():
87538754
fig, ax = plt.subplots()
87548755

lib/matplotlib/tests/test_contour.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,7 @@ def test_contourf_log_extension(split_collections):
441441
@pytest.mark.parametrize("split_collections", [False, True])
442442
@image_comparison(
443443
['contour_addlines.png'], remove_text=True, style='mpl20',
444-
tol=0.15 if platform.machine() in ('aarch64', 'ppc64le', 's390x')
445-
else 0.03)
444+
tol=0.15 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0.03)
446445
# tolerance is because image changed minutely when tick finding on
447446
# colorbars was cleaned up...
448447
def test_contour_addlines(split_collections):

0 commit comments

Comments
 (0)