Skip to content

Commit

Permalink
[ci] speed up Windows jobs (fixes #5647) (#5648)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Dec 29, 2022
1 parent 3d33c75 commit 42b6322
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ install:
build: false

test_script:
- conda config --remove channels defaults
- conda config --add channels nodefaults
- conda config --add channels conda-forge
- conda config --set channel_priority strict
- conda init powershell
Expand Down
33 changes: 21 additions & 12 deletions .ci/test_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ if ($env:TASK -eq "cpp-tests") {
Exit 0
}

# setup for Python
conda init powershell
conda activate
conda config --set always_yes yes --set changeps1 no
conda update -q -y conda
conda create -q -y -n $env:CONDA_ENV "python=$env:PYTHON_VERSION[build=*cpython]" ; Check-Output $?
if ($env:TASK -ne "bdist") {
conda activate $env:CONDA_ENV
}

if ($env:TASK -eq "swig") {
$env:JAVA_HOME = $env:JAVA_HOME_8_X64 # there is pre-installed Eclipse Temurin 8 somewhere
$ProgressPreference = "SilentlyContinue" # progress bar bug extremely slows down download speed
Expand All @@ -50,8 +40,27 @@ if ($env:TASK -eq "swig") {
Exit 0
}

# re-including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy
conda install -q -y -n $env:CONDA_ENV cloudpickle joblib matplotlib numpy pandas psutil pytest "python=$env:PYTHON_VERSION[build=*cpython]" python-graphviz scikit-learn scipy ; Check-Output $?
# setup for Python
conda init powershell
conda activate
conda config --set always_yes yes --set changeps1 no
conda update -q -y conda
conda create -q -y -n $env:CONDA_ENV `
cloudpickle `
joblib `
matplotlib `
numpy `
pandas `
psutil `
pytest `
"python=$env:PYTHON_VERSION[build=*cpython]" `
python-graphviz `
scikit-learn `
scipy ; Check-Output $?

if ($env:TASK -ne "bdist") {
conda activate $env:CONDA_ENV
}

if ($env:TASK -eq "regular") {
mkdir $env:BUILD_SOURCESDIRECTORY/build; cd $env:BUILD_SOURCESDIRECTORY/build
Expand Down
2 changes: 2 additions & 0 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ jobs:
condition: eq(variables['TASK'], 'bdist')
displayName: 'Install OpenCL'
- script: |
cmd /c "conda config --remove channels defaults"
cmd /c "conda config --add channels nodefaults"
cmd /c "conda config --add channels conda-forge"
cmd /c "conda config --set channel_priority strict"
cmd /c "conda init powershell"
Expand Down

0 comments on commit 42b6322

Please sign in to comment.