mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 09:45:32 +00:00
Run unit tests in gitlab CI for linux build
This commit is contained in:
parent
23fe60a067
commit
af95474670
1 changed files with 24 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
|
|
||||||
Debian:
|
.Debian:
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- linux
|
- linux
|
||||||
|
@ -14,20 +14,34 @@ Debian:
|
||||||
before_script:
|
before_script:
|
||||||
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
|
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
|
||||||
- apt-get update -yq
|
- 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
|
stage: build
|
||||||
script:
|
script:
|
||||||
- export CCACHE_BASEDIR="`pwd`"
|
- export CCACHE_BASEDIR="`pwd`"
|
||||||
- export CCACHE_DIR="`pwd`/ccache" && mkdir -pv "$CCACHE_DIR"
|
- export CCACHE_DIR="`pwd`/ccache" && mkdir -pv "$CCACHE_DIR"
|
||||||
- ccache -z -M 250M
|
- ccache -z -M 1G
|
||||||
- cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi
|
- CI/before_script.linux.sh
|
||||||
- mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
- cd build
|
||||||
- make -j$cores_to_use
|
- cmake --build . -- -j $(nproc)
|
||||||
- DESTDIR=artifacts make install
|
- cmake --install .
|
||||||
|
- if [[ "${BUILD_TESTS_ONLY}" ]]; then ./openmw_test_suite; fi
|
||||||
- ccache -s
|
- ccache -s
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
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:
|
MacOS:
|
||||||
tags:
|
tags:
|
||||||
|
@ -228,4 +242,4 @@ Windows_MSBuild_CS_RelWithDebInfo:
|
||||||
- .Windows_MSBuild_Base
|
- .Windows_MSBuild_Base
|
||||||
variables:
|
variables:
|
||||||
<<: *cs-targets
|
<<: *cs-targets
|
||||||
config: "RelWithDebInfo"
|
config: "RelWithDebInfo"
|
||||||
|
|
Loading…
Reference in a new issue