-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
166 lines (135 loc) · 3.63 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
include:
- project: "epi2melabs/ci-templates"
file:
- "push-github.yaml"
- "push-conda.yaml"
- "snippets.yaml"
image: ${UBUNTUIMAGE}:20.04
variables:
GIT_SUBMODULE_STRATEGY: recursive
.prep-image: &prep-image |
export DEBIAN_FRONTEND=noninteractive
apt update -qq
apt install -y --no-install-recommends gcc autoconf libtool automake valgrind make curl wget zlib1g-dev libbz2-dev libreadline-dev libssl-dev libffi-dev liblzma-dev libcurl4-gnutls-dev
.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
bld:program:
stage: test
before_script:
- *prep-image
script:
- !reference [.check, license]
- make modbam2bed
- ./modbam2bed --help
- make mem_check
bld:api-test:
stage: test
script:
- *prep-image
- *minimal-python
- make test_api
- make test_python
deploy-checks:
stage: prerelease
variables:
PACKAGE_NAME: modbampy
script:
- !reference [.check, argp-c-version]
- !reference [.check, python-version]
- !reference [.check, changelog]
- !reference [.check, license]
rules:
- if: '$CI_COMMIT_TAG =~ /^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$/'
.before-script: &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
- *before-script
conda-arm:
extends: .deploy-conda-linux-arm
variables:
RECIPEPATH: "../conda"
before_script:
- *prep-image
- *before-script
conda-mac:
extends: .deploy-conda-mac
variables:
RECIPEPATH: "../conda"
before_script:
- *before-script
conda-mac-arm:
extends: .deploy-conda-mac-arm
variables:
RECIPEPATH: "../conda"
before_script:
- *before-script
### Python
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: &many-linux-def
stage: prerelease
variables:
DO_COUNT_TEST: 1
script:
- echo "Building a Python ${PYWHEEL} wheel on manylinux_${FLAVOUR}"
- ./build-wheels.sh . ${PYWHEEL}
artifacts:
paths:
- wheelhouse-final/*.whl
only:
- tags
make-wheels-2010:
extends: .many-linux
image: "quay.io/pypa/manylinux2010_x86_64"
parallel:
matrix:
- PYWHEEL: [7, 8]
FLAVOUR: ["2010"]
make-wheels-2014:
extends: .many-linux
image: "quay.io/pypa/manylinux2014_x86_64"
parallel:
matrix:
- PYWHEEL: [7, 8, 9]
FLAVOUR: ["2014"]
make-wheels-2_24:
extends: .many-linux
image: "quay.io/pypa/manylinux_2_24_x86_64"
parallel:
matrix:
- PYWHEEL: [8, 9, 10]
FLAVOUR: ["2_24"]
deploy:pypi:
stage: release
script:
- *minimal-python
- make pypi_build/bin/activate
- source pypi_build/bin/activate
- twine upload --non-interactive dist/modbampy*.tar.gz wheelhouse-final/modbampy*.whl
rules:
- if: '$CI_COMMIT_TAG =~ /^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$/'