Skip to content

CI: Use micromamba on AppVeyor #28509

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 1 commit into from
Jul 5, 2024
Merged
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
34 changes: 14 additions & 20 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# With infos from
# http://tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/
# https://packaging.python.org/en/latest/appveyor/
# https://github.com/rmcgibbo/python-appveyor-conda-example
---

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

matrix:
- PYTHON_VERSION: "3.11"
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
TEST_ALL: "yes"

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

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

install:
- set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
- conda config --set always_yes true
- conda config --set show_channel_urls yes
- conda config --prepend channels conda-forge

# For building, use a new environment
# Add python version to environment
# `^ ` escapes spaces for indentation
- echo ^ ^ - python=%PYTHON_VERSION% >> environment.yml
- conda env create -f environment.yml
- activate mpl-dev
- conda install -c conda-forge pywin32
- echo %PYTHON_VERSION% %TARGET_ARCH%
# Show the installed packages + versions
- conda list
- micromamba env create -f environment.yml python=%PYTHON_VERSION% pywin32
- micromamba activate mpl-dev

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

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

on_finish:
- conda install codecov
- micromamba install codecov
- codecov -e PYTHON_VERSION PLATFORM -n "$PYTHON_VERSION Windows"

on_failure:
Expand Down
Loading