|
18 | 18 | PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
|
19 | 19 | LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD
|
20 | 20 | 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/ |
21 | 68 |
|
22 | 69 | workflows:
|
23 | 70 | test:
|
| 71 | + # Don't run trigger this one when scheduled pipeline runs |
| 72 | + when: |
| 73 | + not: |
| 74 | + equal: [ scheduled_pipeline, << pipeline.trigger_source >> ] |
24 | 75 | jobs:
|
25 | 76 | - 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