1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-17 10:21:11 +00:00

Merge branch 'ci_jobs' into 'master'

Enable existing and add CI jobs

See merge request OpenMW/openmw!2220
This commit is contained in:
psi29a 2022-08-01 11:56:22 +00:00
commit 895779f2ec
4 changed files with 55 additions and 25 deletions

View File

@ -100,7 +100,22 @@ Ubuntu_GCC:
# When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks. # When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks.
timeout: 2h timeout: 2h
.Ubuntu_GCC_tests: Ubuntu_GCC_Debug:
extends: .Ubuntu
cache:
key: Ubuntu_GCC_Debug.ubuntu_22.04.v1
before_script:
- CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic
variables:
CC: gcc
CXX: g++
CCACHE_SIZE: 4G
CMAKE_BUILD_TYPE: Debug
CMAKE_CXX_FLAGS_DEBUG: -O0
# When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks.
timeout: 2h
Ubuntu_GCC_tests:
extends: Ubuntu_GCC extends: Ubuntu_GCC
cache: cache:
key: Ubuntu_GCC_tests.ubuntu_22.04.v1 key: Ubuntu_GCC_tests.ubuntu_22.04.v1
@ -130,7 +145,7 @@ Ubuntu_GCC:
reports: reports:
junit: build/tests.xml junit: build/tests.xml
.Ubuntu_GCC_tests_asan: Ubuntu_GCC_tests_asan:
extends: Ubuntu_GCC extends: Ubuntu_GCC
cache: cache:
key: Ubuntu_GCC_asan.ubuntu_22.04.v1 key: Ubuntu_GCC_asan.ubuntu_22.04.v1
@ -148,7 +163,7 @@ Ubuntu_GCC:
reports: reports:
junit: build/tests.xml junit: build/tests.xml
.Ubuntu_GCC_tests_ubsan: Ubuntu_GCC_tests_ubsan:
extends: Ubuntu_GCC extends: Ubuntu_GCC
cache: cache:
key: Ubuntu_GCC_ubsan.ubuntu_22.04.v1 key: Ubuntu_GCC_ubsan.ubuntu_22.04.v1
@ -183,7 +198,7 @@ Ubuntu_GCC:
reports: reports:
junit: build/tests.xml junit: build/tests.xml
.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_22.04.v1
@ -246,17 +261,29 @@ Ubuntu_GCC:
Ubuntu_Clang: Ubuntu_Clang:
extends: .Ubuntu extends: .Ubuntu
before_script: before_script:
- CI/install_debian_deps.sh clang clang-tidy openmw-deps openmw-deps-dynamic - CI/install_debian_deps.sh clang openmw-deps openmw-deps-dynamic
cache: cache:
key: Ubuntu_Clang.ubuntu_22.04.v1 key: Ubuntu_Clang.ubuntu_22.04.v2
variables: variables:
CC: clang CC: clang
CXX: clang++ CXX: clang++
CI_CLANG_TIDY: 1
CCACHE_SIZE: 2G CCACHE_SIZE: 2G
# When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks. # When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks.
timeout: 3h timeout: 3h
Ubuntu_Clang_Tidy:
extends: Ubuntu_Clang
before_script:
- CI/install_debian_deps.sh clang clang-tidy openmw-deps openmw-deps-dynamic
cache:
key: Ubuntu_Clang_Tidy.ubuntu_22.04.v1
variables:
CMAKE_BUILD_TYPE: Debug
CMAKE_CXX_FLAGS_DEBUG: -O0
CI_CLANG_TIDY: 1
# When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks.
timeout: 3h
.Ubuntu_Clang_tests: .Ubuntu_Clang_tests:
extends: Ubuntu_Clang extends: Ubuntu_Clang
cache: cache:
@ -562,7 +589,7 @@ Ubuntu_AndroidNDK_arm64-v8a:
- ccache/ - ccache/
- build/extern/fetched/ - build/extern/fetched/
before_script: before_script:
- CI/install_debian_deps.sh gcc - CI/install_debian_deps.sh android
stage: build stage: build
script: script:
- df -h - df -h

View File

@ -23,11 +23,11 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
fi fi
command -v unixPathAsWindows >/dev/null 2>&1 || function unixPathAsWindows { command -v unixPathAsWindows >/dev/null 2>&1 || function unixPathAsWindows {
if command -v cygpath >/dev/null 2>&1; then if command -v cygpath >/dev/null 2>&1; then
cygpath -w $1 cygpath -w $1
else else
echo "$1" | sed "s,^/\([^/]\)/,\\1:/," | sed "s,/,\\\\,g" echo "$1" | sed "s,^/\([^/]\)/,\\1:/," | sed "s,/,\\\\,g"
fi fi
} }

View File

