Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Testing only]Test osx-arm64 on GitHub Actions (part 2) #49152

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ workflows:
matrix:
parameters:
os:
- osx-arm64
# - osx-arm64 Disabled due to concurrency limits
- linux-aarch64

build and upload (ARM):
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/PR-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
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_and_test-osx-arm64:
name: OSX-ARM64 Tests
runs-on: macOS-14 # M1
strategy:
fail-fast: true
max-parallel: 4
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# bail if there's no osx-arm64 recipes
- name: Check for Additional Platforms
id: additional_platforms
run: |
result=$(./scripts/check-for-additional-platforms.sh "origin/master...HEAD" "build_and_test" "${GITHUB_JOB}")
if [[ ${result} != "build" ]]
then
echo "No recipes using this platform, skipping rest of job."
echo "skip_build=true" >> $GITHUB_OUTPUT
fi

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

- name: Fetch conda install script
if: steps.additional_platforms.outputs.skip_build != 'true'
run: |
wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{install-and-set-up-conda,configure-conda,common}.sh

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

- name: Configure conda
if: steps.additional_platforms.outputs.skip_build != 'true'
run: bash configure-conda.sh

- name: Build and Test
if: steps.additional_platforms.outputs.skip_build != 'true'
env:
# Mimic circleci
OSTYPE: "darwin"
CI: "true"
run: |
set -xe
eval "$(conda shell.bash hook)"
conda activate bioconda
source common.sh
# Sets up OSX SDK
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
if: steps.additional_platforms.outputs.skip_build != 'true'
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
if: steps.additional_platforms.outputs.skip_build != 'true'
uses: actions/upload-artifact@v4
with:
name: osx-arm64-packages
path: |
/tmp/artifacts
70 changes: 70 additions & 0 deletions .github/workflows/master-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Upload (osx-arm64)
on:
push:
branches:
- master
jobs:
build_and_upload-osx-arm64:
name: OSX-ARM64 Upload
if: github.repository == 'bioconda/bioconda-recipes'
runs-on: macOS-14 # M1
strategy:
fail-fast: false
max-parallel: 4
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# bail if there's no osx-arm64 recipes
- name: Check for Additional Platforms
id: additional_platforms
run: |
result=$(./scripts/check-for-additional-platforms.sh "${GITHUB_SHA}~1 ${GITHUB_SHA}" "build_and_upload" "${GITHUB_JOB}")
if [[ ${result} != "build" ]]
then
echo "No recipes using this platform, skipping rest of job."
echo "skip_build=true" >> $GITHUB_OUTPUT
fi

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

- name: Fetch conda install script
if: steps.additional_platforms.outputs.skip_build != 'true'
run: |
wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{install-and-set-up-conda,configure-conda,common}.sh

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

- name: Configure conda
if: steps.additional_platforms.outputs.skip_build != 'true'
run: bash configure-conda.sh

- name: Build and Upload
if: steps.additional_platforms.outputs.skip_build != 'true'
env:
QUAY_LOGIN: ${{ secrets.QUAY_LOGIN }}
QUAY_OAUTH_TOKEN: ${{ secrets.QUAY_OAUTH_TOKEN }}
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
INVOLUCRO_AUTH: ${{ secrets.INVOLUCRO_AUTH }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Mimic circleci
OSTYPE: "darwin"
CI: "true"
run: |
set -xe
eval "$(conda shell.bash hook)"
conda activate bioconda
source common.sh
# Sets up OSX SDK
run_conda_forge_build_setup

bioconda-utils handle-merged-pr recipes config.yml \
--repo bioconda/bioconda-recipes \
--git-range ${GITHUB_SHA}~1 ${GITHUB_SHA} \
--fallback build \
--artifact-source github-actions
3 changes: 2 additions & 1 deletion recipes/parasail-python/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ source:
- darwin-libtool-name.patch

build:
number: 2
number: 3
skip: True # [py < 37]
script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation --no-cache-dir -vvv
run_exports:
Expand Down Expand Up @@ -53,3 +53,4 @@ extra:
- doi:10.1186/s12859-016-0930-z
additional-platforms:
- linux-aarch64
- osx-arm64
Loading