Skip to content

Commit dc7ef61

Browse files
CI Migrate Linux ARM job to CirrusCI (#25366)
* CI Migrate Linux ARM job to CirrusCI * CI Completely remove linux-arm reference from circleci * CI Add noop job so circleci works * DOC Update comment in circleci config * Apply suggestions from code review Co-authored-by: Julien Jerphanion <git@jjerphan.xyz> Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
1 parent 2fd6e34 commit dc7ef61

7 files changed

+42
-27
lines changed

.circleci/config.yml

+13-23
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,6 @@ jobs:
3737
root: doc/_build/html
3838
paths: .
3939

40-
linux-arm64:
41-
machine:
42-
image: ubuntu-2004:202101-01
43-
resource_class: arm.medium
44-
environment:
45-
- OMP_NUM_THREADS: 2
46-
- OPENBLAS_NUM_THREADS: 2
47-
- CONDA_ENV_NAME: testenv
48-
- LOCK_FILE: build_tools/circle/py39_conda_forge_linux-aarch64_conda.lock
49-
steps:
50-
- checkout
51-
- run: ./build_tools/circle/checkout_merge_commit.sh
52-
- restore_cache:
53-
key: linux-arm64-{{ .Branch }}
54-
- run: ./build_tools/circle/build_test_arm.sh
55-
- save_cache:
56-
key: linux-arm64-{{ .Branch }}
57-
paths:
58-
- ~/.cache/ccache
59-
- ~/.cache/pip
60-
- ~/scikit_learn_data
6140
deploy:
6241
docker:
6342
- image: cimg/python:3.8.12
@@ -75,6 +54,17 @@ jobs:
7554
bash build_tools/circle/push_doc.sh doc/_build/html/stable
7655
fi
7756
57+
# This noop job is required for the pipeline to exist, so that the
58+
# documentation related jobs can be triggered.
59+
noop:
60+
docker:
61+
- image: cimg/python:3.8.12
62+
steps:
63+
- run: |
64+
echo "This is no-op job for the pipeline to exist, so that it triggers "
65+
echo "Circle CI jobs pushing the artifacts of the documentation built "
66+
echo "via GitHub actions."
67+
7868
workflows:
7969
version: 2
8070

@@ -90,10 +80,10 @@ workflows:
9080
requires:
9181
- doc
9282

93-
linux-arm64:
83+
noop:
9484
when:
9585
equal: [ "none", << pipeline.parameters.GITHUB_RUN_URL >> ]
9686
# Prevent double execution of this job: on push
9787
# by default and when triggered by the workflow
9888
jobs:
99-
- linux-arm64
89+
- noop

.cirrus.star

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def main(ctx):
1010
return []
1111

1212
arm_wheel_yaml = "build_tools/cirrus/arm_wheel.yml"
13+
arm_tests_yaml = "build_tools/cirrus/arm_tests.yml"
1314

1415
# Nightly jobs always run
1516
if env.get("CIRRUS_CRON", "") == "nightly":
@@ -25,7 +26,10 @@ def main(ctx):
2526
response = http.get(url).json()
2627
commit_msg = response["message"]
2728

28-
if "[skip ci]" in commit_msg or ("[cd build]" not in commit_msg and "[cd build cirrus]" not in commit_msg):
29+
if "[skip ci]" in commit_msg:
2930
return []
3031

31-
return fs.read(arm_wheel_yaml)
32+
if "[cd build]" in commit_msg or "[cd build cirrus]" in commit_msg:
33+
return fs.read(arm_wheel_yaml)
34+
35+
return fs.read(arm_tests_yaml)

build_tools/cirrus/arm_tests.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
linux_aarch64_test_task:
2+
compute_engine_instance:
3+
image_project: cirrus-images
4+
image: family/docker-builder-arm64
5+
architecture: arm64
6+
platform: linux
7+
cpu: 4
8+
memory: 6G
9+
env:
10+
CONDA_ENV_NAME: testenv
11+
OMP_NUM_THREADS: 2
12+
OPENBLAS_NUM_THREADS: 2
13+
LOCK_FILE: build_tools/cirrus/py39_conda_forge_linux-aarch64_conda.lock
14+
CONDA_PKGS_DIRS: /root/.conda/pkgs
15+
ccache_cache:
16+
folder: /root/.cache/ccache
17+
conda_cache:
18+
folder: /root/.conda/pkgs
19+
fingerprint_script: cat build_tools/cirrus/py39_conda_forge_linux-aarch64_conda.lock
20+
21+
test_script: bash build_tools/cirrus/build_test_arm.sh

build_tools/circle/py39_conda_forge_linux-aarch64_conda.lock renamed to build_tools/cirrus/py39_conda_forge_linux-aarch64_conda.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ https://conda.anaconda.org/conda-forge/noarch/pytest-forked-1.4.0-pyhd8ed1ab_1.t
9696
https://conda.anaconda.org/conda-forge/linux-aarch64/matplotlib-3.6.2-py39ha65689a_0.tar.bz2#b4d712f422b5dad5259f38151be6f492
9797
https://conda.anaconda.org/conda-forge/noarch/pyopenssl-23.0.0-pyhd8ed1ab_0.conda#d41957700e83bbb925928764cb7f8878
9898
https://conda.anaconda.org/conda-forge/noarch/pytest-xdist-2.5.0-pyhd8ed1ab_0.tar.bz2#1fdd1f3baccf0deb647385c677a1a48e
99-
https://conda.anaconda.org/conda-forge/noarch/urllib3-1.26.13-pyhd8ed1ab_0.conda#3078ef2359efd6ecadbc7e085c5e0592
99+
https://conda.anaconda.org/conda-forge/noarch/urllib3-1.26.14-pyhd8ed1ab_0.conda#01f33ad2e0aaf6b5ba4add50dad5ad29
100100
https://conda.anaconda.org/conda-forge/noarch/requests-2.28.1-pyhd8ed1ab_1.tar.bz2#089382ee0e2dc2eae33a04cc3c2bddb0
101101
https://conda.anaconda.org/conda-forge/noarch/pooch-1.6.0-pyhd8ed1ab_0.tar.bz2#6429e1d1091c51f626b5dcfdd38bf429
102102
https://conda.anaconda.org/conda-forge/linux-aarch64/scipy-1.10.0-py39hafab3e7_0.conda#65d57c881ae668b5372bb6ad5e08bb78

build_tools/update_environments_and_lock_files.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def remove_from(alist, to_remove):
299299
},
300300
{
301301
"build_name": "py39_conda_forge",
302-
"folder": "build_tools/circle",
302+
"folder": "build_tools/cirrus",
303303
"platform": "linux-aarch64",
304304
"channel": "conda-forge",
305305
"conda_dependencies": remove_from(

0 commit comments

Comments
 (0)