Update Ubuntu image to 24.04

* Use gcovr from pip to get most recent version. Older versions fail to
  parse gcov output.
* Disable warnings for ASAN build to avoid false positives.
This commit is contained in:
elsid 2025-03-30 20:32:15 +02:00
parent 0196cf453d
commit 1a25609961
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40
2 changed files with 55 additions and 42 deletions

View file

@ -27,14 +27,14 @@ variables:
.Ubuntu_Image: .Ubuntu_Image:
tags: tags:
- saas-linux-medium-amd64 - saas-linux-medium-amd64
image: ubuntu:22.04 image: ubuntu:24.04
rules: rules:
- if: $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event"
Ubuntu_GCC_preprocess: Ubuntu_GCC_preprocess:
extends: .Ubuntu_Image extends: .Ubuntu_Image
cache: cache:
key: Ubuntu_GCC_preprocess.ubuntu_22.04.v1 key: Ubuntu_GCC_preprocess.ubuntu_24.04.v1
paths: paths:
- apt-cache/ - apt-cache/
- .cache/pip/ - .cache/pip/
@ -43,7 +43,7 @@ Ubuntu_GCC_preprocess:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script: before_script:
- CI/install_debian_deps.sh openmw-deps openmw-deps-dynamic gcc_preprocess - CI/install_debian_deps.sh openmw-deps openmw-deps-dynamic gcc_preprocess
- pip3 install --user click termtables - pip3 install --break-system-packages --user termtables
script: script:
- CI/ubuntu_gcc_preprocess.sh - CI/ubuntu_gcc_preprocess.sh
@ -79,7 +79,7 @@ Ubuntu_GCC_preprocess:
- if [[ "${BUILD_TESTS_ONLY}" && ! "${BUILD_WITH_CODE_COVERAGE}" ]]; then ./openmw_settings_access_benchmark; fi - if [[ "${BUILD_TESTS_ONLY}" && ! "${BUILD_WITH_CODE_COVERAGE}" ]]; then ./openmw_settings_access_benchmark; fi
- ccache -s - ccache -s
- df -h - df -h
- if [[ "${BUILD_WITH_CODE_COVERAGE}" ]]; then gcovr --xml-pretty --exclude-unreachable-branches --print-summary --root "${CI_PROJECT_DIR}" -j $(nproc) -o ../coverage.xml; fi - if [[ "${BUILD_WITH_CODE_COVERAGE}" ]]; then /root/.local/bin/gcovr --xml-pretty --exclude-unreachable-branches --print-summary --root "${CI_PROJECT_DIR}" -j $(nproc) -o ../coverage.xml; fi
- ls | grep -v -e '^extern$' -e '^install$' -e '^components-tests.xml$' -e '^openmw-tests.xml$' -e '^openmw-cs-tests.xml$' | xargs -I '{}' rm -rf './{}' - ls | grep -v -e '^extern$' -e '^install$' -e '^components-tests.xml$' -e '^openmw-tests.xml$' -e '^openmw-cs-tests.xml$' | xargs -I '{}' rm -rf './{}'
- cd .. - cd ..
- df -h - df -h
@ -99,7 +99,7 @@ Coverity:
rules: rules:
- if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_PIPELINE_SOURCE == "schedule"
cache: cache:
key: Coverity.ubuntu_22.04.v1 key: Coverity.ubuntu_24.04.v1
paths: paths:
- apt-cache/ - apt-cache/
- ccache/ - ccache/
@ -138,7 +138,7 @@ Coverity:
Ubuntu_GCC: Ubuntu_GCC:
extends: .Ubuntu extends: .Ubuntu
cache: cache:
key: Ubuntu_GCC.ubuntu_22.04.v1 key: Ubuntu_GCC.ubuntu_24.04.v1
before_script: before_script:
- CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic - CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic
variables: variables:
@ -151,7 +151,7 @@ Ubuntu_GCC:
Ubuntu_GCC_asan: Ubuntu_GCC_asan:
extends: Ubuntu_GCC extends: Ubuntu_GCC
cache: cache:
key: Ubuntu_GCC_asan.ubuntu_22.04.v1 key: Ubuntu_GCC_asan.ubuntu_24.04.v1
variables: variables:
CMAKE_BUILD_TYPE: Debug CMAKE_BUILD_TYPE: Debug
CMAKE_CXX_FLAGS_DEBUG: -g -O1 -fno-omit-frame-pointer -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak CMAKE_CXX_FLAGS_DEBUG: -g -O1 -fno-omit-frame-pointer -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak
@ -164,7 +164,7 @@ Clang_Format:
extends: .Ubuntu_Image extends: .Ubuntu_Image
stage: checks stage: checks
cache: cache:
key: Ubuntu_Clang_Format.ubuntu_22.04.v1 key: Ubuntu_Clang_Format.ubuntu_24.04.v1
paths: paths:
- apt-cache/ - apt-cache/
variables: variables:
@ -180,7 +180,7 @@ Lupdate:
extends: .Ubuntu_Image extends: .Ubuntu_Image
stage: checks stage: checks
cache: cache:
key: Ubuntu_lupdate.ubuntu_22.04.v1 key: Ubuntu_lupdate.ubuntu_24.04.v1
paths: paths:
- apt-cache/ - apt-cache/
variables: variables:
@ -206,7 +206,7 @@ Teal:
Ubuntu_GCC_Debug: Ubuntu_GCC_Debug:
extends: .Ubuntu extends: .Ubuntu
cache: cache:
key: Ubuntu_GCC_Debug.ubuntu_22.04.v2 key: Ubuntu_GCC_Debug.ubuntu_24.04.v2
before_script: before_script:
- CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic - CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic
variables: variables:
@ -222,7 +222,7 @@ Ubuntu_GCC_Debug:
Ubuntu_GCC_tests: Ubuntu_GCC_tests:
extends: Ubuntu_GCC extends: Ubuntu_GCC
cache: cache:
key: Ubuntu_GCC_tests.ubuntu_22.04.v1 key: Ubuntu_GCC_tests.ubuntu_24.04.v1
variables: variables:
CCACHE_SIZE: 1G CCACHE_SIZE: 1G
BUILD_TESTS_ONLY: 1 BUILD_TESTS_ONLY: 1
@ -236,7 +236,7 @@ Ubuntu_GCC_tests:
.Ubuntu_GCC_tests_Debug: .Ubuntu_GCC_tests_Debug:
extends: Ubuntu_GCC extends: Ubuntu_GCC
cache: cache:
key: Ubuntu_GCC_tests_Debug.ubuntu_22.04.v1 key: Ubuntu_GCC_tests_Debug.ubuntu_24.04.v1
variables: variables:
CCACHE_SIZE: 1G CCACHE_SIZE: 1G
BUILD_TESTS_ONLY: 1 BUILD_TESTS_ONLY: 1
@ -252,12 +252,12 @@ Ubuntu_GCC_tests:
Ubuntu_GCC_tests_asan: Ubuntu_GCC_tests_asan:
extends: Ubuntu_GCC extends: Ubuntu_GCC
cache: cache:
key: Ubuntu_GCC_tests_asan.ubuntu_22.04.v1 key: Ubuntu_GCC_tests_asan.ubuntu_24.04.v1
variables: variables:
CCACHE_SIZE: 1G CCACHE_SIZE: 1G
BUILD_TESTS_ONLY: 1 BUILD_TESTS_ONLY: 1
CMAKE_BUILD_TYPE: Debug CMAKE_BUILD_TYPE: Debug
CMAKE_CXX_FLAGS_DEBUG: -g -O1 -fno-omit-frame-pointer -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak CMAKE_CXX_FLAGS_DEBUG: -g -O1 -fno-omit-frame-pointer -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak -w
CMAKE_EXE_LINKER_FLAGS: -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak -fuse-ld=mold CMAKE_EXE_LINKER_FLAGS: -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak -fuse-ld=mold
ASAN_OPTIONS: halt_on_error=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1 ASAN_OPTIONS: halt_on_error=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
# Disable -Werror due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562 # Disable -Werror due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562
@ -272,12 +272,12 @@ Ubuntu_GCC_tests_asan:
Ubuntu_GCC_tests_ubsan: Ubuntu_GCC_tests_ubsan:
extends: Ubuntu_GCC extends: Ubuntu_GCC
cache: cache:
key: Ubuntu_GCC_tests_ubsan.ubuntu_22.04.v1 key: Ubuntu_GCC_tests_ubsan.ubuntu_24.04.v1
variables: variables:
CCACHE_SIZE: 1G CCACHE_SIZE: 1G
BUILD_TESTS_ONLY: 1 BUILD_TESTS_ONLY: 1
CMAKE_BUILD_TYPE: Debug CMAKE_BUILD_TYPE: Debug
CMAKE_CXX_FLAGS_DEBUG: -g -O0 -fsanitize=undefined CMAKE_CXX_FLAGS_DEBUG: -g -O0 -fsanitize=undefined -w
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1 UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
artifacts: artifacts:
paths: [] paths: []
@ -289,7 +289,7 @@ Ubuntu_GCC_tests_ubsan:
.Ubuntu_GCC_tests_tsan: .Ubuntu_GCC_tests_tsan:
extends: Ubuntu_GCC extends: Ubuntu_GCC
cache: cache:
key: Ubuntu_GCC_tests_tsan.ubuntu_22.04.v1 key: Ubuntu_GCC_tests_tsan.ubuntu_24.04.v1
variables: variables:
CCACHE_SIZE: 1G CCACHE_SIZE: 1G
BUILD_TESTS_ONLY: 1 BUILD_TESTS_ONLY: 1
@ -307,11 +307,18 @@ Ubuntu_GCC_tests_ubsan:
Ubuntu_GCC_tests_coverage: Ubuntu_GCC_tests_coverage:
extends: .Ubuntu_GCC_tests_Debug extends: .Ubuntu_GCC_tests_Debug
cache: cache:
key: Ubuntu_GCC_tests_coverage.ubuntu_22.04.v1 key: Ubuntu_GCC_tests_coverage.ubuntu_24.04.v1
variables: variables:
BUILD_WITH_CODE_COVERAGE: 1 BUILD_WITH_CODE_COVERAGE: 1
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- apt-cache/
- ccache/
before_script: before_script:
- CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic openmw-coverage - CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic openmw-coverage
- pip3 install --break-system-packages --user gcovr
coverage: /^\s*lines:\s*\d+.\d+\%/ coverage: /^\s*lines:\s*\d+.\d+\%/
artifacts: artifacts:
paths: [] paths: []
@ -333,7 +340,7 @@ Ubuntu_GCC_tests_coverage:
- "CI/**/*" - "CI/**/*"
- ".gitlab-ci.yml" - ".gitlab-ci.yml"
cache: cache:
key: Ubuntu_Static_Deps.ubuntu_22.04.v1 key: Ubuntu_Static_Deps.ubuntu_24.04.v1
paths: paths:
- apt-cache/ - apt-cache/
- ccache/ - ccache/
@ -350,7 +357,7 @@ Ubuntu_GCC_tests_coverage:
.Ubuntu_Static_Deps_tests: .Ubuntu_Static_Deps_tests:
extends: .Ubuntu_Static_Deps extends: .Ubuntu_Static_Deps
cache: cache:
key: Ubuntu_Static_Deps_tests.ubuntu_22.04.v1 key: Ubuntu_Static_Deps_tests.ubuntu_24.04.v1
variables: variables:
CCACHE_SIZE: 1G CCACHE_SIZE: 1G
BUILD_TESTS_ONLY: 1 BUILD_TESTS_ONLY: 1
@ -369,7 +376,7 @@ Ubuntu_Clang:
before_script: before_script:
- CI/install_debian_deps.sh clang openmw-deps openmw-deps-dynamic - CI/install_debian_deps.sh clang openmw-deps openmw-deps-dynamic
cache: cache:
key: Ubuntu_Clang.ubuntu_22.04.v2 key: Ubuntu_Clang.ubuntu_24.04.v2
variables: variables:
CC: clang CC: clang
CXX: clang++ CXX: clang++
@ -382,7 +389,7 @@ Ubuntu_Clang:
before_script: before_script:
- CI/install_debian_deps.sh clang clang-tidy openmw-deps openmw-deps-dynamic - CI/install_debian_deps.sh clang clang-tidy openmw-deps openmw-deps-dynamic
cache: cache:
key: Ubuntu_Clang_Tidy.ubuntu_22.04.v1 key: Ubuntu_Clang_Tidy.ubuntu_24.04.v1
variables: variables:
CMAKE_BUILD_TYPE: Debug CMAKE_BUILD_TYPE: Debug
CMAKE_CXX_FLAGS_DEBUG: -O0 CMAKE_CXX_FLAGS_DEBUG: -O0
@ -436,7 +443,7 @@ Ubuntu_Clang_Tidy_other:
.Ubuntu_Clang_tests: .Ubuntu_Clang_tests:
extends: Ubuntu_Clang extends: Ubuntu_Clang
cache: cache:
key: Ubuntu_Clang_tests.ubuntu_22.04.v1 key: Ubuntu_Clang_tests.ubuntu_24.04.v1
variables: variables:
CCACHE_SIZE: 1G CCACHE_SIZE: 1G
BUILD_TESTS_ONLY: 1 BUILD_TESTS_ONLY: 1
@ -450,7 +457,7 @@ Ubuntu_Clang_Tidy_other:
Ubuntu_Clang_tests_Debug: Ubuntu_Clang_tests_Debug:
extends: Ubuntu_Clang extends: Ubuntu_Clang
cache: cache:
key: Ubuntu_Clang_tests_Debug.ubuntu_22.04.v1 key: Ubuntu_Clang_tests_Debug.ubuntu_24.04.v1
variables: variables:
CCACHE_SIZE: 1G CCACHE_SIZE: 1G
BUILD_TESTS_ONLY: 1 BUILD_TESTS_ONLY: 1
@ -474,7 +481,7 @@ Ubuntu_Clang_tests_Debug:
- apt-cache/ - apt-cache/
before_script: before_script:
- CI/install_debian_deps.sh $OPENMW_DEPS - CI/install_debian_deps.sh $OPENMW_DEPS
- pip3 install --user numpy matplotlib termtables click - pip3 install --break-system-packages --user termtables
script: script:
- CI/run_integration_tests.sh - CI/run_integration_tests.sh
after_script: after_script:
@ -485,7 +492,7 @@ Ubuntu_Clang_integration_tests:
needs: needs:
- Ubuntu_Clang - Ubuntu_Clang
cache: cache:
key: Ubuntu_Clang_integration_tests.ubuntu_22.04.v2 key: Ubuntu_Clang_integration_tests.ubuntu_24.04.v2
variables: variables:
OPENMW_DEPS: openmw-integration-tests OPENMW_DEPS: openmw-integration-tests
@ -494,9 +501,9 @@ Ubuntu_GCC_integration_tests_asan:
needs: needs:
- Ubuntu_GCC_asan - Ubuntu_GCC_asan
cache: cache:
key: Ubuntu_GCC_integration_tests_asan.ubuntu_22.04.v1 key: Ubuntu_GCC_integration_tests_asan.ubuntu_24.04.v1
variables: variables:
OPENMW_DEPS: openmw-integration-tests libasan6 OPENMW_DEPS: openmw-integration-tests libasan8
ASAN_OPTIONS: halt_on_error=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_leaks=0 ASAN_OPTIONS: halt_on_error=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_leaks=0
.MacOS: .MacOS:

