-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
75 lines (67 loc) · 1.87 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
include:
- project: "epi2melabs/ci-templates"
file: "snippets.yaml"
- project: "epi2melabs/ci-templates"
file: "push-github.yaml"
- project: "epi2melabs/ci-templates"
file: "push-conda.yaml"
image: ${UBUNTUIMAGE}:20.04
variables:
GH_NAMESPACE: nanoporetech
PYENV_VERSION: 3.8.12
.prep-image: &prep-image |
export DEBIAN_FRONTEND=noninteractive
apt update -qq
apt install -y --no-install-recommends make wget python3-all-dev python3-venv git libbz2-dev libncurses5-dev libncursesw5-dev libffi-dev libreadline-dev libssl-dev liblzma-dev libsqlite3-dev
stages:
- test
- build
- prerelease
- release
- postrelease
test:
stage: test
script:
- *prep-image
- !reference [.install, pyenv]
- !reference [.setup, pyenv-python]
- make test
- make sdist
artifacts:
paths:
- dist/*.tar.gz
system_test:
stage: test
script:
- *prep-image
- !reference [.install, pyenv]
- !reference [.setup, pyenv-python]
- make system_test
deploy-checks:
stage: prerelease
variables:
PACKAGE_NAME: spectre
script:
- !reference [.check, python-version]
- !reference [.check, changelog]
rules:
- if: '$CI_COMMIT_TAG =~ /^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$/'
deploy:pypi:
stage: release
script:
- *prep-image
- make pypi_build/bin/activate
- source pypi_build/bin/activate
- twine upload --non-interactive dist/*.tar.gz
rules:
- if: '$CI_COMMIT_TAG =~ /^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$/'
conda:
variables:
PACKAGE_ARCH: "noarch"
extends:
- .deploy-conda
before_script:
- *prep-image
- export CONDA_PKG=${CI_PROJECT_NAME}
- export CONDA_PKG_VERSION=${CI_COMMIT_TAG/v/}
- cd conda