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

Skip to content

Commit 27410c4

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

File tree

3 files changed

+125
-3
lines changed

3 files changed

+125
-3
lines changed

.cirrus.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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+
texlive \
34+
texlive-latex-extra \
35+
texlive-luatex \
36+
texlive-pictures \
37+
texlive-xetex \
38+
tk \
39+
xvfb
40+
fetch_tags_script: |
41+
git fetch --tags
42+
venv_script: |
43+
python3 --version
44+
python3 -m venv mpl-dev
45+
source mpl-dev/bin/activate
46+
python3 -m pip install --upgrade pip setuptools
47+
python_deps_script: |
48+
source mpl-dev/bin/activate
49+
python3 -m pip install --upgrade \
50+
'contourpy>=1.0.1' cycler fonttools kiwisolver importlib_resources \
51+
numpy packaging pillow pyparsing python-dateutil setuptools-scm \
52+
-r requirements/testing/all.txt -r requirements/testing/extra.txt
53+
build_script: |
54+
source mpl-dev/bin/activate
55+
python3 -m pip install -ve .
56+
test_script: |
57+
source mpl-dev/bin/activate
58+
python3 -mpytest -raR -n auto --junitxml=junit/test-results.xml \
59+
--maxfail=50 --timeout=300 --durations=25 \
60+
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
61+
always:
62+
junit_artifacts:
63+
path: "junit/test-results.xml"
64+
format: junit
65+
on_failure:
66+
compress_test_image_script:
67+
tar cf result_images.tar.gz result_images/
68+
test_image_artifacts:
69+
path: "result_images.tar.gz"
70+
71+
72+
macos_arm64_test_task:
73+
macos_instance:
74+
image: ghcr.io/cirruslabs/macos-ventura-xcode:14
75+
76+
name: "arm64 MacOS Python 3.10 test"
77+
skip: "changesIncludeOnly('doc/*')"
78+
env:
79+
CIRRUS_CLONE_DEPTH: 0
80+
81+
pip_cache:
82+
folder: ~/.cache/pip
83+
84+
os_deps_script: |
85+
brew update
86+
brew install [email protected] ffmpeg qt6 ccache
87+
echo /opt/homebrew/opt/[email protected]/libexec/bin | sudo tee /etc/paths.d/brew
88+
echo /opt/homebrew/opt/ccache/libexec | sudo tee -a /etc/paths.d/brew
89+
90+
brew install --cask mactex-no-gui
91+
fetch_tags_script: |
92+
git fetch --tags
93+
venv_script: |
94+
eval "$(/usr/libexec/path_helper)"
95+
python -m venv ~/mpl-dev
96+
source ~/mpl-dev/bin/activate
97+
python -m pip install --upgrade pip setuptools
98+
python_deps_script: |
99+
eval "$(/usr/libexec/path_helper)" && source ~/mpl-dev/bin/activate
100+
python -m pip install --upgrade \
101+
'contourpy>=1.0.1' cycler fonttools kiwisolver importlib_resources \
102+
numpy packaging pillow pyparsing python-dateutil setuptools-scm \
103+
-r requirements/testing/all.txt \
104+
-r requirements/testing/extra.txt \
105+
sphinx tk ipython pyqt6 pyside6
106+
build_script: |
107+
eval "$(/usr/libexec/path_helper)" && source ~/mpl-dev/bin/activate
108+
python -m pip install -ve .
109+
test_script: |
110+
eval "$(/usr/libexec/path_helper)" && source ~/mpl-dev/bin/activate
111+
python -mpytest -raR -n auto --junitxml=junit/test-results.xml \
112+
--maxfail=50 --timeout=300 --durations=25 \
113+
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
114+
always:
115+
junit_artifacts:
116+
path: "junit/test-results.xml"
117+
format: junit
118+
on_failure:
119+
compress_test_image_script:
120+
tar cf result_images.tar.gz result_images/
121+
test_image_artifacts:
122+
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
@@ -8723,7 +8723,8 @@ def test_zorder_and_explicit_rasterization():
87238723
fig.savefig(b, format='pdf')
87248724

87258725

8726-
@image_comparison(["preset_clip_paths.png"], remove_text=True, style="mpl20")
8726+
@image_comparison(["preset_clip_paths.png"], remove_text=True, style="mpl20",
8727+
tol=0.016 if platform.machine() in ('aarch64', ) else 0)
87278728
def test_preset_clip_paths():
87288729
fig, ax = plt.subplots()
87298730

lib/matplotlib/tests/test_contour.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,7 @@ def test_contourf_log_extension(split_collections):
383383
@pytest.mark.parametrize("split_collections", [False, True])
384384
@image_comparison(
385385
['contour_addlines.png'], remove_text=True, style='mpl20',
386-
tol=0.15 if platform.machine() in ('aarch64', 'ppc64le', 's390x')
387-
else 0.03)
386+
tol=0.15 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0.03)
388387
# tolerance is because image changed minutely when tick finding on
389388
# colorbars was cleaned up...
390389
def test_contour_addlines(split_collections):

0 commit comments

Comments
 (0)