| 1 |
# Nightly build for the main branch across multiple targets. |
| 2 |
name: Nightly Build |
| 3 |
|
| 4 |
on: |
| 5 |
workflow_dispatch: |
| 6 |
schedule: |
| 7 |
- cron: '15 1 * * *' |
| 8 |
|
| 9 |
env: |
| 10 |
docker-registry: ghcr.io |
| 11 |
docker-config-path: ci/docker |
| 12 |
|
| 13 |
permissions: |
| 14 |
contents: read |
| 15 |
packages: write |
| 16 |
|
| 17 |
jobs: |
| 18 |
# Run our nightly builds. We build a matrix with the various build |
| 19 |
# targets and their details. Then we build either in a docker container |
| 20 |
# (Linux) or on the actual hosts (macOS, Windows). |
| 21 |
build: |
| 22 |
# Only run scheduled workflows on the main repository; prevents people |
| 23 |
# from using build minutes on their forks. |
| 24 |
if: github.repository == 'libgit2/libgit2' |
| 25 |
|
| 26 |
strategy: |
| 27 |
matrix: |
| 28 |
platform: |
| 29 |
# All builds: core platforms |
| 30 |
- name: "Linux (Noble, GCC, OpenSSL, libssh2)" |
| 31 |
id: noble-gcc-openssl |
| 32 |
os: ubuntu-latest |
| 33 |
container: |
| 34 |
name: noble |
| 35 |
env: |
| 36 |
CC: gcc |
| 37 |
CMAKE_GENERATOR: Ninja |
| 38 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=libssh2 -DDEBUG_STRICT_ALLOC=ON -DDEBUG_STRICT_OPEN=ON |
| 39 |
- name: "Linux (Noble, Clang, mbedTLS, OpenSSH)" |
| 40 |
id: noble-clang-mbedtls |
| 41 |
os: ubuntu-latest |
| 42 |
container: |
| 43 |
name: noble |
| 44 |
env: |
| 45 |
CC: clang |
| 46 |
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=exec -DUSE_HTTP_PARSER=http-parser |
| 47 |
CMAKE_GENERATOR: Ninja |
| 48 |
- name: "Linux (Xenial, GCC, OpenSSL, OpenSSH)" |
| 49 |
id: xenial-gcc-openssl |
| 50 |
os: ubuntu-latest |
| 51 |
container: |
| 52 |
name: xenial |
| 53 |
env: |
| 54 |
CC: gcc |
| 55 |
CMAKE_GENERATOR: Ninja |
| 56 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=exec -DDEBUG_STRICT_ALLOC=ON -DDEBUG_STRICT_OPEN=ON |
| 57 |
- name: "Linux (Xenial, Clang, mbedTLS, libssh2)" |
| 58 |
id: xenial-gcc-mbedtls |
| 59 |
os: ubuntu-latest |
| 60 |
container: |
| 61 |
name: xenial |
| 62 |
env: |
| 63 |
CC: clang |
| 64 |
CMAKE_GENERATOR: Ninja |
| 65 |
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=libssh2 |
| 66 |
- name: "macOS" |
| 67 |
id: macos |
| 68 |
os: macos-14 |
| 69 |
setup-script: osx |
| 70 |
env: |
| 71 |
CC: clang |
| 72 |
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON |
| 73 |
CMAKE_GENERATOR: Ninja |
| 74 |
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig |
| 75 |
SKIP_SSH_TESTS: true |
| 76 |
SKIP_NEGOTIATE_TESTS: true |
| 77 |
- name: "iOS" |
| 78 |
id: ios |
| 79 |
os: macos-14 |
| 80 |
setup-script: ios |
| 81 |
env: |
| 82 |
CC: clang |
| 83 |
CMAKE_OPTIONS: -DBUILD_TESTS=OFF -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DCMAKE_TOOLCHAIN_FILE=../ios.toolchain.cmake -DCMAKE_SYSTEM_NAME=iOS -DPLATFORM=OS64 |
| 84 |
CMAKE_GENERATOR: Ninja |
| 85 |
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig |
| 86 |
SKIP_TESTS: true # Cannot exec iOS app on macOS |
| 87 |
- name: "Windows (amd64, Visual Studio, Schannel)" |
| 88 |
id: windows-amd64-vs |
| 89 |
os: windows-2022 |
| 90 |
setup-script: win32 |
| 91 |
env: |
| 92 |
ARCH: amd64 |
| 93 |
CMAKE_GENERATOR: Visual Studio 17 2022 |
| 94 |
CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DUSE_HTTPS=Schannel -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2 |
| 95 |
BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin |
| 96 |
BUILD_TEMP: D:\Temp |
| 97 |
SKIP_SSH_TESTS: true |
| 98 |
SKIP_NEGOTIATE_TESTS: true |
| 99 |
- name: "Windows (x86, Visual Studio, WinHTTP)" |
| 100 |
id: windows-x86-vs |
| 101 |
os: windows-2022 |
| 102 |
setup-script: win32 |
| 103 |
env: |
| 104 |
ARCH: x86 |
| 105 |
CMAKE_GENERATOR: Visual Studio 17 2022 |
| 106 |
CMAKE_OPTIONS: -A Win32 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2 |
| 107 |
BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin |
| 108 |
BUILD_TEMP: D:\Temp |
| 109 |
SKIP_SSH_TESTS: true |
| 110 |
SKIP_NEGOTIATE_TESTS: true |
| 111 |
- name: "Windows (amd64, mingw, WinHTTP)" |
| 112 |
id: windows-amd64-mingw |
| 113 |
os: windows-2022 |
| 114 |
setup-script: mingw |
| 115 |
env: |
| 116 |
ARCH: amd64 |
| 117 |
CMAKE_GENERATOR: MinGW Makefiles |
| 118 |
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON |
| 119 |
BUILD_TEMP: D:\Temp |
| 120 |
BUILD_PATH: D:\Temp\mingw64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin |
| 121 |
SKIP_SSH_TESTS: true |
| 122 |
SKIP_NEGOTIATE_TESTS: true |
| 123 |
- name: "Windows (x86, mingw, Schannel)" |
| 124 |
id: windows-x86-mingw |
| 125 |
os: windows-2022 |
| 126 |
setup-script: mingw |
| 127 |
env: |
| 128 |
ARCH: x86 |
| 129 |
CMAKE_GENERATOR: MinGW Makefiles |
| 130 |
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON -DUSE_HTTPS=Schannel |
| 131 |
BUILD_TEMP: D:\Temp |
| 132 |
BUILD_PATH: D:\Temp\mingw32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin |
| 133 |
SKIP_SSH_TESTS: true |
| 134 |
SKIP_NEGOTIATE_TESTS: true |
| 135 |
|
| 136 |
# All builds: sanitizers |
| 137 |
- name: "Sanitizer (Memory)" |
| 138 |
id: memorysanitizer |
| 139 |
os: ubuntu-latest |
| 140 |
setup-script: sanitizer |
| 141 |
container: |
| 142 |
name: noble |
| 143 |
env: |
| 144 |
CC: clang |
| 145 |
CFLAGS: -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-blacklist=/home/libgit2/source/script/sanitizers.supp -fno-optimize-sibling-calls -fno-omit-frame-pointer |
| 146 |
CMAKE_OPTIONS: -DCMAKE_C_EXTENSIONS=ON -DCMAKE_PREFIX_PATH=/usr/local/msan -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON |
| 147 |
CMAKE_GENERATOR: Ninja |
| 148 |
SKIP_SSH_TESTS: true |
| 149 |
SKIP_NEGOTIATE_TESTS: true |
| 150 |
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10 |
| 151 |
UBSAN_OPTIONS: print_stacktrace=1 |
| 152 |
- name: "Sanitizer (UndefinedBehavior)" |
| 153 |
id: ubsanitizer |
| 154 |
os: ubuntu-latest |
| 155 |
setup-script: sanitizer |
| 156 |
container: |
| 157 |
name: noble |
| 158 |
env: |
| 159 |
CC: clang |
| 160 |
CFLAGS: -fsanitize=undefined,nullability -fno-sanitize-recover=undefined,nullability -fsanitize-blacklist=/home/libgit2/source/script/sanitizers.supp -fno-optimize-sibling-calls -fno-omit-frame-pointer |
| 161 |
CMAKE_OPTIONS: -DCMAKE_PREFIX_PATH=/usr/local -DUSE_HTTPS=OpenSSL -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON |
| 162 |
CMAKE_GENERATOR: Ninja |
| 163 |
SKIP_SSH_TESTS: true |
| 164 |
SKIP_NEGOTIATE_TESTS: true |
| 165 |
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10 |
| 166 |
UBSAN_OPTIONS: print_stacktrace=1 |
| 167 |
- name: "Sanitizer (Thread)" |
| 168 |
id: threadsanitizer |
| 169 |
os: ubuntu-latest |
| 170 |
setup-script: sanitizer |
| 171 |
container: |
| 172 |
name: noble |
| 173 |
env: |
| 174 |
CC: clang |
| 175 |
CFLAGS: -fsanitize=thread -fno-optimize-sibling-calls -fno-omit-frame-pointer |
| 176 |
CMAKE_OPTIONS: -DCMAKE_PREFIX_PATH=/usr/local -DUSE_HTTPS=OpenSSL -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON |
| 177 |
CMAKE_GENERATOR: Ninja |
| 178 |
SKIP_SSH_TESTS: true |
| 179 |
SKIP_NEGOTIATE_TESTS: true |
| 180 |
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10 |
| 181 |
UBSAN_OPTIONS: print_stacktrace=1 |
| 182 |
TSAN_OPTIONS: suppressions=/home/libgit2/source/script/thread-sanitizer.supp second_deadlock_stack=1 |
| 183 |
|
| 184 |
# Nightly builds: extended platforms |
| 185 |
- name: "Linux (CentOS 7, OpenSSL)" |
| 186 |
id: centos7-openssl |
| 187 |
os: ubuntu-latest |
| 188 |
container: |
| 189 |
name: centos7 |
| 190 |
env: |
| 191 |
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON |
| 192 |
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig |
| 193 |
SKIP_NEGOTIATE_TESTS: true |
| 194 |
SKIP_PUSHOPTIONS_TESTS: true |
| 195 |
- name: "Linux (CentOS 7, dynamically-loaded OpenSSL)" |
| 196 |
id: centos7-dynamicopenssl |
| 197 |
os: ubuntu-latest |
| 198 |
container: |
| 199 |
name: centos7 |
| 200 |
env: |
| 201 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL-Dynamic -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON |
| 202 |
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig |
| 203 |
SKIP_NEGOTIATE_TESTS: true |
| 204 |
SKIP_PUSHOPTIONS_TESTS: true |
| 205 |
- name: "Linux (CentOS 8, OpenSSL)" |
| 206 |
id: centos8-openssl |
| 207 |
os: ubuntu-latest |
| 208 |
container: |
| 209 |
name: centos8 |
| 210 |
env: |
| 211 |
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON |
| 212 |
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig |
| 213 |
SKIP_NEGOTIATE_TESTS: true |
| 214 |
SKIP_SSH_TESTS: true |
| 215 |
- name: "Linux (CentOS 8, dynamically-loaded OpenSSL)" |
| 216 |
id: centos8-dynamicopenssl |
| 217 |
os: ubuntu-latest |
| 218 |
container: |
| 219 |
name: centos8 |
| 220 |
env: |
| 221 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL-Dynamic -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON |
| 222 |
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig |
| 223 |
SKIP_NEGOTIATE_TESTS: true |
| 224 |
SKIP_SSH_TESTS: true |
| 225 |
ARCH: x86 |
| 226 |
- name: "Linux (Fedora, llhttp)" |
| 227 |
id: fedora |
| 228 |
os: ubuntu-latest |
| 229 |
container: |
| 230 |
name: fedora |
| 231 |
env: |
| 232 |
CC: gcc |
| 233 |
CMAKE_GENERATOR: Ninja |
| 234 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=pcre2 -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=libssh2 -DUSE_HTTP_PARSER=llhttp |
| 235 |
- name: "Linux (Bionic, GCC, dynamically-loaded OpenSSL)" |
| 236 |
id: bionic-gcc-dynamicopenssl |
| 237 |
container: |
| 238 |
name: bionic |
| 239 |
dockerfile: bionic |
| 240 |
env: |
| 241 |
CC: gcc |
| 242 |
CMAKE_GENERATOR: Ninja |
| 243 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL-Dynamic -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON |
| 244 |
RUN_INVASIVE_TESTS: true |
| 245 |
SKIP_PUSHOPTIONS_TESTS: true |
| 246 |
os: ubuntu-latest |
| 247 |
- name: "Linux (x86, Bionic, Clang, OpenSSL)" |
| 248 |
id: bionic-x86-clang-openssl |
| 249 |
container: |
| 250 |
name: bionic-x86 |
| 251 |
dockerfile: bionic |
| 252 |
qemu: true |
| 253 |
env: |
| 254 |
CC: clang |
| 255 |
CMAKE_GENERATOR: Ninja |
| 256 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON |
| 257 |
RUN_INVASIVE_TESTS: true |
| 258 |
SKIP_PUSHOPTIONS_TESTS: true |
| 259 |
os: ubuntu-latest |
| 260 |
- name: "Linux (x86, Bionic, GCC, OpenSSL)" |
| 261 |
id: bionic-x86-gcc-openssl |
| 262 |
container: |
| 263 |
name: bionic-x86 |
| 264 |
dockerfile: bionic |
| 265 |
env: |
| 266 |
CC: gcc |
| 267 |
CMAKE_GENERATOR: Ninja |
| 268 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON |
| 269 |
RUN_INVASIVE_TESTS: true |
| 270 |
SKIP_PUSHOPTIONS_TESTS: true |
| 271 |
os: ubuntu-latest |
| 272 |
- name: "Linux (arm32, Bionic, GCC, OpenSSL)" |
| 273 |
id: bionic-arm32-gcc-openssl |
| 274 |
container: |
| 275 |
name: bionic-arm32 |
| 276 |
dockerfile: bionic |
| 277 |
qemu: true |
| 278 |
env: |
| 279 |
CC: gcc |
| 280 |
CMAKE_GENERATOR: Ninja |
| 281 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_GSSAPI=ON -DUSE_SSH=ON |
| 282 |
RUN_INVASIVE_TESTS: true |
| 283 |
SKIP_PROXY_TESTS: true |
| 284 |
SKIP_PUSHOPTIONS_TESTS: true |
| 285 |
GITTEST_FLAKY_STAT: true |
| 286 |
os: ubuntu-latest |
| 287 |
- name: "Linux (arm64, Bionic, GCC, OpenSSL)" |
| 288 |
id: bionic-arm64-gcc-openssl |
| 289 |
container: |
| 290 |
name: bionic-arm64 |
| 291 |
dockerfile: bionic |
| 292 |
qemu: true |
| 293 |
env: |
| 294 |
CC: gcc |
| 295 |
CMAKE_GENERATOR: Ninja |
| 296 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_GSSAPI=ON -DUSE_SSH=ON |
| 297 |
RUN_INVASIVE_TESTS: true |
| 298 |
SKIP_PROXY_TESTS: true |
| 299 |
SKIP_PUSHOPTIONS_TESTS: true |
| 300 |
os: ubuntu-latest |
| 301 |
|
| 302 |
# Nightly builds: ensure we fallback when missing core functionality |
| 303 |
- name: "Linux (no threads)" |
| 304 |
id: xenial-nothreads |
| 305 |
os: ubuntu-latest |
| 306 |
container: |
| 307 |
name: xenial |
| 308 |
env: |
| 309 |
CC: gcc |
| 310 |
CMAKE_OPTIONS: -DTHREADSAFE=OFF -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON |
| 311 |
CMAKE_GENERATOR: Ninja |
| 312 |
SKIP_PUSHOPTIONS_TESTS: true |
| 313 |
- name: "Linux (no mmap)" |
| 314 |
id: noble-nommap |
| 315 |
os: ubuntu-latest |
| 316 |
container: |
| 317 |
name: noble |
| 318 |
env: |
| 319 |
CC: gcc |
| 320 |
CFLAGS: -DNO_MMAP |
| 321 |
CMAKE_OPTIONS: -DCMAKE_PREFIX_PATH=/usr/local |
| 322 |
CMAKE_GENERATOR: Ninja |
| 323 |
SKIP_SSH_TESTS: true |
| 324 |
SKIP_NEGOTIATE_TESTS: true |
| 325 |
- name: "Windows (no mmap)" |
| 326 |
id: windows-nommap |
| 327 |
os: windows-2022 |
| 328 |
env: |
| 329 |
ARCH: amd64 |
| 330 |
CMAKE_GENERATOR: Visual Studio 17 2022 |
| 331 |
CFLAGS: -DNO_MMAP |
| 332 |
CMAKE_OPTIONS: -A x64 -DDEPRECATE_HARD=ON |
| 333 |
SKIP_SSH_TESTS: true |
| 334 |
SKIP_NEGOTIATE_TESTS: true |
| 335 |
|
| 336 |
# Nightly builds: extended SSL support |
| 337 |
- name: "Linux (dynamically-loaded OpenSSL)" |
| 338 |
id: xenial-dynamicopenssl |
| 339 |
os: ubuntu-latest |
| 340 |
container: |
| 341 |
name: xenial |
| 342 |
env: |
| 343 |
CC: clang |
| 344 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL-Dynamic -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON |
| 345 |
CMAKE_GENERATOR: Ninja |
| 346 |
|
| 347 |
# All builds: experimental SHA256 support |
| 348 |
- name: "Linux (SHA256, Xenial, Clang, OpenSSL)" |
| 349 |
id: linux-sha256 |
| 350 |
container: |
| 351 |
name: xenial |
| 352 |
env: |
| 353 |
CC: clang |
| 354 |
CMAKE_GENERATOR: Ninja |
| 355 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON |
| 356 |
os: ubuntu-latest |
| 357 |
- name: "macOS (SHA256)" |
| 358 |
id: macos-sha256 |
| 359 |
os: macos-14 |
| 360 |
setup-script: osx |
| 361 |
env: |
| 362 |
CC: clang |
| 363 |
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON |
| 364 |
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig |
| 365 |
SKIP_SSH_TESTS: true |
| 366 |
SKIP_NEGOTIATE_TESTS: true |
| 367 |
- name: "Windows (SHA256, amd64, Visual Studio)" |
| 368 |
id: windows-sha256 |
| 369 |
os: windows-2022 |
| 370 |
env: |
| 371 |
ARCH: amd64 |
| 372 |
CMAKE_GENERATOR: Visual Studio 17 2022 |
| 373 |
CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DEXPERIMENTAL_SHA256=ON |
| 374 |
SKIP_SSH_TESTS: true |
| 375 |
SKIP_NEGOTIATE_TESTS: true |
| 376 |
# TODO: this is a temporary removal |
| 377 |
SKIP_GITDAEMON_TESTS: true |
| 378 |
- name: "Linux (SHA256, Xenial, Clang, OpenSSL-FIPS)" |
| 379 |
id: linux-sha256-fips |
| 380 |
container: |
| 381 |
name: xenial |
| 382 |
env: |
| 383 |
CC: clang |
| 384 |
CMAKE_GENERATOR: Ninja |
| 385 |
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DUSE_SHA1=OpenSSL-FIPS -DUSE_SHA256=OpenSSL-FIPS |
| 386 |
os: ubuntu-latest |
| 387 |
fail-fast: false |
| 388 |
env: ${{ matrix.platform.env }} |
| 389 |
runs-on: ${{ matrix.platform.os }} |
| 390 |
name: "Build ${{ matrix.platform.name }}" |
| 391 |
steps: |
| 392 |
- name: Check out repository |
| 393 |
uses: actions/checkout@v4 |
| 394 |
with: |
| 395 |
path: source |
| 396 |
fetch-depth: 0 |
| 397 |
- name: Set up build environment |
| 398 |
run: source/ci/setup-${{ matrix.platform.setup-script }}-build.sh |
| 399 |
shell: bash |
| 400 |
if: matrix.platform.setup-script != '' |
| 401 |
- name: Setup QEMU |
| 402 |
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset |
| 403 |
if: matrix.platform.container.qemu == true |
| 404 |
- name: Set up container |
| 405 |
uses: ./source/.github/actions/download-or-build-container |
| 406 |
with: |
| 407 |
registry: ${{ env.docker-registry }} |
| 408 |
config-path: ${{ env.docker-config-path }} |
| 409 |
container: ${{ matrix.platform.container.name }} |
| 410 |
github_token: ${{ secrets.github_token }} |
| 411 |
dockerfile: ${{ matrix.platform.container.dockerfile }} |
| 412 |
if: matrix.platform.container.name != '' |
| 413 |
- name: Prepare build |
| 414 |
run: mkdir build |
| 415 |
- name: Build |
| 416 |
uses: ./source/.github/actions/run-build |
| 417 |
with: |
| 418 |
command: cd ${BUILD_WORKSPACE:-.}/build && ../source/ci/build.sh |
| 419 |
container: ${{ matrix.platform.container.name }} |
| 420 |
container-version: ${{ env.docker-registry-container-sha }} |
| 421 |
shell: ${{ matrix.platform.shell }} |
| 422 |
- name: Test |
| 423 |
uses: ./source/.github/actions/run-build |
| 424 |
with: |
| 425 |
command: cd ${BUILD_WORKSPACE:-.}/build && ../source/ci/test.sh |
| 426 |
container: ${{ matrix.platform.container.name }} |
| 427 |
container-version: ${{ env.docker-registry-container-sha }} |
| 428 |
shell: ${{ matrix.platform.shell }} |
| 429 |
- name: Upload test results |
| 430 |
uses: actions/upload-artifact@v4 |
| 431 |
if: success() || failure() |
| 432 |
with: |
| 433 |
name: test-results-${{ matrix.platform.id }} |
| 434 |
path: build/results_*.xml |
| 435 |
|
| 436 |
test_results: |
| 437 |
name: Test results |
| 438 |
needs: [ build ] |
| 439 |
if: ${{ always() && github.repository == 'libgit2/libgit2' }} |
| 440 |
runs-on: ubuntu-latest |
| 441 |
steps: |
| 442 |
- name: Download test results |
| 443 |
uses: actions/download-artifact@v4 |
| 444 |
- name: Generate test summary |
| 445 |
uses: test-summary/action@v2 |
| 446 |
with: |
| 447 |
paths: 'test-results-*/*.xml' |
| 448 |
|
| 449 |
coverity: |
| 450 |
# Only run scheduled workflows on the main repository; prevents people |
| 451 |
# from using build minutes on their forks. |
| 452 |
if: github.repository == 'libgit2/libgit2' |
| 453 |
|
| 454 |
name: Coverity |
| 455 |
runs-on: ubuntu-latest |
| 456 |
steps: |
| 457 |
- name: Check out repository |
| 458 |
uses: actions/checkout@v4 |
| 459 |
with: |
| 460 |
path: source |
| 461 |
fetch-depth: 0 |
| 462 |
- name: Set up container |
| 463 |
uses: ./source/.github/actions/download-or-build-container |
| 464 |
with: |
| 465 |
registry: ${{ env.docker-registry }} |
| 466 |
config-path: ${{ env.docker-config-path }} |
| 467 |
container: xenial |
| 468 |
github_token: ${{ secrets.github_token }} |
| 469 |
if: matrix.platform.container.name != '' |
| 470 |
- name: Run Coverity |
| 471 |
run: source/ci/coverity.sh |
| 472 |
env: |
| 473 |
COVERITY_TOKEN: ${{ secrets.coverity_token }} |
| 474 |
|
| 475 |
codeql: |
| 476 |
# Only run scheduled workflows on the main repository; prevents people |
| 477 |
# from using build minutes on their forks. |
| 478 |
if: github.repository == 'libgit2/libgit2' |
| 479 |
|
| 480 |
permissions: |
| 481 |
actions: read |
| 482 |
contents: read |
| 483 |
security-events: write |
| 484 |
|
| 485 |
name: CodeQL |
| 486 |
runs-on: ubuntu-latest |
| 487 |
steps: |
| 488 |
- name: Check out repository |
| 489 |
uses: actions/checkout@v4 |
| 490 |
with: |
| 491 |
fetch-depth: 0 |
| 492 |
|
| 493 |
# Initializes the CodeQL tools for scanning. |
| 494 |
- name: Initialize CodeQL |
| 495 |
uses: github/codeql-action/init@v3 |
| 496 |
with: |
| 497 |
languages: 'cpp' |
| 498 |
|
| 499 |
- name: Build |
| 500 |
run: | |
| 501 |
mkdir build |
| 502 |
cd build |
| 503 |
cmake .. -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON |
| 504 |
cmake --build . |
| 505 |
|
| 506 |
- name: Perform CodeQL Analysis |
| 507 |
uses: github/codeql-action/analyze@v2 |