Skip to content

Commit 1874c47

Browse files
committed
CI: Use micromamba on AppVeyor
This is generally faster at solving than conda, and AppVeyor seems to have an older version of the latter too.
1 parent aad2a58 commit 1874c47

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

.appveyor.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# With infos from
22
# http://tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/
33
# https://packaging.python.org/en/latest/appveyor/
4-
# https://github.com/rmcgibbo/python-appveyor-conda-example
54
---
65

76
# Backslashes in quotes need to be escaped: \ -> "\\"
@@ -30,7 +29,6 @@ environment:
3029

3130
matrix:
3231
- PYTHON_VERSION: "3.11"
33-
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
3432
TEST_ALL: "yes"
3533

3634
# We always use a 64-bit machine, but can build x86 distributions
@@ -46,24 +44,28 @@ cache:
4644
- '%USERPROFILE%\.cache\matplotlib'
4745

4846
init:
49-
- echo %PYTHON_VERSION% %CONDA_INSTALL_LOCN%
47+
- ps:
48+
Invoke-Webrequest
49+
-URI https://micro.mamba.pm/api/micromamba/win-64/latest
50+
-OutFile C:\projects\micromamba.tar.bz2
51+
- ps: C:\PROGRA~1\7-Zip\7z.exe x C:\projects\micromamba.tar.bz2 -aoa -oC:\projects\
52+
- ps: C:\PROGRA~1\7-Zip\7z.exe x C:\projects\micromamba.tar -ttar -aoa -oC:\projects\
53+
- 'set PATH=C:\projects\Library\bin;%PATH%'
54+
- micromamba shell init --shell cmd.exe
55+
- micromamba config set always_yes true
56+
- micromamba config prepend channels conda-forge
5057

5158
install:
52-
- set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
53-
- conda config --set always_yes true
54-
- conda config --set show_channel_urls yes
55-
- conda config --prepend channels conda-forge
56-
5759
# For building, use a new environment
5860
# Add python version to environment
5961
# `^ ` escapes spaces for indentation
6062
- echo ^ ^ - python=%PYTHON_VERSION% >> environment.yml
61-
- conda env create -f environment.yml
62-
- activate mpl-dev
63-
- conda install -c conda-forge pywin32
63+
- micromamba env create -f environment.yml
64+
- micromamba activate mpl-dev
65+
- micromamba install pywin32
6466
- echo %PYTHON_VERSION% %TARGET_ARCH%
6567
# Show the installed packages + versions
66-
- conda list
68+
- micromamba list
6769

6870
test_script:
6971
# Now build the thing..
@@ -74,7 +76,7 @@ test_script:
7476
- '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
7577

7678
# this are optional dependencies so that we don't skip so many tests...
77-
- if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape
79+
- if x%TEST_ALL% == xyes micromamba install -q ffmpeg inkscape
7880
# miktex is available on conda, but seems to fail with permission errors.
7981
# missing packages on conda-forge for imagemagick
8082
# This install sometimes failed randomly :-(
@@ -95,7 +97,7 @@ artifacts:
9597
type: Zip
9698

9799
on_finish:
98-
- conda install codecov
100+
- micromamba install codecov
99101
- codecov -e PYTHON_VERSION PLATFORM -n "$PYTHON_VERSION Windows"
100102

101103
on_failure:

0 commit comments

Comments
 (0)