diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da04b52..4034354 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,3 +12,4 @@ jobs: - name: Test install bioconda-utils run: | COMMON_GIT_REF=${GITHUB_SHA} bash install-and-set-up-conda.sh + bash configure-conda.sh diff --git a/README.md b/README.md index a7da0ad..b13bd3b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,34 @@ -This repository contains common definitions for the bioconda build system, e.g., the bioconda-utils tag to use and the miniconda version. +# Overview +This repository acts as a central "source of truth" which can be used by +various components of the Bioconda build system. -- `common.sh` contains environment variables that control versions +# Components + +**`common.sh`:** contains environment variables that control versions. + +**`install-and-set-up-conda.sh`:** +- downloads and installs conda using the Mambaforge distribution +- installs bioconda-utils dependencies +- installs the version of bioconda-utils specified in common.sh via pip install + +**`configure-conda.sh`:** ensures channels are configured correctly. + +# Typical usage + +In practice, a typical CI environment will do the following: + +1. Download the files, typically via: + + ```bash + wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{common,install-and-set-up-conda,configure-conda}.sh + ``` + +2. Run `install-and-set-up-conda.sh` (which sources `common.sh`). + +3. Use the CI platform's mechanism to cache the conda install dir (which is + configured in `common.sh`). + +4. After a cache restore, run `configure-conda.sh`. The reason for this is that + the `--system` arg for `conda config` is not supported by mamba, and so the + channel config ends up in the home directory which is not cached. diff --git a/common.sh b/common.sh index 47c3191..34d4892 100644 --- a/common.sh +++ b/common.sh @@ -1,4 +1,3 @@ -MINICONDA_VER=py37_4.8.3 BIOCONDA_UTILS_TAG=v2.9.0 MAMBAFORGE_VER=23.1.0-1 MAMBAFORGE_INSTALLATION_DIR="/opt/mambaforge" diff --git a/install-and-set-up-conda.sh b/install-and-set-up-conda.sh index d8cad5e..5cdf0ca 100644 --- a/install-and-set-up-conda.sh +++ b/install-and-set-up-conda.sh @@ -87,7 +87,7 @@ if [ ${BIOCONDA_DISABLE_BUILD_PREP:=0} == 0 ]; then # Set local channel as highest priority (requires conda-build, which is # installed as a dependency of bioconda-utils) - mkdir -p "${MAMBAFORGE_INSTALLATION_DIR}/conda-bld/{noarch,linux-64,osx-64}" + mkdir -p "${MAMBAFORGE_INSTALLATION_DIR}/conda-bld/{noarch,linux-64,osx-64,linux-aarch64}" conda index "${MAMBAFORGE_INSTALLATION_DIR}/conda-bld" conda config --add channels "file://${MAMBAFORGE_INSTALLATION_DIR}/conda-bld" fi