forked from contourpy/contourpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
74 lines (65 loc) · 1.92 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
linux_aarch64_test_task:
name: "Cirrus linux aarch64 ${PYTHON_VERSION} ${IMAGE_SUFFIX}"
only_if: $CIRRUS_BRANCH != "main"
arm_container:
# https://hub.docker.com/_/python/
image: python:${PYTHON_VERSION}-${IMAGE_SUFFIX}
matrix:
- env:
PYTHON_VERSION: "3.12"
IMAGE_SUFFIX: slim
BUILD_NUMPY: 0
TEST_NO_IMAGES: 0
#- env:
# PYTHON_VERSION: "3.12"
# IMAGE_SUFFIX: alpine
# BUILD_NUMPY: 1
# TEST_NO_IMAGES: 1
os_dependencies_script: |
if [[ "$IMAGE_SUFFIX" != "alpine" ]];
then
apt update;
apt install -yy g++;
else
apk update;
apk add build-base;
fi
python_venv_script: |
which python
python --version
python -m pip install --upgrade pip
python -m venv venv
source venv/bin/activate
install_numpy_from_source_script:
if [[ "$BUILD_NUMPY" == "1" ]];
then
python -m pip install -v --no-binary=numpy numpy;
fi
install_contourpy_script: |
if [[ "$TEST_NO_IMAGES" ]];
then
python -m pip install -v .[test-no-images] -Cbuilddir=build;
else
python -m pip install -v .[test] -Cbuilddir=build;
fi
python -m pip list
python -c "from contourpy.util import build_config; from pprint import pprint; pprint(build_config())"
run_tests_script: |
if [[ "$TEST_NO_IMAGES" ]];
then
python -m pytest -v tests/ --log-image-diffs -k "not image";
#python -m pytest -v tests/ -n 2 --log-image-diffs -k "not image";
else
python -m pytest -v tests/ --log-image-diffs;
#python -m pytest -v tests/ -n 2 --log-image-diffs;
fi
always:
collect_test_image_failures_script: |
if [[ -e result_images ]]
then
DIR="test-artifacts/cirrus_linux_aarch64_${IMAGE_SUFFIX}_${PYTHON_VERSION}";
mkdir -p "${DIR}";
mv result_images/* "${DIR}/";
fi
upload_test_artifacts:
path: test-artifacts/**