@ -24,11 +24,11 @@ declare -a CMAKE_CONF_OPTS=(
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_INSTALL_PREFIX=install
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DBUILD_SHARED_LIBS=OFF -DBUILD_SHARED_LIBS=OFF
-DUSE_SYSTEM_TINYXML=ON -DUSE_SYSTEM_TINYXML=ON
-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON -DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON
-DOPENMW_CXX_FLAGS="-Werror -Werror=implicit-fallthrough" # flags specific to OpenMW project -DOPENMW_CXX_FLAGS="-Werror -Werror=implicit-fallthrough" # flags specific to OpenMW project
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=mold"
) )
if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then
@ -42,9 +42,9 @@ if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then
fi fi
if [[ $CI_CLANG_TIDY ]]; then if [[ $CI_CLANG_TIDY ]]; then
CMAKE_CONF_OPTS+=( CMAKE_CONF_OPTS+=(
-DCMAKE_CXX_CLANG_TIDY="clang-tidy;--warnings-as-errors=*" -DCMAKE_CXX_CLANG_TIDY="clang-tidy;--warnings-as-errors=*"
) )
fi fi
@ -52,6 +52,10 @@ if [[ "${CMAKE_BUILD_TYPE}" ]]; then
CMAKE_CONF_OPTS+=( CMAKE_CONF_OPTS+=(
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
) )
else
CMAKE_CONF_OPTS+=(
-DCMAKE_BUILD_TYPE=RelWithDebInfo
)
fi fi
if [[ "${CMAKE_CXX_FLAGS_DEBUG}" ]]; then if [[ "${CMAKE_CXX_FLAGS_DEBUG}" ]]; then
@ -60,12 +64,6 @@ if [[ "${CMAKE_CXX_FLAGS_DEBUG}" ]]; then
) )
fi fi
if [[ "${CMAKE_EXE_LINKER_FLAGS}" ]]; then
CMAKE_CONF_OPTS+=(
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS}"
)
fi
if [[ "${BUILD_WITH_CODE_COVERAGE}" ]]; then if [[ "${BUILD_WITH_CODE_COVERAGE}" ]]; then
CMAKE_CONF_OPTS+=( CMAKE_CONF_OPTS+=(
-DBUILD_WITH_CODE_COVERAGE="${BUILD_WITH_CODE_COVERAGE}" -DBUILD_WITH_CODE_COVERAGE="${BUILD_WITH_CODE_COVERAGE}"
@ -97,6 +95,8 @@ if [[ "${BUILD_TESTS_ONLY}" ]]; then
-DBUILD_OPENCS=OFF \ -DBUILD_OPENCS=OFF \
-DBUILD_WIZARD=OFF \ -DBUILD_WIZARD=OFF \
-DBUILD_NAVMESHTOOL=OFF \ -DBUILD_NAVMESHTOOL=OFF \
-DBUILD_BULLETOBJECTTOOL=OFF \
-DBUILD_NIFTEST=OFF \
-DBUILD_UNITTESTS=${BUILD_UNITTESTS} \ -DBUILD_UNITTESTS=${BUILD_UNITTESTS} \
-DBUILD_BENCHMARKS=${BUILD_BENCHMARKS} \ -DBUILD_BENCHMARKS=${BUILD_BENCHMARKS} \
-DGTEST_ROOT="${GOOGLETEST_DIR}" \ -DGTEST_ROOT="${GOOGLETEST_DIR}" \

View File

@ -9,8 +9,8 @@ print_help() {
} }
declare -rA GROUPED_DEPS=( declare -rA GROUPED_DEPS=(
[gcc]="binutils gcc build-essential cmake ccache curl unzip git pkg-config" [gcc]="binutils gcc build-essential cmake ccache curl unzip git pkg-config mold"
[clang]="binutils clang make cmake ccache curl unzip git pkg-config" [clang]="binutils clang make cmake ccache curl unzip git pkg-config mold"
# Common dependencies for building OpenMW. # Common dependencies for building OpenMW.
[openmw-deps]=" [openmw-deps]="
@ -75,6 +75,8 @@ declare -rA GROUPED_DEPS=(
python3-pip python3-pip
xvfb xvfb
" "
[android]="binutils build-essential cmake ccache curl unzip git pkg-config"
) )
if [[ $# -eq 0 ]]; then if [[ $# -eq 0 ]]; then
@ -92,6 +94,7 @@ for group in "$@"; do
done done
export APT_CACHE_DIR="${PWD}/apt-cache" export APT_CACHE_DIR="${PWD}/apt-cache"
export DEBIAN_FRONTEND=noninteractive
set -x set -x
mkdir -pv "$APT_CACHE_DIR" mkdir -pv "$APT_CACHE_DIR"
apt-get update -yqq apt-get update -yqq