-
-
Notifications
You must be signed in to change notification settings - Fork 520
49 lines (46 loc) · 1.35 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
name: Conda Build
on:
push:
branches:
- 'master'
pull_request:
branches: [master]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
activate-environment: ""
channel-priority: strict
miniforge-variant: Miniforge3
- shell: bash -l {0}
run: conda info --envs
- name: Build pytorch-3dunet
shell: bash -l {0}
run: |
conda install -q conda-build
conda build -c pytorch -c nvidia -c conda-forge conda-recipe
- name: Create pytorch3dunet env
run: |
conda create -n pytorch3dunet -c local -c pytorch -c nvidia -c conda-forge pytorch-3dunet pytest
- name: Run pytest
shell: bash -l {0}
run: |
conda activate pytorch3dunet
pytest
conda deactivate
- name: Deploy on conda
if: ${{ matrix.os == 'ubuntu-latest' && startsWith( github.ref, 'refs/tags/') && success() }}
env:
ANACONDA_SECRET: ${{ secrets.ANACONDA_TOKEN }}
shell: bash -l {0}
run: |
conda install -q anaconda-client
anaconda -t $ANACONDA_SECRET upload $CONDA/conda-bld/**/pytorch-3dunet-*.tar.bz2