|
8 | 8 | # For Drone CI we use the Starlark scripting language to reduce duplication. |
9 | 9 | # As the yaml syntax for Drone CI is rather limited. |
10 | 10 | # |
11 | | -# |
| 11 | + |
| 12 | +globalenv = { |
| 13 | + 'B2_CI_VERSION': '1', |
| 14 | + 'B2_VARIANT': 'debug,release', |
| 15 | + 'B2_FLAGS': 'warnings=extra warnings-as-errors=on', |
| 16 | +} |
12 | 17 |
|
13 | 18 | def main(ctx): |
14 | | - return generate( |
15 | | - # Compilers |
| 19 | + # generate() provides: main compiler matrix, asan, ubsan, coverage, |
| 20 | + # and cmake-superproject (linux/latest gcc) by default |
| 21 | + jobs = generate( |
16 | 22 | [ |
17 | | - 'gcc >=10.0', |
18 | | - 'clang >=10.0', |
19 | | - 'msvc >=14.1', |
20 | | - 'arm64-gcc latest', |
21 | | - 's390x-gcc latest', |
22 | | - # 'freebsd-gcc latest', |
23 | | - 'apple-clang *', |
24 | | - 'arm64-clang latest', |
25 | | - 's390x-clang latest', |
26 | | - 'freebsd-clang latest', |
27 | | - 'x86-msvc latest' |
| 23 | + 'gcc >=13.0', |
| 24 | + 'clang >=17.0', |
| 25 | + # 'msvc >=14.1', |
| 26 | + 'arm64-clang latest' |
| 27 | + # 'x86-msvc latest' |
28 | 28 | ], |
29 | | - # Standards |
30 | 29 | '>=20', |
31 | | - packages=['zlib1g', 'zlib1g-dev', 'libbrotli-dev']) |
| 30 | + cmake=False, |
| 31 | + docs=False, |
| 32 | + coverage=False, |
| 33 | + asan=False, |
| 34 | + cache_dir='cache') |
| 35 | + # Note: liburing-dev is not added to generate()'s package list. |
| 36 | + # generate() emits jobs on Ubuntu focal (which has no liburing-dev |
| 37 | + # package at all) and jammy (liburing 2.1, which our probe rejects |
| 38 | + # for being too old). Either way io_uring stays disabled, so the |
| 39 | + # install would just fail focal. The manual jobs below that target |
| 40 | + # noble (24.04) explicitly install liburing-dev where it works. |
| 41 | + |
| 42 | + # macOS: generate() skips apple-clang when cxx_range='>=20' because |
| 43 | + # ci-automation's compiler_supports() doesn't list C++20 for apple-clang |
| 44 | + # jobs += [ |
| 45 | + # osx_cxx("macOS: Clang 16.2.0", "clang++", packages="", |
| 46 | + # buildscript="drone", buildtype="boost", |
| 47 | + # xcode_version="16.2.0", |
| 48 | + # environment={ |
| 49 | + # 'B2_TOOLSET': 'clang', |
| 50 | + # 'B2_CXXSTD': '20', |
| 51 | + # }, |
| 52 | + # globalenv=globalenv), |
| 53 | + # |
| 54 | + # osx_cxx("macOS: Clang 26.2.0", "clang++", packages="", |
| 55 | + # buildscript="drone", buildtype="boost", |
| 56 | + # xcode_version="26.2.0", |
| 57 | + # environment={ |
| 58 | + # 'B2_TOOLSET': 'clang', |
| 59 | + # 'B2_CXXSTD': '20', |
| 60 | + # }, |
| 61 | + # globalenv=globalenv), |
| 62 | + # ] |
| 63 | + |
| 64 | + # jobs += [ |
| 65 | + # freebsd_cxx("clang-22", "clang++-22", |
| 66 | + # buildscript="drone", buildtype="boost", |
| 67 | + # freebsd_version="15.0", |
| 68 | + # environment={ |
| 69 | + # 'B2_TOOLSET': 'clang-22', |
| 70 | + # 'B2_CXXSTD': '20', |
| 71 | + # }, |
| 72 | + # globalenv=globalenv), |
| 73 | + # ] |
| 74 | + |
| 75 | + # Jobs not covered by generate() |
| 76 | + jobs += [ |
| 77 | + # linux_cxx("Valgrind", "clang++-17", packages="clang-17 libc6-dbg libstdc++-12-dev liburing-dev", |
| 78 | + # llvm_os="jammy", llvm_ver="17", |
| 79 | + # buildscript="drone", buildtype="valgrind", |
| 80 | + # image="cppalliance/droneubuntu2204:1", |
| 81 | + # environment={ |
| 82 | + # 'COMMENT': 'valgrind', |
| 83 | + # 'B2_TOOLSET': 'clang-17', |
| 84 | + # 'B2_CXXSTD': '20', |
| 85 | + # 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', |
| 86 | + # 'B2_VARIANT': 'debug', |
| 87 | + # 'B2_TESTFLAGS': 'testing.launcher=valgrind', |
| 88 | + # 'VALGRIND_OPTS': '--error-exitcode=1', |
| 89 | + # }, |
| 90 | + # globalenv=globalenv), |
| 91 | + |
| 92 | + # Note: no liburing-dev on the Drone cmake jobs even though the |
| 93 | + # noble image has 2.5+. Docker's default seccomp profile blocks |
| 94 | + # the io_uring_setup syscall (post-CVE hardening), so io_uring |
| 95 | + # tests would compile in but abort at runtime with EPERM |
| 96 | + # ('io_uring_queue_init_params: Operation not permitted'). |
| 97 | + # Without liburing-dev the CMake probe disables the backend and |
| 98 | + # the cmake-mainproject/subdirectory jobs exercise epoll only. |
| 99 | + # io_uring runtime coverage is provided by the GitHub Actions |
| 100 | + # Linux jobs, which run on unrestricted GitHub-hosted runners. |
| 101 | + linux_cxx("cmake-mainproject", "g++-13", packages="g++-13", |
| 102 | + image="cppalliance/droneubuntu2404:1", |
| 103 | + buildtype="cmake-mainproject", buildscript="drone", |
| 104 | + environment={ |
| 105 | + 'COMMENT': 'cmake-mainproject', |
| 106 | + 'CXX': 'g++-13', |
| 107 | + }, |
| 108 | + globalenv=globalenv), |
| 109 | + |
| 110 | + linux_cxx("cmake-subdirectory", "g++-13", packages="g++-13", |
| 111 | + image="cppalliance/droneubuntu2404:1", |
| 112 | + buildtype="cmake-subdirectory", buildscript="drone", |
| 113 | + environment={ |
| 114 | + 'COMMENT': 'cmake-subdirectory', |
| 115 | + 'CXX': 'g++-13', |
| 116 | + }, |
| 117 | + globalenv=globalenv) |
| 118 | + |
| 119 | + # windows_cxx("msvc-14.3 cmake-superproject", "", |
| 120 | + # image="cppalliance/dronevs2022:1", |
| 121 | + # buildtype="cmake-superproject", buildscript="drone", |
| 122 | + # environment={ |
| 123 | + # 'B2_TOOLSET': 'msvc-14.3', |
| 124 | + # 'B2_CXXSTD': '20', |
| 125 | + # }, |
| 126 | + # globalenv=globalenv), |
| 127 | + ] |
| 128 | + |
| 129 | + return jobs |
| 130 | + |
32 | 131 |
|
33 | 132 | # from https://github.com/cppalliance/ci-automation |
34 | 133 | load("@ci_automation//ci/drone/:functions.star", "linux_cxx", "windows_cxx", "osx_cxx", "freebsd_cxx", "generate") |
0 commit comments