-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
/
Copy pathconfig.yml
160 lines (151 loc) · 6.43 KB
/
config.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
version: 2.1
jobs:
test-arm:
machine:
image: default
resource_class: arm.large
environment:
ENV_FILE: ci/deps/circle-310-arm64.yaml
PYTEST_WORKERS: auto
PATTERN: "not single_cpu and not slow and not network and not clipboard and not arm_slow and not db"
PYTEST_TARGET: "pandas/tests"
PANDAS_CI: "1"
steps:
- checkout
- run: .circleci/setup_env.sh
- run: >
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD
ci/run_tests.sh
linux-musl:
docker:
- image: quay.io/pypa/musllinux_1_1_aarch64
resource_class: arm.large
steps:
# Install pkgs first to have git in the image
# (needed for checkout)
- run: |
apk update
apk add git
apk add musl-locales
- checkout
- run: |
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
. ~/virtualenvs/pandas-dev/bin/activate
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
python -m pip list --no-cache-dir
- run: |
. ~/virtualenvs/pandas-dev/bin/activate
export PANDAS_CI=1
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas/tests --junitxml=test-data.xml
build-aarch64:
parameters:
cibw-build:
type: string
machine:
image: default
resource_class: arm.large
environment:
TRIGGER_SOURCE: << pipeline.trigger_source >>
steps:
- checkout
- run:
name: Check if build is necessary
command: |
# Check if tag is defined or TRIGGER_SOURCE is scheduled
if [[ -n "$CIRCLE_TAG" ]]; then
echo 'export IS_PUSH="true"' >> "$BASH_ENV"
elif [[ $TRIGGER_SOURCE == "scheduled_pipeline" ]]; then
echo 'export IS_SCHEDULE_DISPATCH="true"' >> "$BASH_ENV"
# Look for the build label/[wheel build] in commit
# grep takes a regex, so need to escape brackets
elif (git log --format=oneline -n 1 $CIRCLE_SHA1) | grep -q '\[wheel build\]'; then
: # Do nothing
elif ! (curl https://api.github.com/repos/pandas-dev/pandas/issues/$CIRCLE_PR_NUMBER | jq '.labels' | grep -q 'Build'); then
circleci-agent step halt
fi
- run:
# The process here is more complicated than on Github Actions
# since we need to copy the tests wheel into the unzipped sdist
# so that it gets copied (along with the contents of the unzipped sdist)
# into the Linux docker image used for building the wheel
# (unlike Github Actions there is no host access using cibuildwheel with CircleCI)
name: Build the sdist
command: |
pip3 install build setuptools-scm wheel
python3 -m build --sdist
sdist_name=$(ls ./dist/*.tar.gz)
mkdir unzipped-sdist
tar -xzf $sdist_name -C unzipped-sdist --strip-components=1
cd pandas
# Have to disable isolation otherwise
# we won't be able to pull the version correctly
python3 -m build --wheel --no-isolation --outdir ../unzipped-sdist
cd ..
echo "sdist_name=./unzipped-sdist" >> "$BASH_ENV"
echo "pandas_tests_loc=$(ls ./unzipped-sdist/*.whl)" >> "$BASH_ENV"
ls ./unzipped-sdist/*.whl
- run:
name: Build aarch64 wheels
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
command: |
pip3 install cibuildwheel==2.15.0
# When this is a nightly wheel build, allow picking up NumPy 2.0 dev wheels:
if [[ "$IS_SCHEDULE_DISPATCH" == "true" || "$IS_PUSH" != 'true' ]]; then
export CIBW_ENVIRONMENT="PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
fi
export CIBW_BEFORE_TEST="pip install {project}/${pandas_tests_loc}"
cibuildwheel ${sdist_name} --prerelease-pythons --output-dir wheelhouse
environment:
CIBW_BUILD: << parameters.cibw-build >>
- run:
name: Install Anaconda Client & Upload Wheels
command: |
echo "Install Mambaforge"
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/23.1.0-0/Mambaforge-23.1.0-0-Linux-aarch64.sh"
echo "Downloading $MAMBA_URL"
wget -q $MAMBA_URL -O minimamba.sh
chmod +x minimamba.sh
MAMBA_DIR="$HOME/miniconda3"
rm -rf $MAMBA_DIR
./minimamba.sh -b -p $MAMBA_DIR
export PATH=$MAMBA_DIR/bin:$PATH
mamba install -y -c conda-forge anaconda-client
source ci/upload_wheels.sh
set_upload_vars
upload_wheels
- store_artifacts:
path: wheelhouse/
workflows:
test:
# Don't run trigger this one when scheduled pipeline runs
when:
not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
jobs:
- test-arm
test-musl:
# Don't run trigger this one when scheduled pipeline runs
when:
not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
jobs:
- linux-musl
build-wheels:
jobs:
- build-aarch64:
filters:
tags:
only: /^v.*/
matrix:
parameters:
cibw-build: ["cp39-manylinux_aarch64",
"cp310-manylinux_aarch64",
"cp311-manylinux_aarch64",
"cp312-manylinux_aarch64",
"cp39-musllinux_aarch64",
"cp310-musllinux_aarch64",
"cp311-musllinux_aarch64",
"cp312-musllinux_aarch64",]