-
Notifications
You must be signed in to change notification settings - Fork 16
/
.gitlab-ci.yml
73 lines (68 loc) · 2.25 KB
/
.gitlab-ci.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
67
68
69
70
71
72
73
stages:
- build
- publish
- deploy
build:
stage: build
image: continuumio/miniconda3
variables:
script:
- conda install -yq conda-build conda-verify
- conda build conda/ -c defaults -c astra-toolbox
- mkdir -p artifacts
- mv /opt/conda/conda-bld/noarch/tomosipo*.tar.bz2 artifacts/
artifacts:
paths:
- artifacts/
expire_in: 7 days
publish-dev:
stage: publish
image: continuumio/miniconda3
only:
- develop
# Only publish when this has been manually requested. We want to be a good
# anaconda citizen, and not publish each and every commit of the package.
when: manual
variables:
ANACONDA_USERNAME: $ANACONDA_USERNAME
ANACONDA_PASSWORD: $ANACONDA_PASSWORD
script:
- conda install -yq anaconda-client
- set +x
- anaconda login --username "$ANACONDA_USERNAME" --password "$ANACONDA_PASSWORD" --hostname $(cat /dev/urandom | base32 | head -c 32)
- set -x
- anaconda upload --label dev artifacts/*.bz2
- anaconda logout
publish-release:
stage: publish
image: continuumio/miniconda3
only:
- tags
variables:
ANACONDA_USERNAME: $ANACONDA_USERNAME
ANACONDA_PASSWORD: $ANACONDA_PASSWORD
script:
- conda install -yq anaconda-client
- set +x
- anaconda login --username "$ANACONDA_USERNAME" --password "$ANACONDA_PASSWORD" --hostname $(cat /dev/urandom | base32 | head -c 32)
- set -x
- anaconda upload artifacts/*.bz2
- anaconda logout
pages:
stage: deploy
image: pytorch/manylinux-cuda92
script:
- yum install mesa-libGL-devel -y # pyopengl requires an installed opengl lib.
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O install_conda.sh
- bash install_conda.sh -b
- export PATH="$HOME/miniconda3/bin:$PATH"
- conda install python=3.7 cudatoolkit=9.2 astra-toolbox pyqtgraph pyqt pyopengl pytorch ffmpeg ffmpeg-python matplotlib sphinx ipython sphinx_rtd_theme recommonmark -c defaults -c astra-toolbox -c conda-forge -yq
- pip install .[dev]
- sphinx-apidoc -M -f -e --tocfile api_reference -H "API Reference" --ext-autodoc -o doc/ref/ tomosipo
- sphinx-build -b html doc/ public
- python -msphinx -b doctest doc ./doctest-output # Run doctest
artifacts:
paths:
- public
only:
- master