-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
174 lines (143 loc) · 3.8 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
include:
- project: "epi2melabs/ci-templates"
file:
- "push-github.yaml"
- "push-conda.yaml"
- "snippets.yaml"
image: ${UBUNTUIMAGE}:20.04
variables:
GIT_SUBMODULE_STRATEGY: recursive
GH_NAMESPACE: "nanoporetech"
.prep-image: &prep-image |
export DEBIAN_FRONTEND=noninteractive
apt update -qq
apt install -y --no-install-recommends gcc autoconf libtool automake make curl wget zlib1g-dev git
.minimal-python: &minimal-python |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq && apt-get install -y -qq python3-all-dev python3-venv
stages:
- test
- prerelease
- release
test:
stage: test
parallel:
matrix:
- PYENV_VERSION: ["3.8", "3.9", "3.10", "3.11"]
script:
- *prep-image
- !reference [.install, pyenv]
- !reference [.setup, pyenv-python]
- make test
deploy-checks:
stage: prerelease
variables:
PACKAGE_NAME: pyspoa
LICENSE_FILE: BSD-4-CLAUSE
script:
- !reference [.check, python-version-setup]
- !reference [.check, changelog]
- !reference [.check, license]
rules:
- if: '$CI_COMMIT_TAG =~ /^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$/'
.conda-before-script: &conda-before-script |
export CONDA_PKG=${CI_PROJECT_NAME}
export CONDA_PKG_VERSION=${CI_COMMIT_TAG/v/}
mkdir conda-build
cd conda-build
conda:
extends:
- .deploy-conda-linux
variables:
RECIPEPATH: "../conda"
before_script:
- *prep-image
- *conda-before-script
conda-arm:
extends:
- .deploy-conda-linux-arm
variables:
RECIPEPATH: "../conda"
before_script:
- *prep-image
- *conda-before-script
conda-mac:
extends:
- .deploy-conda-mac
variables:
RECIPEPATH: "../conda"
before_script:
- *conda-before-script
conda-mac-arm:
extends:
- .deploy-conda-mac-arm
variables:
RECIPEPATH: "../conda"
before_script:
- *conda-before-script
### Python
# The selection of wheels built here is mainly driven by the matrix
# we build for medaka.
bld:py-sdist:
stage: prerelease
script:
- *prep-image
- *minimal-python
- make sdist
- cd dist
- python3 -m venv venv
- . venv/bin/activate
- pip install --upgrade pip
- pip install *.tar.gz
artifacts:
paths:
- dist/*.tar.gz
.many-linux:
stage: prerelease
script:
- echo "Building a Python ${PYWHEEL} wheel on manylinux_${FLAVOUR}"
- ./build-wheels.sh . ${PYWHEEL}
artifacts:
paths:
- wheelhouse-final/*.whl
wheels-2014:
extends: .many-linux
image: "quay.io/pypa/manylinux2014_x86_64"
parallel:
matrix:
- PYWHEEL: [7, 8, 9]
FLAVOUR: ["2014"]
wheels-arm-2014:
extends: .many-linux
tags:
- arm64
image: "quay.io/pypa/manylinux2014_aarch64"
parallel:
matrix:
- PYWHEEL: [8, 9, 10]
FLAVOUR: ["2014"]
wheels-2_28:
extends: .many-linux
image: "quay.io/pypa/manylinux_2_28_x86_64"
parallel:
matrix:
- PYWHEEL: [8, 9, 10, 11]
FLAVOUR: ["2_28"]
wheels-arm-2_28:
extends: .many-linux
tags:
- arm64
image: "quay.io/pypa/manylinux_2_28_aarch64"
parallel:
matrix:
- PYWHEEL: [8, 9, 10, 11]
FLAVOUR: ["2_28"]
deploy:pypi:
stage: release
script:
- *minimal-python
- make pypi_build/bin/activate
- source pypi_build/bin/activate
- twine upload --non-interactive wheelhouse-final/pyspoa*.whl dist/pyspoa*.tar.gz
rules:
- if: '$CI_COMMIT_TAG =~ /^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$/'