Skip to content

Commit 0e5f42a

Browse files
authored
Migrated Linux CIs to use containers from a separate repo (#491)
New repository: https://github.com/anarthal/cpp-ci-containers Rationale: adding/modifying containers is easier. Containers can be shared between libraries.
1 parent 45687ea commit 0e5f42a

28 files changed

Lines changed: 45 additions & 765 deletions

.drone.star

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
#
77

88
_triggers = { "branch": [ "master", "develop" ] }
9-
_container_tag = 'e9696175806589fc91e160399eedeac8fdc88c68'
109
_win_container_tag = 'e7bd656c3515263f9b3c69a2d73d045f6a0fed72'
1110

1211

1312
def _image(name):
14-
return 'ghcr.io/anarthal-containers/{}:{}'.format(name, _container_tag)
13+
return 'ghcr.io/anarthal/cpp-ci-containers/{}'.format(name)
1514

1615
def _win_image(name):
1716
return 'ghcr.io/anarthal-containers/{}:{}'.format(name, _win_container_tag)
@@ -122,7 +121,7 @@ def _pipeline(
122121
"steps": steps,
123122
"services": [{
124123
"name": "mysql",
125-
"image": "ghcr.io/anarthal-containers/ci-db:{}-{}".format(db, _container_tag),
124+
"image": "ghcr.io/anarthal/cpp-ci-containers/{}".format(db),
126125
"volumes": [{
127126
"name": "mysql-socket",
128127
"path": "/var/run/mysqld"
@@ -150,7 +149,7 @@ def linux_b2(
150149
valgrind=0,
151150
arch='amd64',
152151
fail_if_no_openssl=1,
153-
db='mysql-8.4.1',
152+
db='mysql-8_4_1:1',
154153
):
155154
command = _b2_command(
156155
source_dir='$(pwd)',
@@ -202,7 +201,7 @@ def windows_b2(
202201
def linux_cmake(
203202
name,
204203
image,
205-
db='mysql-8.4.1',
204+
db='mysql-8_4_1:1',
206205
build_shared_libs=0,
207206
cmake_build_type='Debug',
208207
cxxstd='20',
@@ -224,15 +223,15 @@ def linux_cmake_noopenssl(name):
224223
'--source-dir=$(pwd) ' + \
225224
'cmake-noopenssl ' + \
226225
'--generator=Ninja '
227-
return _pipeline(name=name, image=_image('build-noopenssl'), os='linux', command=command, db=None)
226+
return _pipeline(name=name, image=_image('build-noopenssl:1'), os='linux', command=command, db=None)
228227

229228

230229
def linux_cmake_nointeg(name):
231230
command = 'python tools/ci/main.py ' + \
232231
'--source-dir=$(pwd) ' + \
233232
'cmake-nointeg ' + \
234233
'--generator=Ninja '
235-
return _pipeline(name=name, image=_image('build-gcc13'), os='linux', command=command, db=None)
234+
return _pipeline(name=name, image=_image('build-gcc13:1'), os='linux', command=command, db=None)
236235

237236

238237
def windows_cmake(
@@ -256,7 +255,7 @@ def windows_cmake(
256255

257256
def find_package_b2_linux(name):
258257
command = _find_package_b2_command(source_dir='$(pwd)', generator='Ninja')
259-
return _pipeline(name=name, image=_image('build-gcc13'), os='linux', command=command, db=None)
258+
return _pipeline(name=name, image=_image('build-gcc13:1'), os='linux', command=command, db=None)
260259

261260

262261
def find_package_b2_windows(name):
@@ -271,7 +270,7 @@ def bench(name):
271270
'--server-host=mysql ' + \
272271
'--connection-pool-iters=1 ' + \
273272
'--protocol-iters=1 '
274-
return _pipeline(name=name, image=_image('build-bench'), os='linux', command=command, db='mysql-8.4.1')
273+
return _pipeline(name=name, image=_image('build-bench:1'), os='linux', command=command, db='mysql-8_4_1:1')
275274

276275

277276
def docs(name):
@@ -287,11 +286,11 @@ def docs(name):
287286
def main(ctx):
288287
return [
289288
# CMake Linux
290-
linux_cmake('Linux CMake MySQL 5.x', _image('build-gcc14'), db='mysql-5.7.41', build_shared_libs=0),
291-
linux_cmake('Linux CMake MariaDB', _image('build-gcc14'), db='mariadb-11.4.2', build_shared_libs=1),
292-
linux_cmake('Linux CMake cmake 3.8', _image('build-cmake3_8'), cxxstd='11', install_test=0),
293-
linux_cmake('Linux CMake gcc Release', _image('build-gcc14'), cmake_build_type='Release'),
294-
linux_cmake('Linux CMake gcc MinSizeRel', _image('build-gcc14'), cmake_build_type='MinSizeRel'),
289+
linux_cmake('Linux CMake MySQL 5.x', _image('build-gcc14:1'), db='mysql-5_7_41:1', build_shared_libs=0),
290+
linux_cmake('Linux CMake MariaDB', _image('build-gcc14:1'), db='mariadb-11_4_2:1', build_shared_libs=1),
291+
linux_cmake('Linux CMake cmake 3.8', _image('build-cmake3_8:3'), cxxstd='11', install_test=0),
292+
linux_cmake('Linux CMake gcc Release', _image('build-gcc14:1'), cmake_build_type='Release'),
293+
linux_cmake('Linux CMake gcc MinSizeRel', _image('build-gcc14:1'), cmake_build_type='MinSizeRel'),
295294
linux_cmake_noopenssl('Linux CMake no OpenSSL'),
296295
linux_cmake_nointeg('Linux CMake without integration tests'),
297296

@@ -305,27 +304,28 @@ def main(ctx):
305304

306305
# B2 Linux
307306
# linux_b2('Linux B2 clang-3.6', _image('build-clang3_6'), toolset='clang-3.6', cxxstd='11,14'),
308-
linux_b2('Linux B2 clang-7', _image('build-clang7'), toolset='clang-7', cxxstd='14,17'),
309-
linux_b2('Linux B2 clang-11', _image('build-clang11'), toolset='clang-11', cxxstd='20'),
310-
linux_b2('Linux B2 clang-14-header-only', _image('build-clang14'), toolset='clang-14', cxxstd='11,20', separate_compilation=0),
311-
linux_b2('Linux B2 clang-14-libc++', _image('build-clang14'), toolset='clang-14', cxxstd='20', stdlib='libc++'),
312-
linux_b2('Linux B2 clang-14-arm64', _image('build-clang14'), toolset='clang-14', cxxstd='20', arch='arm64'),
313-
linux_b2('Linux B2 clang-16-sanit', _image('build-clang16'), toolset='clang-16', cxxstd='20', address_sanitizer=1, undefined_sanitizer=1),
314-
linux_b2('Linux B2 clang-16-i386-sanit', _image('build-clang16-i386'), toolset='clang-16', cxxstd='20', address_model='32', address_sanitizer=1, undefined_sanitizer=1),
315-
linux_b2('Linux B2 clang-17', _image('build-clang17'), toolset='clang-17', cxxstd='20'),
316-
linux_b2('Linux B2 clang-18', _image('build-clang18'), toolset='clang-18', cxxstd='23'),
317-
linux_b2('Linux B2 gcc-5', _image('build-gcc5'), toolset='gcc-5', cxxstd='11'), # gcc-5 C++14 doesn't like my constexpr field_view
318-
linux_b2('Linux B2 gcc-5-ts-executor', _image('build-gcc5'), toolset='gcc-5', cxxstd='11', use_ts_executor=1),
319-
linux_b2('Linux B2 gcc-6', _image('build-gcc6'), toolset='gcc-6', cxxstd='14,17'),
320-
linux_b2('Linux B2 gcc-10', _image('build-gcc10'), toolset='gcc-10', cxxstd='17,20'),
321-
linux_b2('Linux B2 gcc-11', _image('build-gcc11'), toolset='gcc-11', cxxstd='20'),
322-
linux_b2('Linux B2 gcc-11-arm64', _image('build-gcc11'), toolset='gcc-11', cxxstd='11,20', arch='arm64', variant='release'),
323-
linux_b2('Linux B2 gcc-11-arm64-sanit', _image('build-gcc11'), toolset='gcc-11', cxxstd='20', arch='arm64', variant='debug'),
324-
linux_b2('Linux B2 gcc-13', _image('build-gcc13'), toolset='gcc-13', cxxstd='20', variant='release'),
325-
linux_b2('Linux B2 gcc-14', _image('build-gcc14'), toolset='gcc-14', cxxstd='23', variant='release'),
326-
linux_b2('Linux B2 gcc-14-sanit', _image('build-gcc14'), toolset='gcc-14', cxxstd='23', variant='debug', address_sanitizer=1, undefined_sanitizer=1),
327-
linux_b2('Linux B2 gcc-14-valgrind', _image('build-gcc14'), toolset='gcc-14', cxxstd='23', variant='debug', valgrind=1),
328-
linux_b2('Linux B2 noopenssl', _image('build-noopenssl'), toolset='gcc', cxxstd='11', fail_if_no_openssl=0),
307+
linux_b2('Linux B2 clang-7', _image('build-clang7:1'), toolset='clang-7', cxxstd='14,17'),
308+
linux_b2('Linux B2 clang-11', _image('build-clang11:1'), toolset='clang-11', cxxstd='20'),
309+
linux_b2('Linux B2 clang-14-header-only1',_image('build-clang14:1'), toolset='clang-14', cxxstd='11', separate_compilation=0),
310+
linux_b2('Linux B2 clang-14-header-only2',_image('build-clang14:1'), toolset='clang-14', cxxstd='20', separate_compilation=0),
311+
linux_b2('Linux B2 clang-14-libc++', _image('build-clang14:1'), toolset='clang-14', cxxstd='20', stdlib='libc++'),
312+
linux_b2('Linux B2 clang-14-arm64', _image('build-clang14:1'), toolset='clang-14', cxxstd='20', arch='arm64'),
313+
linux_b2('Linux B2 clang-16-sanit', _image('build-clang16:1'), toolset='clang-16', cxxstd='20', address_sanitizer=1, undefined_sanitizer=1),
314+
linux_b2('Linux B2 clang-16-i386-sanit', _image('build-clang16-i386:1'), toolset='clang-16', cxxstd='20', address_model='32', address_sanitizer=1, undefined_sanitizer=1),
315+
linux_b2('Linux B2 clang-17', _image('build-clang17:1'), toolset='clang-17', cxxstd='20'),
316+
linux_b2('Linux B2 clang-18', _image('build-clang18:1'), toolset='clang-18', cxxstd='23'),
317+
linux_b2('Linux B2 gcc-5', _image('build-gcc5:1'), toolset='gcc-5', cxxstd='11'), # gcc-5 C++14 doesn't like my constexpr field_view
318+
linux_b2('Linux B2 gcc-5-ts-executor', _image('build-gcc5:1'), toolset='gcc-5', cxxstd='11', use_ts_executor=1),
319+
linux_b2('Linux B2 gcc-6', _image('build-gcc6:1'), toolset='gcc-6', cxxstd='14,17'),
320+
linux_b2('Linux B2 gcc-10', _image('build-gcc10:1'), toolset='gcc-10', cxxstd='17,20'),
321+
linux_b2('Linux B2 gcc-11', _image('build-gcc11:1'), toolset='gcc-11', cxxstd='20'),
322+
linux_b2('Linux B2 gcc-11-arm64', _image('build-gcc11:1'), toolset='gcc-11', cxxstd='11,20', arch='arm64', variant='release'),
323+
linux_b2('Linux B2 gcc-11-arm64-sanit', _image('build-gcc11:1'), toolset='gcc-11', cxxstd='20', arch='arm64', variant='debug'),
324+
linux_b2('Linux B2 gcc-13', _image('build-gcc13:1'), toolset='gcc-13', cxxstd='20', variant='release'),
325+
linux_b2('Linux B2 gcc-14', _image('build-gcc14:1'), toolset='gcc-14', cxxstd='23', variant='release'),
326+
linux_b2('Linux B2 gcc-14-sanit', _image('build-gcc14:1'), toolset='gcc-14', cxxstd='23', variant='debug', address_sanitizer=1, undefined_sanitizer=1),
327+
linux_b2('Linux B2 gcc-14-valgrind', _image('build-gcc14:1'), toolset='gcc-14', cxxstd='23', variant='debug', valgrind=1),
328+
linux_b2('Linux B2 noopenssl', _image('build-noopenssl:1'), toolset='gcc', cxxstd='11', fail_if_no_openssl=0),
329329

330330
# B2 Windows
331331
windows_b2('Windows B2 msvc14.1 32-bit', _win_image('build-msvc14_1'), toolset='msvc-14.1', cxxstd='11,14,17', variant='release', address_model='32'),

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
coverage:
1919
runs-on: ubuntu-latest
2020
container:
21-
image: ghcr.io/anarthal-containers/build-gcc14:e9696175806589fc91e160399eedeac8fdc88c68
21+
image: ghcr.io/anarthal/cpp-ci-containers/build-gcc14:1
2222
volumes:
2323
- /var/run/mysqld:/var/run/mysqld
2424
services:
2525
mysql:
26-
image: ghcr.io/anarthal-containers/ci-db:mysql-8.4.1-e9696175806589fc91e160399eedeac8fdc88c68
26+
image: ghcr.io/anarthal/cpp-ci-containers/mysql-8_4_1:1
2727
ports:
2828
- 3306:3306
2929
volumes:

.github/workflows/docker-linux.yml

Lines changed: 0 additions & 109 deletions
This file was deleted.

.github/workflows/fuzz.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
fuzz:
2121
runs-on: ubuntu-latest
2222
container:
23-
image: ghcr.io/anarthal-containers/build-clang18:e9696175806589fc91e160399eedeac8fdc88c68
23+
image: ghcr.io/anarthal/cpp-ci-containers/build-clang18:1
2424
volumes:
2525
- /var/run/mysqld:/var/run/mysqld
2626
services:
2727
mysql:
28-
image: ghcr.io/anarthal-containers/ci-db:mysql-8.4.1-e9696175806589fc91e160399eedeac8fdc88c68
28+
image: ghcr.io/anarthal/cpp-ci-containers/mysql-8_4_1:1
2929
ports:
3030
- 3306:3306
3131
volumes:

tools/docker/build-bench.dockerfile

Lines changed: 0 additions & 42 deletions
This file was deleted.

tools/docker/build-clang11.dockerfile

Lines changed: 0 additions & 24 deletions
This file was deleted.

tools/docker/build-clang14.dockerfile

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)