-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (47 loc) · 1.88 KB
/
conda-publish.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: Build larch on linux and publish to Anaconda Cloud
on:
workflow_dispatch:
jobs:
conda-publish:
runs-on: ubuntu-latest
environment: conda-publish
steps:
- name: Check out code
uses: actions/checkout@v2
with:
submodules: true
- name: Prepare build environment
run: |
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev python3-pip python3-pytest git git-lfs
- name: Install conda
run: |
curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda
~/miniconda/bin/conda update -n base -c defaults conda
- name: Create conda env
run: |
source ~/miniconda/etc/profile.d/conda.sh
conda config --prepend channels conda-forge
conda config --prepend channels bioconda
conda config --show channels
conda env create -f environment-dev.yml
- name: Build conda package and upload to Anaconda Cloud
env:
ANACONDA_USER: ${{ vars.ANACONDA_USER }}
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
ANACONDA_FLAGS: ${{ vars.ANACONDA_FLAGS }}
INCLUDE_LARCH_TEST: ${{ vars.INCLUDE_LARCH_TEST }}
RUN_LARCH_TEST: ${{ vars.RUN_LARCH_TEST }}
UPLOAD_TO_ANACONDA: ${{ vars.UPLOAD_TO_ANACONDA }}
run: |
source ~/miniconda/etc/profile.d/conda.sh
conda activate larch-dev
export LARCH_VERSION=$(cat ./VERSION)
export INCLUDE_LARCH_TEST=${INCLUDE_LARCH_TEST}
export RUN_LARCH_TEST=${RUN_LARCH_TEST}
if [[ ${UPLOAD_TO_ANACONDA} == true ]]; then
conda build . --user ${ANACONDA_USER} --token ${ANACONDA_TOKEN} ${ANACONDA_FLAGS}
else
conda build .
fi