Skip to content

Commit

Permalink
Various updates (#45)
Browse files Browse the repository at this point in the history
- Removed `MINICONDA_VER`. It only appears to be used in the
now-deprecated bioconda-actions repo, and we're using mambaforge anyway.
- Added `linux-aarch64` to the local channels. This is just to be
complete -- I'm not sure this local channel setup is actually needed any
more, because the pilot ARM builds worked OK. However, this may end up
being important when there are many dependencies being built in which
case the local channel should have priority.
- Updated the readme to reflect current organization, so I can refer to
it in the updated bioconda-docs. This info is better maintained here
anyway rather than over on bioconda-docs.
- Added `configure-conda.sh` to the test in this repo just to be
complete.
  • Loading branch information
daler authored Nov 20, 2023
1 parent bdbcd93 commit 535b4e9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 0 additions & 1 deletion common.sh
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion install-and-set-up-conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 535b4e9

Please sign in to comment.