mirror of
https://code.videolan.org/rist/librist.git
synced 2026-07-04 15:06:53 +00:00
c236ac295e
srp_unit_test had been silently skipping in test-ubuntu because the runner image (libplacebo-ubuntu-jammy) ships without libcmocka-dev and does not give the CI user write access to /var/lib/apt/lists, so an in-script apt-get install cannot fix it. The silent skip is how the SRP fixture drift reported in #215 reached a release tag. Switch the meson detection from cc.find_library('cmocka', required: false) to dependency('cmocka', required: false, fallback: ['cmocka', 'cmocka_dep']) and add subprojects/cmocka.wrap pointing at WrapDB cmocka_1.1.8-1. When the runner image has cmocka the system copy is used; otherwise meson builds it as a subproject. Existing .gitignore rules (/subprojects/* with !*.wrap) keep the fetched source out of the tree. srp_unit's link line now picks up bcrypt on Windows because random.c calls BCryptGenRandom; the main librist target was already pulling it in via the top-level deps list, but srp_unit links random.c directly. Drop the broken apt-get line from the test-ubuntu script and add retry: 2 to both test jobs to absorb the simple+multicast environmental flake that surfaces on the shared runner regardless of branch.
118 lines
3.5 KiB
YAML
118 lines
3.5 KiB
YAML
stages:
|
|
- build
|
|
- analyze
|
|
- test
|
|
|
|
.ubuntu-amd64-bionic:
|
|
image: registry.videolan.org/librist-ubuntu-bionic:20200501213126
|
|
stage: build
|
|
tags:
|
|
- docker
|
|
- amd64
|
|
|
|
.ubuntu-amd64-jammy:
|
|
image: registry.videolan.org/libplacebo-ubuntu-jammy:20230730213642
|
|
stage: build
|
|
tags:
|
|
- docker
|
|
- amd64
|
|
|
|
.debian-amd64-common:
|
|
image: registry.videolan.org/dav1d-debian-unstable:20200306210534
|
|
stage: build
|
|
tags:
|
|
- docker
|
|
- amd64
|
|
|
|
build-ubuntu:
|
|
extends: .ubuntu-amd64-bionic
|
|
tags:
|
|
- docker
|
|
- avx2
|
|
- amd64
|
|
script:
|
|
- meson build --buildtype release --werror
|
|
- ninja -C build
|
|
|
|
build-win64:
|
|
extends: .debian-amd64-common
|
|
script:
|
|
- meson build --buildtype release
|
|
--werror
|
|
--libdir lib
|
|
--cross-file common/ci/x86_64-w64-mingw32.meson
|
|
-Ddefault_library=both
|
|
-Dhave_mingw_pthreads=true
|
|
- ninja -C build
|
|
artifacts:
|
|
paths:
|
|
- build
|
|
expire_in: 24 hours
|
|
|
|
analyze-ubuntu:
|
|
stage: analyze
|
|
extends:
|
|
- .ubuntu-amd64-bionic
|
|
needs: ["build-ubuntu"]
|
|
script:
|
|
- meson build --buildtype release --werror -Dstatic_analyze=true
|
|
- ninja -C build analyze
|
|
dependencies: []
|
|
|
|
test-ubuntu:
|
|
stage: test
|
|
extends:
|
|
- .ubuntu-amd64-jammy
|
|
needs: ["build-ubuntu"]
|
|
# simple+multicast cases are environmentally flaky on the shared
|
|
# runner (UDP/IGMP timing); retry covers transient failures.
|
|
retry: 2
|
|
script:
|
|
# cmocka comes from subprojects/cmocka.wrap when the runner image
|
|
# does not ship libcmocka-dev; #215 used to slip silently because
|
|
# the meson check skipped srp_unit_test entirely.
|
|
- meson build --buildtype release -Db_sanitize=address,undefined
|
|
- cd build && meson test --print-errorlogs
|
|
dependencies:
|
|
- build-ubuntu
|
|
artifacts:
|
|
when: always
|
|
reports:
|
|
junit: build/meson-logs/testlog.junit.xml
|
|
paths:
|
|
- build/meson-logs/testlog.txt
|
|
- build/meson-logs/testlog.junit.xml
|
|
|
|
# Run the cross-compiled Windows binaries (with mbedTLS, matching the
|
|
# release configuration) under wine so the same meson test suite that
|
|
# gates Linux also gates Windows. Catches Windows-runtime regressions
|
|
# like #208 (winsock not initialised before rist_logging_set) and the
|
|
# SRP/AES code paths under #210 that pure cross-compile cannot detect.
|
|
# Does not catch real-Windows kernel behaviours that wine does not
|
|
# replicate (e.g. the #209 WSAECONNRESET-from-ICMP-unreach interaction);
|
|
# a native Windows runner would be needed for that and is not available
|
|
# in VideoLAN's shared CI.
|
|
#
|
|
# TODO: allow_failure is set because wine on the shared CI runner is too
|
|
# slow to complete the send/receive tests within meson's 30s per-test
|
|
# budget — the same suite passes natively on Linux (test-ubuntu) and the
|
|
# logs show no crashes/asserts, only TIMEOUTs. Either bump the per-test
|
|
# timeout multiplier here or move test-win64 to a faster runner, then
|
|
# drop allow_failure.
|
|
test-win64:
|
|
stage: test
|
|
extends: .debian-amd64-common
|
|
needs: ["build-win64"]
|
|
allow_failure: true
|
|
retry: 2
|
|
dependencies:
|
|
- build-win64
|
|
script:
|
|
- wineserver -p && wine wineboot
|
|
- cd build && meson test --print-errorlogs --no-rebuild
|
|
artifacts:
|
|
when: on_failure
|
|
paths:
|
|
- build/meson-logs/testlog.txt
|
|
|