-
Notifications
You must be signed in to change notification settings - Fork 23
68 lines (65 loc) · 2.18 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
62
63
64
65
66
67
68
name: "Build Conda Packages"
on:
pull_request:
branches:
- "*"
push:
branches:
- "master"
defaults:
run:
shell: bash -l {0}
jobs:
build:
name: conda build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dump env
run: |
printenv
echo "USER_ID=$(id -u)" >> $GITHUB_ENV
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2.1.1
with:
miniconda-version: "py310_24.1.2-0"
auto-update-conda: false
conda-build-version: 3
auto-activate-base: true
activate-environment: ""
conda-solver: "classic"
- name: Setup Xcode and SDK on macOS
if: runner.os == 'macOS'
run: |
MACOS_SDK=MacOSX10.9.sdk
curl -OL https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/${MACOS_SDK}.tar.xz
sudo tar xf ${MACOS_SDK}.tar.xz -C /opt
printf "CONDA_BUILD_SYSROOT:\n - /opt/${MACOS_SDK}\n" >> conda-recipe/conda_build_config.yaml
- name: Build macOS
if: runner.os == 'macOS'
run: |
mkdir packages
conda config --add channels paulscherrerinstitute
conda build --output-folder packages conda-recipe
- name: Build Linux
if: runner.os == 'linux'
uses: docker://conda/miniconda3-centos7:latest
with:
args: bash -c "conda config --add channels paulscherrerinstitute;conda install conda-build;conda info;cd /github/workspace;mkdir packages;conda build --output-folder packages conda-recipe"
env:
HOST_USER_ID: ${{ env.USER_ID }}
- name: Upload Anaconda
run: |
conda install anaconda-client
[[ -z ${MY_CONDA_TOKEN} ]] || anaconda -v -t ${MY_CONDA_TOKEN} upload --force packages/*/*.tar.bz2
env:
MY_CONDA_TOKEN: ${{ secrets.MY_CONDA_TOKEN }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
path: packages/*/*.tar.bz2
retention-days: 1