Skip to content

Commit

Permalink
update wfs
Browse files Browse the repository at this point in the history
  • Loading branch information
aliciaaevans committed Apr 2, 2024
1 parent ac3e602 commit 5d3aa70
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 2 deletions.
97 changes: 97 additions & 0 deletions .github/workflows/PR-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: PR (osx-arm64)
on:
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: build-${{ github.event.pull_request.number || github.head_ref }}
cancel-in-progress: true
jobs:
build-osx-arm:
name: osx-arm64 Tests
runs-on: macOS-14 # M1
strategy:
fail-fast: true
max-parallel: 13
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# TODO: bail if there's no osx-arm64 recipes
# - run:
# name: Check for Additional Platforms
# command: ./.circleci/check-for-additional-platforms.sh "origin/master...HEAD" "build_and_test"

- name: set path
run: echo "/opt/mambaforge/bin" >> $GITHUB_PATH

- name: Fetch conda install script
run: |
wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{install-and-set-up-conda,configure-conda,common}.sh
- name: Restore cache
id: cache
uses: actions/cache@v4
with:
path: /opt/mambaforge
key: ${{ runner.os }}--master--${{ hashFiles('install-and-set-up-conda.sh', 'common.sh', 'configure-conda.sh') }}

- name: Set up bioconda-utils
if: steps.cache.outputs.cache-hit != 'true'
run: bash install-and-set-up-conda.sh

# This script can be used to reconfigure conda to use the right channel setup.
# This has to be done after the cache is restored, because
# the channel setup is not cached as it resides in the home directory.
# We could use a system-wide (and therefore cached) channel setup,
# but mamba does not support that at the time of implementation
# (it ignores settings made with --system).
- name: Configure conda
run: bash configure-conda.sh

- name: Build and Test
env:
# Mimic circleci
OSTYPE: "darwin"
CI: "true"
run: |
set -e
eval "$(conda shell.bash hook)"
conda activate bioconda
# Use SDK with arm64 support
export MACOSX_DEPLOYMENT_TARGET=11.0
# Clean up lingering build artifacts
rm -f /opt/mambaforge/envs/bioconda/conda-bld/osx-arm64/*.tar.bz2
# The SDK isn't actually cached, so reinstall it
run_conda_forge_build_setup
if [ -z "$GITHUB_BASE_REF" ] ; then
export GITHUB_BASE_REF="master"
fi
git fetch origin "$GITHUB_BASE_REF"
bioconda-utils build recipes config.yml \
--lint \
--git-range origin/"$GITHUB_BASE_REF" HEAD
- name: Prepare artifacts
run: |
(
rm -rf /tmp/artifacts
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 osx-arm64 noarch; do
cp -rv $n /tmp/artifacts/packages || true
done
) || true
- name: Archive packages
uses: actions/upload-artifact@v4
with:
name: osx-arm64-packages
path: |
/tmp/artifacts
4 changes: 2 additions & 2 deletions .github/workflows/master-arm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload
name: Upload (osx-arm64)
on:
push:
branches:
Expand Down Expand Up @@ -75,5 +75,5 @@ jobs:
--git-range ${GITHUB_SHA}~1 ${GITHUB_SHA} \
--fallback build \
--artifact-source github-actions \
--dry-run
--dryrun
# TODO: remove dry-run after testing

0 comments on commit 5d3aa70

Please sign in to comment.