From 9c474cf11c455457c3cf062f419cda2982daf733 Mon Sep 17 00:00:00 2001 From: Patrick Avery Date: Tue, 10 Oct 2023 13:30:41 -0500 Subject: [PATCH] Try using libmamba solver for conda packaging It is [officially supported by conda](https://www.anaconda.com/blog/conda-is-fast-now), and it is significantly faster. Before this commit, Windows packaging usually takes 1 hour and 15 minutes. Mac packaging usually takes about 45 minutes. Linux usually takes about 35 minutes. We'll see if there are any noticeable differences. Signed-off-by: Patrick Avery --- .github/workflows/container_build.sh | 4 ++++ .github/workflows/package.yml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/container_build.sh b/.github/workflows/container_build.sh index 9c2911edf..55bbf01b0 100755 --- a/.github/workflows/container_build.sh +++ b/.github/workflows/container_build.sh @@ -21,6 +21,10 @@ ${HOME}/miniconda3/bin/conda create --override-channels -c conda-forge -y -n hex ${HOME}/miniconda3/bin/activate hexrd ${HOME}/miniconda3/bin/conda activate hexrd +# Install the libmamba solver (it is much faster) +${HOME}/miniconda3/bin/conda install -n base -c conda-forge conda-libmamba-solver +${HOME}/miniconda3/bin/conda config --set solver libmamba + # Install conda build and create output directory ${HOME}/miniconda3/bin/conda install --override-channels -c conda-forge conda-build -y mkdir output diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index b959c9470..51694d85b 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -46,6 +46,9 @@ jobs: - name: Install build requirements run: | conda activate hexrd + # Change default solver to be libmamba, so that it runs much faster + conda install -n base -c conda-forge conda-libmamba-solver + conda config --set solver libmamba # FIXME: downgrade urllib3 until this issue is fixed: # https://github.com/Anaconda-Platform/anaconda-client/issues/654 conda install --override-channels -c conda-forge anaconda-client conda-build conda 'urllib3<2.0.0'