-
Notifications
You must be signed in to change notification settings - Fork 33
50 lines (46 loc) · 1.44 KB
/
build-deploy-on-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
name: Conda Build
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set PlantSeg version name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Print PlantSeg version name
run: |
echo $RELEASE_VERSION
- uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
activate-environment: ""
channels: local,conda-forge,defaults
channel-priority: false
- shell: bash -l {0}
run: |
conda info --envs
- name: Build PlantSeg using Boa
shell: bash -l {0}
run: |
# conda config --set allow_conda_downgrades true
# conda install conda=4.12.0 -y
conda install --yes -c conda-forge mamba
mamba install -q boa
conda mambabuild -c conda-forge conda-recipe
- name: Create PlantSeg env
run: |
mamba create -n plant-seg -c local -c conda-forge plantseg pytest
- name: Run pytest
shell: bash -l {0}
run: |
conda activate plant-seg
pytest
conda deactivate
- name: Deploy on conda
if: ${{ startsWith( github.ref, 'refs/tags/') && success() }}
env:
ANACONDA_SECRET: ${{ secrets.ANACONDA_TOKEN }}
shell: bash -l {0}
run: |
mamba install -q anaconda-client
anaconda -t $ANACONDA_SECRET upload $CONDA/conda-bld/**/plantseg-*.tar.bz2