8000 CI Migrates pypy3 test to Azure (#21005) · scikit-learn/scikit-learn@517b38a · GitHub
[go: up one dir, main page]

Skip to content

Commit 517b38a

Browse files
authored
CI Migrates pypy3 test to Azure (#21005)
1 parent 0cb7def commit 517b38a

File tree

4 files changed

+34
-38
lines changed

4 files changed

+34
-38
lines changed

.circleci/config.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,6 @@ jobs:
109109
name: linting
110110
command: ./build_tools/circle/linting.sh
111111

112-
pypy3:
113-
docker:
114-
- image: condaforge/miniforge3
115-
environment:
116-
# Avoid the interactive dialog when installing tzdata
117-
- DEBIAN_FRONTEND: noninteractive
118-
steps:
119-
- restore_cache:
120-
keys:
121-
- pypy3-ccache-{{ .Branch }}
122-
- pypy3-ccache
123-
- run: apt-get -yq update && apt-get -yq install git ssh
124-
- checkout
125-
- run: conda init bash && source ~/.bashrc
126-
- run: ./build_tools/circle/build_test_pypy.sh
127-
- save_cache:
128-
key: pypy3-ccache-{{ .Branch }}-{{ .BuildNum }}
129-
paths:
130-
- ~/.ccache
131-
- ~/.cache/pip
132-
133112
linux-arm64:
134113
machine:
135114
image: ubuntu-2004:202101-01
@@ -190,16 +169,6 @@ workflows:
190169
- deploy:
191170
requires:
192171
- doc
193-
pypy:
194-
triggers:
195-
- schedule:
196-
cron: "0 0 * * *"
197-
filters:
198-
branches:
199-
only:
200-
- main
201-
jobs:
202-
- pypy3
203172
linux-arm64:
204173
jobs:
205174
- linux-arm64

azure-pipelines.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ jobs:
182182
TEST_DOCSTRINGS: 'true'
183183
CHECK_WARNINGS: 'true'
184184

185-
- template: build_tools/azure/posix-32.yml
185+
- template: build_tools/azure/posix-docker.yml
186186
parameters:
187-
name: Linux32
187+
name: Linux_Docker
188188
vmImage: ubuntu-20.04
189189
dependsOn: [linting, git_commit]
190190
condition: |
@@ -194,8 +194,14 @@ jobs:
194194
ne(variables['Build.Reason'], 'Schedule')
195195
)
196196
matrix:
197+
pypy3:
198+
DISTRIB: 'conda-mamba-pypy3'
199+
DOCKER_CONTAINER: 'condaforge/mambaforge-pypy3:4.10.3-5'
200+
PILLOW_VERSION: 'none'
201+
PANDAS_VERSION: 'none'
197202
debian_atlas_32bit:
198203
DISTRIB: 'debian-32'
204+
DOCKER_CONTAINER: 'i386/debian:10.9'
199205
JOBLIB_VERSION: 'min'
200206
# disable pytest xdist due to unknown bug with 32-bit container
201207
PYTEST_XDIST_VERSION: 'none'

build_tools/azure/install.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,19 @@ set -x
55

66
UNAMESTR=`uname`
77

8+
if [[ "$DISTRIB" == "conda-mamba-pypy3" ]]; then
9+
# condaforge/mambaforge-pypy3 needs compilers
10+
apt-get -yq update
11+
apt-get -yq install build-essential
12+
fi
13+
814
make_conda() {
915
TO_INSTALL="$@"
10-
conda create -n $VIRTUALENV --yes $TO_INSTALL
16+
if [[ "$DISTRIB" == *"mamba"* ]]; then
17+
mamba create -n $VIRTUALENV --yes $TO_INSTALL
18+
else
19+
conda create -n $VIRTUALENV --yes $TO_INSTALL
20+
fi
1121
source activate $VIRTUALENV
1222
}
1323

@@ -25,15 +35,21 @@ setup_ccache() {
2535
# imports get_dep
2636
source build_tools/shared.sh
2737

28-
if [[ "$DISTRIB" == "conda" ]]; then
38+
if [[ "$DISTRIB" == "conda" || "$DISTRIB" == *"mamba"* ]]; then
2939

3040
if [[ "$CONDA_CHANNEL" != "" ]]; then
3141
TO_INSTALL="-c $CONDA_CHANNEL"
3242
else
3343
TO_INSTALL=""
3444
fi
3545

36-
TO_INSTALL="$TO_INSTALL python=$PYTHON_VERSION ccache pip blas[build=$BLAS]"
46+
if [[ "$DISTRIB" == *"pypy"* ]]; then
47+
TO_INSTALL="$TO_INSTALL pypy"
48+
else
49+
TO_INSTALL="$TO_INSTALL python=$PYTHON_VERSION"
50+
fi
51+
52+
TO_INSTALL="$TO_INSTALL ccache pip blas[build=$BLAS]"
3753

3854
TO_INSTALL="$TO_INSTALL $(get_dep numpy $NUMPY_VERSION)"
3955
TO_INSTALL="$TO_INSTALL $(get_dep scipy $SCIPY_VERSION)"

build_tools/azure/posix-32.yml renamed to build_tools/azure/posix-docker.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
THREADPOOLCTL_VERSION: 'latest'
3131
COVERAGE: 'false'
3232
TEST_DOCSTRINGS: 'false'
33+
BLAS: 'openblas'
34+
# Set in azure-pipelines.yml
35+
DISTRIB: ''
36+
DOCKER_CONTAINER: ''
3337
strategy:
3438
matrix:
3539
${{ insert }}: ${{ parameters.matrix }}
@@ -45,7 +49,7 @@ jobs:
4549
-w /io
4650
--detach
4751
--name skcontainer
48-
-e DISTRIB=debian-32
52+
-e DISTRIB=$DISTRIB
4953
-e TEST_DIR=/temp_dir
5054
-e JUNITXML=$JUNITXML
5155
-e VIRTUALENV=testvenv
@@ -63,7 +67,8 @@ jobs:
6367
-e OMP_NUM_THREADS=$OMP_NUM_THREADS
6468
-e OPENBLAS_NUM_THREADS=$OPENBLAS_NUM_THREADS
6569
-e SKLEARN_SKIP_NETWORK_TESTS=$SKLEARN_SKIP_NETWORK_TESTS
66-
i386/debian:10.9
70+
-e BLAS=$BLAS
71+
$DOCKER_CONTAINER
6772
sleep 1000000
6873
displayName: 'Start container'
6974
- script: >

0 commit comments

Comments
 (0)
0