-
Notifications
You must be signed in to change notification settings - Fork 6
61 lines (59 loc) · 2.7 KB
/
conda-build.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
name: conda-build
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
conda-build:
name: ${{ matrix.conda_build_yml }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { conda_build_yml: linux_64_python3.9_default.____cpython, os: ubuntu-latest, conda-build-args: '' }
- { conda_build_yml: linux_64_python3.12_default.____cpython, os: ubuntu-latest, conda-build-args: '' }
- { conda_build_yml: linux_aarch64_python3.10_default.____cpython, os: ubuntu-latest, conda-build-args: ' --no-test' }
- { conda_build_yml: linux_ppc64le_python3.10_default.____cpython, os: ubuntu-latest, conda-build-args: ' --no-test' }
- { conda_build_yml: osx_64_python3.11_default.____cpython, os: macos-latest, conda-build-args: '' }
- { conda_build_yml: osx_arm64_python3.9.____cpython, os: macos-latest, conda-build-args: ' --no-test' }
- { conda_build_yml: osx_arm64_python3.10.____cpython, os: macos-latest, conda-build-args: ' --no-test' }
- { conda_build_yml: win_64_python3.9.____cpython, os: windows-latest, conda-build-args: '' }
- { conda_build_yml: win_64_python3.12.____cpython, os: windows-latest, conda-build-args: '' }
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Fetch full git history
run: git fetch --prune --unshallow
- uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7
with:
init-shell: ${{ matrix.os == 'windows-latest' && 'cmd.exe' || 'bash' }}
micromamba-version: 1.5.10-0
environment-name: build
create-args: conda-build
- name: Patch conda build configuration
# use the latest macOS SDK when cross-compiling for arm64
if: startsWith(matrix.conda_build_yml, 'osx_arm64')
run: |
CONDA_BUILD_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)"
cat <<EOF >> ".ci_support/${{ matrix.CONDA_BUILD_YML }}.yaml"
CONDA_BUILD_SYSROOT:
- "${CONDA_BUILD_SYSROOT}"
EOF
- name: Build conda package (unix)
if: matrix.os != 'windows-latest'
shell: bash -el {0}
run: >-
conda-build
-m ".ci_support/${{ matrix.CONDA_BUILD_YML }}.yaml"${{ matrix.conda-build-args }}
conda.recipe
- name: Build conda package (windows)
if: matrix.os == 'windows-latest'
shell: cmd /C CALL {0}
run: >-
conda-build
-m ".ci_support/${{ matrix.conda_build_yml }}.yaml"${{ matrix.conda-build-args }}
conda.recipe