Skip to content

Commit

Permalink
CI Migrate ARM tests to Github Actions (scikit-learn#30797)
Browse files Browse the repository at this point in the history
Co-authored-by: Loïc Estève <[email protected]>
  • Loading branch information
thomasjpfan and lesteve authored Feb 11, 2025
1 parent 9523006 commit 4ec5f69
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 117 deletions.
33 changes: 0 additions & 33 deletions .cirrus.star

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/arm-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Unit test for ARM
permissions:
contents: read

on:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
if: github.repository == 'scikit-learn/scikit-learn'

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install linters
run: |
source build_tools/shared.sh
# Include pytest compatibility with mypy
pip install pytest $(get_dep ruff min) $(get_dep mypy min) $(get_dep black min) cython-lint
- name: Run linters
run: ./build_tools/linting.sh
- name: Run Meson OpenMP checks
run: |
pip install ninja meson scipy
python build_tools/check-meson-openmp-dependencies.py
run-unit-tests:
name: Run unit tests
runs-on: ubuntu-24.04-arm
if: github.repository == 'scikit-learn/scikit-learn'
needs: [lint]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v2
with:
environment-file: build_tools/github/pymin_conda_forge_arm_linux-aarch64_conda.lock
environment-name: ci
cache-environment: true

- name: Build and run tests
shell: bash -el {0}
run: bash build_tools/github/build_test_arm.sh
3 changes: 0 additions & 3 deletions .github/workflows/update-lock-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ jobs:
- name: free-threaded
update_script_args: "--select-tag free-threaded"
additional_commit_message: "[free-threaded]"
- name: cirrus-arm
update_script_args: "--select-tag arm"
additional_commit_message: "[cirrus arm]"
- name: array-api
update_script_args: "--select-tag cuda"

Expand Down
5 changes: 1 addition & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
.. -*- mode: rst -*-
|Azure| |CirrusCI| |Codecov| |CircleCI| |Nightly wheels| |Black| |PythonVersion| |PyPi| |DOI| |Benchmark|
|Azure| |Codecov| |CircleCI| |Nightly wheels| |Black| |PythonVersion| |PyPi| |DOI| |Benchmark|

.. |Azure| image:: https://dev.azure.com/scikit-learn/scikit-learn/_apis/build/status/scikit-learn.scikit-learn?branchName=main
:target: https://dev.azure.com/scikit-learn/scikit-learn/_build/latest?definitionId=1&branchName=main

.. |CircleCI| image:: https://circleci.com/gh/scikit-learn/scikit-learn/tree/main.svg?style=shield
:target: https://circleci.com/gh/scikit-learn/scikit-learn

.. |CirrusCI| image:: https://img.shields.io/cirrus/github/scikit-learn/scikit-learn/main?label=Cirrus%20CI
:target: https://cirrus-ci.com/github/scikit-learn/scikit-learn/main

.. |Codecov| image:: https://codecov.io/gh/scikit-learn/scikit-learn/branch/main/graph/badge.svg?token=Pk8G9gg3y9
:target: https://codecov.io/gh/scikit-learn/scikit-learn

Expand Down
34 changes: 0 additions & 34 deletions build_tools/cirrus/arm_tests.yml

This file was deleted.

22 changes: 0 additions & 22 deletions build_tools/cirrus/update_tracking_issue.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ setup_ccache() {
ccache -M 0
}

# Install Miniforge
MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh"
curl -L --retry 10 $MINIFORGE_URL -o miniconda.sh
MINIFORGE_PATH=$HOME/miniforge3
bash ./miniconda.sh -b -p $MINIFORGE_PATH
source $MINIFORGE_PATH/etc/profile.d/conda.sh
conda activate

create_conda_environment_from_lock_file $CONDA_ENV_NAME $LOCK_FILE
conda activate $CONDA_ENV_NAME

setup_ccache

python --version
Expand All @@ -44,7 +33,7 @@ pip install --verbose --no-build-isolation .
# Report cache usage
ccache -s --verbose

mamba list
micromamba list

# Changing directory not to have module resolution use scikit-learn source
# directory but to the installed package.
Expand Down
3 changes: 1 addition & 2 deletions build_tools/github/upload_anaconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ set -e
set -x

if [[ "$GITHUB_EVENT_NAME" == "schedule" \
|| "$GITHUB_EVENT_NAME" == "workflow_dispatch" \
|| "$CIRRUS_CRON" == "nightly" ]]; then
|| "$GITHUB_EVENT_NAME" == "workflow_dispatch"]]; then
ANACONDA_ORG="scientific-python-nightly-wheels"
ANACONDA_TOKEN="$SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN"
else
Expand Down
6 changes: 3 additions & 3 deletions build_tools/update_environments_and_lock_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,10 @@ def remove_from(alist, to_remove):
},
},
{
"name": "pymin_conda_forge",
"name": "pymin_conda_forge_arm",
"type": "conda",
"tag": "arm",
"folder": "build_tools/cirrus",
"tag": "main-ci",
"folder": "build_tools/github",
"platform": "linux-aarch64",
"channels": ["conda-forge"],
"conda_dependencies": remove_from(
Expand Down
4 changes: 2 additions & 2 deletions doc/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ History
=======

This project was started in 2007 as a Google Summer of Code project by
David Cournapeau. Later that year, Matthieu Brucher started working on this project
David Cournapeau. Later that year, Matthieu Brucher started working on this project
as part of his thesis.

In 2010 Fabian Pedregosa, Gael Varoquaux, Alexandre Gramfort and Vincent
Expand Down Expand Up @@ -627,6 +627,6 @@ Infrastructure support
======================

We would also like to thank `Microsoft Azure <https://azure.microsoft.com/en-us/>`_,
`Cirrus Cl <https://cirrus-ci.org>`_, `CircleCl <https://circleci.com/>`_ for free CPU
`CircleCl <https://circleci.com/>`_ for free CPU
time on their Continuous Integration servers, and `Anaconda Inc. <https://www.anaconda.com>`_
for the storage they provide for our staging and nightly builds.
2 changes: 0 additions & 2 deletions doc/developers/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ Continuous Integration (CI)
* CircleCI is used to build the docs for viewing.
* Github Actions are used for various tasks, including building wheels and
source distributions.
* Cirrus CI is used to build on ARM.

.. _commit_markers:

Expand All @@ -551,7 +550,6 @@ Commit Message Marker Action Taken by CI
[free-threaded] Build & test with CPython 3.13 free-threaded
[pyodide] Build & test with Pyodide
[azure parallel] Run Azure CI jobs in parallel
[cirrus arm] Run Cirrus CI ARM test
[float32] Run float32 tests by setting `SKLEARN_RUN_FLOAT32_TESTS=1`. See :ref:`environment_variable` for more details
[doc skip] Docs are not built
[doc quick] Docs built, but excludes example gallery plots
Expand Down

0 comments on commit 4ec5f69

Please sign in to comment.