-
Notifications
You must be signed in to change notification settings - Fork 20
/
.gitlab-ci.yml
137 lines (124 loc) · 2.97 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
image: continuumio/miniconda3
stages:
- lint
- test
- build
- deploy
lint:
stage: lint
script:
- apt update && apt install -y gcc
- conda install python=3.9 psutil
- pip install .
- pip install "pydocstyle<4" flake8 pep8-naming flake8-docstrings
- flake8 --config=.flake8 scared tests setup.py
test:python36:
stage: test
script:
- apt update && apt install -y gcc
- eval "$(conda shell.bash hook)"
- conda create -n env-python36 python=3.6
- conda activate env-python36
- python setup.py test -v
test:python37:
stage: test
script:
- apt update && apt install -y gcc
- eval "$(conda shell.bash hook)"
- conda create -n env-python37 python=3.7
- conda activate env-python37
- python setup.py test -v
test:python38:
stage: test
script:
- apt update && apt install -y gcc
- eval "$(conda shell.bash hook)"
- conda create -n env-python38 python=3.8
- conda activate env-python38
- python setup.py test -v
test:python39:
stage: test
script:
- apt update && apt install -y gcc
- eval "$(conda shell.bash hook)"
- conda create -n env-python39 python=3.9
- conda activate env-python39
- python setup.py test -v
build:pypi:src:
stage: build
script:
- pip install -U pip setuptools
- python setup.py sdist
only:
- tags
artifacts:
paths:
- "dist/*"
build:pypi:wheel:
stage: build
script:
- pip install -U pip setuptools wheel
- python setup.py bdist_wheel
only:
- tags
artifacts:
paths:
- "dist/*"
deploy:pypi:
stage: deploy
only:
- tags
when: manual
script:
- pip install -U pip setuptools twine
- twine upload --repository-url $PYPI_REPOSITORY dist/*.tar.gz -u $PYPI_USERNAME -p $PYPI_PWD
- twine upload --repository-url $PYPI_REPOSITORY dist/*.whl -u $PYPI_USERNAME -p $PYPI_PWD
build-dev:conda:
stage: build
script:
- cd .recipe
- conda install conda-build conda-verify
- conda config --add channels $ANACONDA_CHANNEL
- conda build --output-folder out dev
artifacts:
paths:
- ".recipe/out/*/*.tar.bz2"
build:conda:
stage: build
script:
- cd .recipe
- conda install conda-build conda-verify
- conda config --add channels $ANACONDA_CHANNEL
- conda build --output-folder out prod
only:
- tags
artifacts:
paths:
- ".recipe/out/*/*.tar.bz2"
deploy:conda:
stage: deploy
script:
- cd .recipe
- conda config --add channels $ANACONDA_CHANNEL
- conda update conda
- conda install anaconda-client
- anaconda login --username $ANACONDA_USERNAME --password $ANACONDA_PWD
- anaconda upload out/*/scared*.tar.bz2
- anaconda logout
when: manual
artifacts:
paths:
- ".recipe/out/*/*.tar.bz2"
pages:
stage: build
script:
- conda install python=3.6 psutil
- conda install -c conda-forge myst-parser
- pip install -e .
- cd docs
- ./build_doc.sh
artifacts:
paths:
- public
only:
- tags