Skip to content

Commit

Permalink
Merge branch 'master' into bulk
Browse files Browse the repository at this point in the history
  • Loading branch information
bgruening committed Nov 2, 2024
2 parents 9a3220d + dd3c042 commit f5cba5e
Show file tree
Hide file tree
Showing 4,536 changed files with 269,113 additions and 168,416 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
345 changes: 345 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,345 @@
# .circleci/config.yml
version: 2.1

executors:
osx-arm64:
macos:
xcode: 15.4.0
resource_class: macos.m1.medium.gen1
linux-aarch64:
machine:
image: ubuntu-2204:current
resource_class: arm.medium

jobs: # a basic unit of work in a run
build_and_test:
parameters:
os:
type: executor
executor: << parameters.os >>
steps:
- checkout

- run:
name: Check for Additional Platforms
command: |
result=$(./scripts/check-for-additional-platforms.sh "origin/master...HEAD" "build_and_test" "${CIRCLE_JOB}")
if [[ ${result} != "build" ]]
then
echo "No recipes using this platform, skipping rest of job."
circleci-agent step halt
fi
- run:
name: Fetch bioconda install script
command: wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{common,install-and-set-up-conda,configure-conda}.sh

- run:
name: Install bioconda-utils
command: |
sudo mkdir -p /opt/
sudo chmod o+rwx /opt
bash install-and-set-up-conda.sh
- run:
name: Setup PATH
command:
echo 'export PATH=/opt/mambaforge/bin:"$PATH"' >> "$BASH_ENV"

- run:
name: Configure conda
command: bash configure-conda.sh

- run:
name: Build and test
command: |
set -xe
eval "$(conda shell.bash hook)"
conda activate bioconda
source common.sh
# Sets up OSX SDK
if [[ $(uname) = "Darwin" ]]; then
if [[ "${OSX_SDK_DIR:-}" == "" ]]; then
OSX_SDK_DIR="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs"
fi
sudo chmod o+rwx ${OSX_SDK_DIR}
run_conda_forge_build_setup
fi
if command -V docker >/dev/null; then
bioconda-utils build recipes config.yml \
--lint --docker --mulled-test \
--docker-base-image "quay.io/bioconda/bioconda-utils-build-env-cos7-$(arch):${BIOCONDA_UTILS_TAG#v}" \
--git-range origin/master HEAD
else
bioconda-utils build recipes config.yml \
--lint --git-range origin/master HEAD
fi
- run:
name: Prepare artifacts
command: |
(
mkdir -p /tmp/artifacts/packages
cd /opt/mambaforge/envs/bioconda/conda-bld || exit 0
find -name .cache | xargs rm -rf || true
for n in index.html channeldata.json linux-aarch64 linux-64 osx-64 osx-arm64 noarch; do
cp -rv $n /tmp/artifacts/packages || true
done
if command -V docker >/dev/null; then
mkdir -p /tmp/artifacts/images
cd /tmp/artifacts/images
docker image ls --format='{{.Repository}}:{{.Tag}}' | \
{ grep biocontainers || true ; } | \
xargs -n1 -P4 bash -c '
test -n "${1+x}" || exit 0
echo "Start compressing docker image ${1} ..."
docker save "${1}" | gzip -c > "${1##*/}.tar.gz"
echo "Finished compressing docker image ${1} ."
' --
fi
) || true
- store_artifacts:
path: /tmp/artifacts

build_and_upload:
parameters:
os:
type: executor
executor: << parameters.os >>
steps:
- checkout

- run:
name: Check for Additional Platforms
command: |
result=$(./scripts/check-for-additional-platforms.sh "${CIRCLE_SHA1}~1 ${CIRCLE_SHA1}" "build_and_upload" "${CIRCLE_JOB}")
if [[ ${result} != "build" ]]
then
echo "No recipes using this platform, skipping rest of job."
circleci-agent step halt
fi
- run:
name: Fetch bioconda install script
command: wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{common,install-and-set-up-conda,configure-conda}.sh

- run:
name: Install bioconda-utils
command: |
sudo mkdir -p /opt
sudo chmod o+rwx /opt
bash install-and-set-up-conda.sh
- run:
name: Setup PATH
command:
echo 'export PATH=/opt/mambaforge/bin:"$PATH"' >> "$BASH_ENV"

- run:
name: Configure conda
command: bash configure-conda.sh

