Skip to content

CI Migrate 1.2.X over to Cirrus #25567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cirrus.star
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ def main(ctx):
return []

if "[cd build]" in commit_msg or "[cd build cirrus]" in commit_msg:
return fs.read(arm_wheel_yaml)
return fs.read(arm_wheel_yaml) + fs.read(arm_tests_yaml)

return fs.read(arm_tests_yaml)
15 changes: 1 addition & 14 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,6 @@ jobs:
python: 311
platform_id: macosx_x86_64

# MacOS arm64
- os: macos-latest
python: 38
platform_id: macosx_arm64
- os: macos-latest
python: 39
platform_id: macosx_arm64
- os: macos-latest
python: 310
platform_id: macosx_arm64
- os: macos-latest
python: 311
platform_id: macosx_arm64

steps:
- name: Checkout scikit-learn
uses: actions/checkout@v3
Expand Down Expand Up @@ -221,5 +207,6 @@ jobs:
# Secret variables need to be mapped to environment variables explicitly
SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN }}
SCIKIT_LEARN_STAGING_UPLOAD_TOKEN: ${{ secrets.SCIKIT_LEARN_STAGING_UPLOAD_TOKEN }}
ARTIFACTS_PATH: dist/artifact
# Force a replacement if the remote file already exists
run: bash build_tools/github/upload_anaconda.sh
93 changes: 0 additions & 93 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.. -*- mode: rst -*-

|Azure|_ |Travis|_ |Codecov|_ |CircleCI|_ |Nightly wheels|_ |Black|_ |PythonVersion|_ |PyPi|_ |DOI|_ |Benchmark|_
|Azure|_ |CirrusCI|_ |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
.. _Azure: 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&circle-token=:circle-token
.. _CircleCI: https://circleci.com/gh/scikit-learn/scikit-learn

.. |Travis| image:: https://api.travis-ci.com/scikit-learn/scikit-learn.svg?branch=main
.. _Travis: https://app.travis-ci.com/github/scikit-learn/scikit-learn
.. |CirrusCI| image:: https://img.shields.io/cirrus/github/scikit-learn/scikit-learn/main?label=Cirrus%20CI
.. _CirrusCI: 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
.. _Codecov: https://codecov.io/gh/scikit-learn/scikit-learn
Expand Down
1 change: 1 addition & 0 deletions build_tools/cirrus/arm_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ linux_aarch64_test_task:
OPENBLAS_NUM_THREADS: 2
LOCK_FILE: build_tools/cirrus/py39_conda_forge_linux-aarch64_conda.lock
CONDA_PKGS_DIRS: /root/.conda/pkgs
HOME: / # $HOME is not defined in image and is required to install mambaforge
ccache_cache:
folder: /root/.cache/ccache
conda_cache:
Expand Down
29 changes: 29 additions & 0 deletions build_tools/cirrus/arm_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,32 @@ linux_arm64_wheel_task:

wheels_artifacts:
path: "wheelhouse/*"


wheels_upload_task:
depends_on:
- macos_arm64_wheel
- linux_arm64_wheel
container:
image: continuumio/miniconda3:22.11.1
# Artifacts are not uploaded on PRs
only_if: $CIRRUS_PR == ""
env:
# Upload tokens have been encrypted via the CirrusCI interface:
# https://cirrus-ci.org/guide/writing-tasks/#encrypted-variables
SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN: ENCRYPTED[8f20120b18a07d8a11192b98bff1f562883558e1f4c53f8ead1577113785a4105ee6f14ad9b5dacf1803c19c4913fe1c]
SCIKIT_LEARN_STAGING_UPLOAD_TOKEN: ENCRYPTED[8fade46af37fa645e57bd1ee21683337aa369ba56f6307ce13889f1e74df94e5bdd21d323baac21e332fd87b8949659a]
ARTIFACTS_PATH: wheelhouse
upload_script: |
conda install curl unzip -y

if [[ "$CIRRUS_CRON" == "nightly" ]]; then
export GITHUB_EVENT_NAME="schedule"
fi

# Download and show wheels
curl https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/wheels.zip --output wheels.zip
unzip wheels.zip
ls wheelhouse

bash build_tools/github/upload_anaconda.sh
15 changes: 7 additions & 8 deletions build_tools/github/check_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
# plus one more for the sdist
n_wheels += 1

# aarch64 builds from travis
travis_config_path = Path.cwd() / ".travis.yml"
with travis_config_path.open("r") as f:
travis_config = yaml.safe_load(f)

jobs = travis_config["jobs"]["include"]
travis_builds = [j for j in jobs if any("CIBW_BUILD" in env for env in j["env"])]
n_wheels += len(travis_builds)
# arm64 builds from cirrus
cirrus_path = Path.cwd() / "build_tools" / "cirrus" / "arm_wheel.yml"
with cirrus_path.open("r") as f:
cirrus_config = yaml.safe_load(f)

n_wheels += len(cirrus_config["macos_arm64_wheel_task"]["matrix"])
n_wheels += len(cirrus_config["linux_arm64_wheel_task"]["matrix"])

dist_files = list(Path("dist").glob("**/*"))
n_dist_files = len(dist_files)
Expand Down
2 changes: 1 addition & 1 deletion build_tools/github/upload_anaconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ source activate upload
conda install -y anaconda-client

# Force a replacement if the remote file already exists
anaconda -t $ANACONDA_TOKEN upload --force -u $ANACONDA_ORG dist/artifact/*
anaconda -t $ANACONDA_TOKEN upload --force -u $ANACONDA_ORG $ARTIFACTS_PATH/*
echo "Index: https://pypi.anaconda.org/$ANACONDA_ORG/simple"
35 changes: 0 additions & 35 deletions build_tools/travis/after_success.sh

This file was deleted.

11 changes: 0 additions & 11 deletions build_tools/travis/install.sh

This file was deleted.

66 changes: 0 additions & 66 deletions build_tools/travis/install_main.sh

This file was deleted.

4 changes: 0 additions & 4 deletions build_tools/travis/install_wheels.sh

This file was deleted.

12 changes: 0 additions & 12 deletions build_tools/travis/script.sh

This file was deleted.

8 changes: 0 additions & 8 deletions build_tools/travis/test_docs.sh

This file was deleted.

Loading