Skip to content

Commit 02a6088

Browse files
authored
BLD: Build arm64 wheels on CircleCI (#48952)
* REF: Refactor cibuildwheel logic into pyproject.toml * BLD: Build arm64 wheels on CircleCI * Update wheels.yml * Update config.yml * fix syntax * fix typo * Update config.yml * define parameters * fix shell script syntax * try to run less * Update config.yml * Update config.yml * Update config.yml
1 parent 783a68e commit 02a6088

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.circleci/config.yml

+60
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,68 @@ jobs:
1818
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
1919
LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD
2020
ci/run_tests.sh
21+
build-aarch64:
22+
parameters:
23+
cibw-build:
24+
type: string
25+
machine:
26+
image: ubuntu-2004:202101-01
27+
resource_class: arm.large
28+
environment:
29+
TAG = << pipeline.git.tag >>
30+
TRIGGER_SOURCE = << pipeline.trigger_source >>
31+
steps:
32+
- checkout
33+
- run:
34+
name: Check if build is necessary
35+
command: |
36+
# Check if tag is defined or TRIGGER_SOURCE is scheduled
37+
if [[ -n ${TAG} ]]; then
38+
export IS_PUSH="true"
39+
elif [[ $TRIGGER_SOURCE == "scheduled_pipeline" ]]; then
40+
export IS_SCHEDULE_DISPATCH="true"
41+
# Look for the build label/[wheel build] in commit
42+
elif (git log --format=oneline -n 1 $CIRCLE_SHA1) | grep -q '[wheel build]'; then
43+
: # Do nothing
44+
elif ! (curl https://api.github.com/repos/pandas-dev/pandas/issues/$CIRCLE_PR_NUMBER | jq '.labels' | grep -q 'Build'); then
45+
circleci-agent step halt
46+
fi
47+
- run:
48+
name: Build aarch64 wheels
49+
command: |
50+
pip3 install cibuildwheel==2.9.0
51+
cibuildwheel --output-dir wheelhouse
52+
environment:
53+
CIBW_BUILD: << parameters.cibw-build >>
54+
- run:
55+
name: Upload wheels
56+
command: |
57+
if [[ -n ${TAG} ]]; then
58+
export IS_PUSH="true"
59+
fi
60+
if [[ $TRIGGER_SOURCE == "scheduled_pipeline" ]]; then
61+
export IS_SCHEDULE_DISPATCH="true"
62+
fi
63+
source ci/upload_wheels.sh
64+
set_upload_vars
65+
upload_wheels
66+
- store_artifacts:
67+
path: wheelhouse/
2168

2269
workflows:
2370
test:
71+
# Don't run trigger this one when scheduled pipeline runs
72+
when:
73+
not:
74+
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
2475
jobs:
2576
- test-arm
77+
build-wheels:
78+
jobs:
79+
- build-aarch64:
80+
filters:
81+
tags:
82+
only: /^v.*/
83+
matrix:
84+
parameters:
85+
cibw-build: ["cp38-manylinux_aarch64", "cp39-manylinux_aarch64", "cp310-manylinux_aarch64", "cp311-manylinux_aarch64"]

0 commit comments

Comments
 (0)