Run unit tests in gitlab CI for linux build

pull/3011/head
elsid 4 years ago
parent 23fe60a067
commit af95474670
No known key found for this signature in database
GPG Key ID: D27B8E8D10A2896B

@ -1,7 +1,7 @@
stages:
- build
Debian:
.Debian:
tags:
- docker
- linux
@ -14,20 +14,34 @@ Debian:
before_script:
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
- apt-get update -yq
- apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake build-essential libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-iostreams-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libsdl2-dev libqt5opengl5-dev libopenal-dev libopenscenegraph-dev libunshield-dev libtinyxml-dev libmygui-dev libbullet-dev ccache
- apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake build-essential libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-iostreams-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libsdl2-dev libqt5opengl5-dev libopenal-dev libopenscenegraph-dev libunshield-dev libtinyxml-dev libmygui-dev libbullet-dev ccache git
stage: build
script:
- export CCACHE_BASEDIR="`pwd`"
- export CCACHE_DIR="`pwd`/ccache" && mkdir -pv "$CCACHE_DIR"
- ccache -z -M 250M
- cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi
- mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- make -j$cores_to_use
- DESTDIR=artifacts make install
- ccache -z -M 1G
- CI/before_script.linux.sh
- cd build
- cmake --build . -- -j $(nproc)
- cmake --install .
- if [[ "${BUILD_TESTS_ONLY}" ]]; then ./openmw_test_suite; fi
- ccache -s
artifacts:
paths:
- build/artifacts/
- build/install/
Debian_GCC:
extends: .Debian
variables:
CC: gcc
CXX: g++
Debian_GCC_tests:
extends: .Debian
variables:
CC: gcc
CXX: g++
BUILD_TESTS_ONLY: 1
MacOS:
tags:
@ -228,4 +242,4 @@ Windows_MSBuild_CS_RelWithDebInfo:
- .Windows_MSBuild_Base
variables:
<<: *cs-targets
config: "RelWithDebInfo"
config: "RelWithDebInfo"

Loading…
Cancel
Save