From 0c7f043d3b4af1116a5f05c6c318702c10daf1f0 Mon Sep 17 00:00:00 2001
From: Teake Nutma <t.a.nutma@rug.nl>
Date: Tue, 28 Jun 2022 11:19:45 +0200
Subject: [PATCH] Use conda mambabuild by default (and repurpose
 CONDA_BUILD_COMMAND var)

---
 README.rst                  | 2 +-
 templates/conda/_shared.yml | 2 +-
 templates/conda/build.yml   | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.rst b/README.rst
index 9a14ad8..3b37cb6 100644
--- a/README.rst
+++ b/README.rst
@@ -122,7 +122,7 @@ The complete list of variables is given below.
         Name            Required Protected        Default value                                  Purpose
 ======================= ======== ========= ========================== ================================================================
 CONDA_BUILD_EXTRA_ARGS  No       No                                   Optional extra arguments to conda-build.
-CONDA_BUILD_COMMAND     No       No        build                      Specify 'mambabuild' to use alternative build command from boa.
+CONDA_BUILD_COMMAND     No       No        conda mambabuild           Specify 'boa build' to use alternative build command from boa.
 CONDARC                 No       No        ${CI_PROJECT_DIR}/.condarc Location of conda config file.
 CONDA_RECIPE_DIR        No       No        conda-recipe               Directory containing package recipe(s).
 CONDA_OUTPUT_FOLDER     No       No        .conda-bld                 Directory where built package(s) are stored.
diff --git a/templates/conda/_shared.yml b/templates/conda/_shared.yml
index 84fa197..91e9f38 100644
--- a/templates/conda/_shared.yml
+++ b/templates/conda/_shared.yml
@@ -5,4 +5,4 @@ variables:
   CONDA_RECIPE_DIR: conda-recipe
   CONDA_OUTPUT_FOLDER: .conda-bld
   CONDARC: "${CI_PROJECT_DIR}/.condarc"
-  CONDA_BUILD_COMMAND: build
+  CONDA_BUILD_COMMAND: conda mambabuild
diff --git a/templates/conda/build.yml b/templates/conda/build.yml
index e096c4c..4988c9f 100644
--- a/templates/conda/build.yml
+++ b/templates/conda/build.yml
@@ -50,7 +50,7 @@ conda_build:
         export _CP_VERSION_PRE_SET=1
       fi
     # The actual build command.
-    - conda ${CONDA_BUILD_COMMAND} ${CONDA_RECIPE_DIR} --no-test --no-anaconda-upload --output-folder ${CONDA_OUTPUT_FOLDER} ${CONDA_BUILD_EXTRA_ARGS}
+    - ${CONDA_BUILD_COMMAND} ${CONDA_RECIPE_DIR} --no-test --no-anaconda-upload --output-folder ${CONDA_OUTPUT_FOLDER} ${CONDA_BUILD_EXTRA_ARGS}
     # Derive and expose the package name, version, and build string.
     # We do this by looking at the filename of the conda package,
     # cf. https://docs.conda.io/projects/conda-build/en/latest/concepts/package-naming-conv.html.
@@ -111,7 +111,7 @@ conda_test:
     # Run the actual test.
     - |
       env PYTEST_ADDOPTS="--junitxml=report.xml --override-ini junit_family=legacy" \
-        conda ${CONDA_BUILD_COMMAND} ${CONDA_OUTPUT_FOLDER}/*/*.tar.bz2 --test --keep-old-work ${CONDA_BUILD_EXTRA_ARGS} \
+        ${CONDA_BUILD_COMMAND} ${CONDA_OUTPUT_FOLDER}/*/*.tar.bz2 --test --keep-old-work ${CONDA_BUILD_EXTRA_ARGS} \
         | tee conda_build_test.log
   after_script:
     # After the tests have run, we try to automatically extract the coverage and test reports.
-- 
GitLab