From a9363c750dfa1c3feab37eb8d3b7543341d7cabf Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sun, 8 Dec 2019 12:19:15 +0100 Subject: [PATCH] gitlab-ci: run tests in a specific job with specific CFLAGS will detect memory leaks and out of bound memory access --- .gitlab-ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f62c360..b3a43fee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,9 +2,18 @@ variables: GIT_SUBMODULE_STRATEGY: normal stages: + - test - build - pages +job_test: + stage: test + before_script: + - apt-get update -qq + - apt-get install -y -qq libsdl1.2-dev libpng-dev libsdl-ttf2.0-dev libsdl-image1.2-dev liblua5.2-dev + script: + - "CFLAGS=-fsanitize=address LDFLAGS=-fsanitize=address OPTIM=0 make check || exit 1" + job_linux: stage: build before_script: @@ -13,7 +22,6 @@ job_linux: - apt-get install -y -qq libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev doxygen graphviz script: - "make -j3 || exit 1" - - "make check || exit 1" - "make ziprelease || exit 1" - "API=sdl2 make -j3 && API=sdl2 make ziprelease || exit 1" - "make docarchive || exit 1"