- run:
name: Build and push
command: |
set -xe
eval "$(conda shell.bash hook)"
conda activate bioconda
source common.sh
# Sets up OSX SDK
if [[ $(uname) = "Darwin" ]]; then
if [[ "${OSX_SDK_DIR:-}" == "" ]]; then
OSX_SDK_DIR="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs"
fi
sudo chmod o+rwx ${OSX_SDK_DIR}
run_conda_forge_build_setup
fi
bioconda-utils handle-merged-pr recipes config.yml \
--repo bioconda/bioconda-recipes \
--git-range ${CIRCLE_SHA1}~1 ${CIRCLE_SHA1} \
--fallback build \
--artifact-source circleci
bulk_build:
parameters:
os:
type: executor
runner:
type: integer
executor: << parameters.os >>
steps:
- add_ssh_keys:
fingerprints:
- 1e:85:74:42:35:5f:c5:a2:35:c2:ec:b7:80:c0:7c:40

- checkout

- run:
name: Check for [ci run]
command: |
commit_message="$(git log --format=oneline -n 1 $CIRCLE_SHA1)"
if [[ $commit_message =~ "[ci run]" ]]; then
echo "[ci run] found, continuing."
else
echo "[ci run] not found, exiting."
circleci-agent step halt
fi
- run:
name: set git user
command: |
git config user.name BiocondaBot
git config user.email [email protected]
git branch --set-upstream-to=origin/$CIRCLE_BRANCH $CIRCLE_BRANCH
- run:
name: Fetch bioconda install script
command: wget https://raw.githubusercontent.com/bioconda/bioconda-common/bulk/{common,install-and-set-up-conda,configure-conda}.sh

- run:
name: Install bioconda-utils
command: |
sudo mkdir -p /opt/
sudo chmod o+rwx /opt
bash install-and-set-up-conda.sh
- run:
name: Setup PATH
command:
echo 'export PATH=/opt/mambaforge/bin:"$PATH"' >> "$BASH_ENV"

- run:
name: Configure conda
command: bash configure-conda.sh

# For now, do not upload ARM images to biocontainers: --mulled-upload-target biocontainers
- run:
name: Build and upload
command: |
set -e
eval "$(conda shell.bash hook)"
conda activate bioconda
source common.sh
echo '============'
conda info --all
conda config --show-sources
python -c 'import bioconda_utils.utils as u ; import pathlib as p ; print(*(f"{f}:\n{p.Path(f).read_text()}" for f in u.load_conda_build_config().exclusive_config_files), sep="\n")'
echo '============'
bioconda-utils build recipes config.yml \
--worker-offset << parameters.runner >> --n-workers 6 \
--docker --mulled-test --docker-base-image "quay.io/bioconda/bioconda-utils-build-env-cos7-$(arch):${BIOCONDA_UTILS_TAG#v}" \
--anaconda-upload \
--record-build-failures \
--skiplist-leafs
conda clean -y --all
nightly_build:
parameters:
os:
type: executor
executor: << parameters.os >>
steps:
- add_ssh_keys:
fingerprints:
- 1e:85:74:42:35:5f:c5:a2:35:c2:ec:b7:80:c0:7c:40

- checkout

- run:
name: Fetch bioconda install script
command: wget https://raw.githubusercontent.com/bioconda/bioconda-common/bulk/{common,install-and-set-up-conda,configure-conda}.sh

- run:
name: Install bioconda-utils
command: |
sudo mkdir -p /opt/
sudo chmod o+rwx /opt
bash install-and-set-up-conda.sh
- run:
name: Setup PATH
command:
echo 'export PATH=/opt/mambaforge/bin:"$PATH"' >> "$BASH_ENV"

- run:
name: Configure conda
command: bash configure-conda.sh

# For now, do not upload ARM images to biocontainers: --mulled-upload-target biocontainers
- run:
name: Build and push leftover packages
command: |
set -e
eval "$(conda shell.bash hook)"
conda activate bioconda
source common.sh
# build and push all leftover packages
bioconda-utils build recipes config.yml \
--docker --mulled-test --docker-base-image "quay.io/bioconda/bioconda-utils-build-env-cos7-$(arch):${BIOCONDA_UTILS_TAG#v}" \
--anaconda-upload \
--prelint --exclude bioconda-repodata-patches
workflows:
build and test (ARM):
jobs:
- build_and_test:
filters:
branches:
ignore:
- master
- bulk
matrix:
parameters:
os:
- osx-arm64
- linux-aarch64

build and upload (ARM):
jobs:
- build_and_upload:
filters:
branches:
only: master
matrix:
parameters:
os:
- osx-arm64
- linux-aarch64

Bulk branch (ARM):
jobs:
- bulk_build:
filters:
branches:
only: bulk
matrix:
parameters:
os:
# - osx-arm64 Bulk is on GitHub Actions
- linux-aarch64
runner: [0, 1, 2, 3, 4, 5]

Nightly (ARM):
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only: master
jobs:
- nightly_build:
filters:
branches:
only: master
matrix:
parameters:
os:
# - osx-arm64 Nightly is on GitHub Actions
- linux-aarch64
Loading

0 comments on commit f5cba5e

Please sign in to comment.