forked from hiddenSymmetries/simsopt
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.75 KB
/
conda.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
name: Conda
on:
workflow_dispatch:
push:
branches:
- master
- mbk/conda_package
pull_request:
release:
types: [published]
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-12]
python-version: ["3.9"]
runs-on: ${{ matrix.platform }}
# The setup-miniconda action needs this to activate miniconda
defaults:
run:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Fetch all history for setuptools_scm to work
run: git fetch --prune --unshallow
- name: Get conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
- name: Prepare
run: conda install -y conda-build conda-verify setuptools_scm anaconda-client scikit-build-core
- name: Build and upload
if: github.event_name == 'release' && github.event.action == 'published'
run: |
conda config --set anaconda_upload yes
conda build --token ${{ secrets.ANACONDA_TOKEN }} conda.recipe
- name: Build and upload to test
if: github.event_name == 'push' && github.ref == 'refs/heads/mbk/conda_package'
run: |
conda config --set anaconda_upload yes
conda build --token ${{ secrets.MBK_ANACONDA_TOKEN }} conda.recipe
- name: Build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
conda build --no-test conda.recipe
- name: Build on PR
if: github.event_name == 'pull_request'
run: |
conda build --no-test conda.recipe