-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
98 lines (86 loc) · 2.76 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
stages:
- build
- publish
.template/build/manylinux: &template-build-manylinux
stage: build
image: quay.io/pypa/manylinux2014_x86_64
script:
- yum install -y capnproto
- ${PYBIN}/pip install poetry-core setuptools capnpy
- ${PYBIN}/pip wheel . --no-deps --no-build-isolation -w dist
- auditwheel repair --wheel-dir dist/ dist/*.whl
- rm dist/*manylinux_2_17_x86_64.whl
artifacts:
paths:
- dist
build/manylinux/3.9:
<<: *template-build-manylinux
variables:
PYBIN: /opt/python/cp39-cp39/bin
build/manylinux/3.10:
<<: *template-build-manylinux
variables:
PYBIN: /opt/python/cp310-cp310/bin
build/manylinux/3.11:
<<: *template-build-manylinux
variables:
PYBIN: /opt/python/cp311-cp311/bin
build/manylinux/arm64:
stage: build
image:
name: quay.io/podman/stable
script:
- |
podman run --rm --override-arch arm64 -t -v .:/io quay.io/pypa/manylinux2014_aarch64 sh -c "yum install -y epel-release;
yum install -y capnproto;
/opt/python/cp39-cp39/bin/pip install poetry-core setuptools capnpy;
/opt/python/cp311-cp311/bin/pip install poetry-core setuptools capnpy;
/opt/python/cp310-cp310/bin/pip install poetry-core setuptools capnpy;
cd /io;
/opt/python/cp39-cp39/bin/pip wheel . --no-deps --no-build-isolation -w dist;
sh ./pre-build.sh;
/opt/python/cp310-cp310/bin/pip wheel . --no-deps --no-build-isolation -w dist;
sh ./pre-build.sh;
/opt/python/cp311-cp311/bin/pip wheel . --no-deps --no-build-isolation -w dist;
auditwheel repair --wheel-dir dist/ dist/*.whl;
rm dist/*manylinux_2_17_aarch64.whl"
artifacts:
paths:
- dist
build/manylinux/pypy:
stage: build
image: quay.io/pypa/manylinux2014_x86_64
script:
- yum install -y capnproto
- ${PYBIN}/pip install poetry-core setuptools capnpy
- ${PYBIN}/pip wheel . --no-deps --no-build-isolation -w dist
- old=$(ls -1 dist/*pp310-pypy310_pp73*.whl)
- new=$(echo $old | sed -e 's/pp310-pypy310_pp73-manylinux_2_17_x86_64/py3-none-any/')
- mv -v "$old" "$new"
artifacts:
paths:
- dist
variables:
PYBIN: /opt/python/pp310-pypy310_pp73/bin
build/sdist:
stage: build
image: quay.io/pypa/manylinux2014_x86_64
script:
- ${PYBIN}/python -m pip install --upgrade pip
- ${PYBIN}/pip install poetry
- ${PYBIN}/poetry build --format sdist
artifacts:
paths:
- dist
variables:
PYBIN: /opt/python/cp311-cp311/bin
list_wheels:
stage: publish
image: quay.io/pypa/manylinux2014_x86_64
script:
- ${PYBIN}/python -m pip install --upgrade pip
- ${PYBIN}/pip install twine
- ${PYBIN}/twine upload dist/*.whl
- ${PYBIN}/twine upload dist/*.tar.gz
variables:
PYBIN: /opt/python/cp311-cp311/bin