-
Notifications
You must be signed in to change notification settings - Fork 3.3k
88 lines (78 loc) · 2.84 KB
/
PR-arm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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