forked from OpenBioSim/biosimspace
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (62 loc) · 2.11 KB
/
main.yaml
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
name: Release Main
on:
workflow_dispatch:
inputs:
upload_packages:
required: true
description: "Upload packages to anaconda?"
type: boolean
jobs:
build:
name: build (${{ matrix.python-version }}, ${{ matrix.platform.name }})
runs-on: ${{ matrix.platform.os }}
strategy:
max-parallel: 9
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
platform:
- { name: "windows", os: "windows-latest", shell: "pwsh" }
- { name: "linux", os: "ubuntu-latest", shell: "bash -l {0}" }
- { name: "macos", os: "macos-latest", shell: "bash -l {0}" }
exclude:
- platform:
{ name: "macos", os: "macos-latest", shell: "bash -l {0}" }
python-version: "3.12" # MacOS can't run 3.12 yet...
environment:
name: biosimspace-build
defaults:
run:
shell: ${{ matrix.platform.shell }}
env:
SIRE_DONT_PHONEHOME: 1
SIRE_SILENT_PHONEHOME: 1
steps:
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: bss_build
miniforge-version: latest
#
- name: Clone the main branch
run: git clone -b main https://github.com/openbiosim/biosimspace
#
- name: Setup Conda
run: conda install -y -c conda-forge boa anaconda-client packaging pip-requirements-parser
#
- name: Update Conda recipe
run: python ${{ github.workspace }}/biosimspace/actions/update_recipe.py
#
- name: Prepare build location
run: mkdir ${{ github.workspace }}/build
#
- name: Build Conda package using conda build
run: conda build -c conda-forge -c openbiosim/label/main ${{ github.workspace }}/biosimspace/recipes/biosimspace
#
- name: Upload Conda package
run: python ${{ github.workspace }}/biosimspace/actions/upload_package.py
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
ANACONDA_LABEL: main
if: github.event.inputs.upload_packages == 'true'