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: 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:

Loading…
Cancel
Save