1
1
---
2
2
name : Python package - Check, build and test
3
3
4
- env :
5
- # Enable forward compatibility with newer versions of Python
6
- PYO3_USE_ABI3_FORWARD_COMPATIBILITY : " 1"
7
-
8
4
" on " :
9
5
push :
10
6
pull_request :
11
7
schedule :
12
8
- cron : ' 0 6 * * *' # Daily 6AM UTC build
13
9
10
+ env :
11
+ # Enable forward compatibility with newer versions of Python
12
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY : " 1"
13
+
14
+ # Matches default: ./Dockerfile_*
15
+ # Dirty hack for the lack of YAML anchors
16
+ CORE_DEB : |
17
+ ca-certificates
18
+ cargo
19
+ gcc
20
+ git
21
+ libclang-dev
22
+ libgpgme-dev
23
+ libpython3-dev
24
+ libssl-dev
25
+ libtdb-dev
26
+ make
27
+ mypy-protobuf
28
+ pkg-config
29
+ protobuf-compiler
30
+ python3-gpg
31
+ python3-pip
32
+ python3-setuptools
33
+ python3-setuptools-rust
34
+ python3-wheel
35
+ python3-wheel-whl
36
+ rustc
37
+ swig
38
+ # Matches extra packages: ./Dockerfile_*
39
+ # Dirty hack for the lack of YAML anchors
40
+ EXTRA_DEB : |
41
+ apt-file
42
+ autoconf
43
+ autopkgtest
44
+ debootstrap
45
+ devscripts
46
+ diffoscope
47
+ dpkg
48
+ dpkg-dev
49
+ g++
50
+ git-buildpackage
51
+ gnome-pkg-tools
52
+ gnupg
53
+ libapt-pkg-dev
54
+ libjs-chart.js
55
+ libjs-jquery
56
+ libjs-jquery-datatables
57
+ libjs-jquery-typeahead
58
+ libjs-moment
59
+ libjs-sphinxdoc
60
+ lintian
61
+ mypy-protobuf
62
+ openssh-client
63
+ perl-doc
64
+ pristine-tar
65
+ python3
66
+ python3-breezy
67
+ python3-setuptools-protobuf
68
+ quilt
69
+ sbuild
70
+ ssh
71
+ subversion
72
+
14
73
jobs :
15
74
checks :
16
75
name : Checks
63
122
codespell
64
123
65
124
build :
66
- name : Ubuntu-latest (Python ${{ matrix.python-version }})
125
+ name : Build - Ubuntu LTS (Python ${{ matrix.python-version }})
67
126
runs-on : ubuntu-latest
68
127
strategy :
69
128
matrix :
@@ -97,62 +156,10 @@ jobs:
97
156
run : |
98
157
set -x
99
158
sudo apt-get update --yes
100
- # Matches default: ./Dockerfile_*
101
159
sudo apt-get satisfy --yes --no-install-recommends \
102
- ca-certificates
103
- cargo
104
- gcc
105
- git
106
- libclang-dev
107
- libgpgme-dev
108
- libpython3-dev
109
- libssl-dev
110
- libtdb-dev
111
- make
112
- mypy-protobuf
113
- pkg-config
114
- protobuf-compiler
115
- python3-gpg
116
- python3-pip
117
- python3-setuptools
118
- python3-setuptools-rust
119
- python3-wheel
120
- python3-wheel-whl
121
- rustc
122
- swig
123
- # Matches extra packages: ./Dockerfile_*
160
+ ${CORE_DEB}
124
161
sudo apt-get satisfy --yes --no-install-recommends \
125
- apt-file
126
- autoconf
127
- autopkgtest
128
- debootstrap
129
- devscripts
130
- diffoscope
131
- dpkg
132
- dpkg-dev
133
- g++
134
- git-buildpackage
135
- gnome-pkg-tools
136
- gnupg
137
- libapt-pkg-dev
138
- libjs-chart.js
139
- libjs-jquery
140
- libjs-jquery-datatables
141
- libjs-jquery-typeahead
142
- libjs-moment
143
- libjs-sphinxdoc
144
- lintian
145
- mypy-protobuf
146
- openssh-client
147
- perl-doc
148
- pristine-tar
149
- python3
150
- python3-breezy
151
- python3-setuptools-protobuf
152
- quilt
153
- sbuild
154
- ssh
155
- subversion
162
+ ${EXTRA_DEB}
156
163
157
164
- name : Install dependencies (rust)
158
165
run : |
@@ -179,19 +186,78 @@ jobs:
179
186
set -x
180
187
make all
181
188
189
+ build-container :
190
+ name : Build & Test - Debian Testing
191
+ runs-on : ubuntu-latest
192
+ container :
193
+ # This is to match: ./Dockerfile_*
194
+ # https://hub.docker.com/_/debian
195
+ image : docker.io/debian:testing-slim
196
+
197
+ # There is a lot here that is duplicated (build-container & build)
198
+ # Can be made 'better' when GitLab actions support YAML anchors
199
+ # https://github.com/actions/runner/issues/1182
200
+ # Using system environments as a temp/dirty hack
201
+ # Steps to perform in job
202
+ steps :
203
+ - name : Checkout code
204
+ uses : actions/checkout@v4
205
+
206
+ # Due to PyPi's gpg v1.10.0 needing libgpgme-dev < 1.18.0-3
207
+ - name : Install PyPi GPG backward compatibility hacks
208
+ run : |
209
+ set -x
210
+ mkdir -pv "$HOME/.local/bin"
211
+ cp -vr ./scripts/* "$HOME/.local/bin/"
212
+ echo "$HOME/.local/bin" | tee -a $GITHUB_PATH
213
+
214
+ - name : Install dependencies (apt)
215
+ run : |
216
+ set -x
217
+ apt-get update --yes
218
+ apt-get satisfy --yes --no-install-recommends \
219
+ ${CORE_DEB}
220
+ apt-get satisfy --yes --no-install-recommends \
221
+ ${EXTRA_DEB}
222
+
223
+ - name : Install dependencies (rust)
224
+ run : |
225
+ set -x
226
+ git clone https://github.com/jelmer/ognibuild.git /build/ognibuild/
227
+ cd /build/ognibuild/
228
+ cargo build --verbose
229
+
230
+ - name : PIP install & setup
231
+ run : |
232
+ set -x
233
+ pip3 install --break-system-packages --upgrade --editable \
234
+ .[dev,debian]
235
+ python3 setup.py develop
236
+ python3 setup.py build_ext -i
237
+
238
+ - name : Make
239
+ run : |
240
+ set -x
241
+ make
242
+
243
+ - name : Make all
244
+ run : |
245
+ set -x
246
+ make all
247
+
182
248
- name : Python static typing checks (mypy)
183
249
if : always()
184
250
run : |
185
251
set -x
186
- sudo apt-get satisfy --yes --no-install-recommends \
252
+ apt-get satisfy --yes --no-install-recommends \
187
253
python3-breezy.tests
188
254
make typing
189
255
190
256
- name : Test config (janitor.debian.net)
191
257
if : always()
192
258
run : |
193
259
set -x
194
- sudo apt-get satisfy --yes --no-install-recommends \
260
+ apt-get satisfy --yes --no-install-recommends \
195
261
git
196
262
git clone https://salsa.debian.org/janitor-team/janitor.debian.net \
197
263
janitor.debian.net
@@ -202,9 +268,15 @@ jobs:
202
268
if : always()
203
269
run : |
204
270
set -x
205
- sudo apt-get satisfy --yes --no-install-recommends \
206
- postgresql
207
- pip3 install --break-system-packages --upgrade \
271
+ PSQL_DEB=$( apt-cache search 'postgresql-.*-debversion' \
272
+ | awk '{print $1}' \
273
+ | tail -n 1 )
274
+ apt-get satisfy --yes --no-install-recommends \
275
+ dpkg-dev \
276
+ postgresql \
277
+ ${PSQL_DEB} \
278
+ libjs-jquery-datatables
279
+ pip3 install --break-system-packages --upgrade --editable \
208
280
.[test]
209
281
if test "$(id -u)" = "0"; then
210
282
echo "-- Switching to postgres user"
0 commit comments