diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..6110e3a0
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,47 @@
+# Use Kvazaar CI base image which includes the build tools and ffmpeg + hmdec in ${HOME}/bin
+image: ultravideo/kvazaar_ci_base:latest
+
+# Build and test kvazaar
+test-kvazaar: &test-template
+ stage: test
+ script:
+ - export PATH="${HOME}/bin:${PATH}"
+ - ./autogen.sh
+ - ./configure --enable-werror || (cat config.log && false)
+ - make --jobs=8
+ - make check --jobs=8 VERBOSE=1
+ artifacts:
+ paths:
+ - src/kvazaar
+ - src/.libs
+ expire_in: 1 week
+
+test-asan:
+ <<: *test-template
+ variables:
+ CFLAGS: '-fsanitize=address'
+ # LeakSanitizer doesn't work inside the container because it requires
+ # ptrace so we disable it.
+ ASAN_OPTIONS: 'detect_leaks=0'
+ # AddressSanitizer adds some extra symbols so we expect a failure from
+ # the external symbols test.
+ XFAIL_TESTS: test_external_symbols.sh
+
+test-tsan:
+ <<: *test-template
+ variables:
+ CFLAGS: '-fsanitize=thread'
+
+test-ubsan:
+ <<: *test-template
+ variables:
+ CFLAGS: '-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment'
+
+test-valgrind:
+ <<: *test-template
+ variables:
+ KVAZAAR_OVERRIDE_angular_pred: generic
+ KVAZAAR_OVERRIDE_sao_band_ddistortion: generic
+ KVAZAAR_OVERRIDE_sao_edge_ddistortion: generic
+ KVAZAAR_OVERRIDE_calc_sao_edge_dir: generic
+ KVZ_TEST_VALGRIND: 1
diff --git a/.travis.yml b/.travis.yml
index db8faa38..d54c9d98 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,7 +19,16 @@ matrix:
include:
- compiler: clang
+ env: KVZ_TEST_VALGRIND=1
+
+ - compiler: clang
+ env: CFLAGS='-fsanitize=thread'
+
+ - compiler: clang
+ env: CFLAGS='-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment'
+
- compiler: gcc-4.8
+ env: CFLAGS='-fsanitize=address'
# We have some Mac specific code and Mac sometimes has odd build issues.
- os: osx
@@ -27,14 +36,15 @@ matrix:
install: true
script:
- ./autogen.sh
- - ./configure --enable-werror
+ - ./configure --enable-werror || (cat config.log && false)
- make --jobs=2 V=1
+ - make check TESTS=kvazaar_tests
install: bash .travis-install.bash
script:
- ./autogen.sh
- - ./configure --enable-werror
+ - ./configure --enable-werror || (cat config.log && false)
- make --jobs=2 V=1
- make check VERBOSE=1
diff --git a/README.md b/README.md
index e48f277d..968e98ea 100644
--- a/README.md
+++ b/README.md
@@ -53,14 +53,14 @@ Usage:
kvazaar -i --input-res x -o