View file

@ -23,6 +23,7 @@ declare -rA GROUPED_DEPS=(
libclang-dev libclang-dev
ninja-build ninja-build
python3-clang python3-clang
python3-click
python3-pip python3-pip
unzip unzip
" "
@ -57,42 +58,47 @@ declare -rA GROUPED_DEPS=(
libsdl2-dev libboost-system-dev libboost-filesystem-dev libgl-dev libsdl2-dev libboost-system-dev libboost-filesystem-dev libgl-dev
" "
[openmw-coverage]="gcovr" [openmw-coverage]="
python3-pip
"
[openmw-integration-tests]=" [openmw-integration-tests]="
ca-certificates ca-certificates
gdb gdb
git git
git-lfs git-lfs
libavcodec58 libavcodec60
libavformat58 libavformat60
libavutil56 libavutil58
libboost-iostreams1.74.0 libboost-iostreams1.83.0
libboost-program-options1.74.0 libboost-program-options1.83.0
libboost-system1.74.0 libboost-system1.83.0
libbullet3.24 libbullet3.24t64
libcollada-dom2.5-dp0 libcollada-dom2.5-dp0
libicu70 libicu74
libjpeg8 libjpeg8
libluajit-5.1-2 libluajit-5.1-2
liblz4-1 liblz4-1
libmyguiengine3debian1v5 libmyguiengine3debian1v5
libopenal1 libopenal1
libopenscenegraph161 libopenscenegraph161
libpng16-16 libpng16-16t64
libqt5opengl5 libqt5opengl5t64
librecast1 librecast1
libsdl2-2.0-0 libsdl2-2.0-0
libsqlite3-0 libsqlite3-0
libswresample3 libswresample4
libswscale5 libswscale7
libtinyxml2.6.2v5 libtinyxml2.6.2v5
libyaml-cpp0.8 libyaml-cpp0.8
python3-click
python3-matplotlib
python3-numpy
python3-pip python3-pip
xvfb xvfb
" "
[libasan6]="libasan6" [libasan8]="libasan8"
[android]="binutils build-essential cmake ccache curl unzip git pkg-config" [android]="binutils build-essential cmake ccache curl unzip git pkg-config"