summaryrefslogtreecommitdiff
path: root/circle.yml
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-06-23 15:51:55 -0700
committerKonstantin Käfer <mail@kkaefer.com>2017-07-13 11:37:19 +0200
commit871e2a71295729488d1557cc55dd69faab4b7dc3 (patch)
treebb583f08f9505a9f763e6f74feaff577f5f9e0f6 /circle.yml
parent63d11c5d277f67cac54910ce6806e4eb6d8ed961 (diff)
downloadqtlocation-mapboxgl-871e2a71295729488d1557cc55dd69faab4b7dc3.tar.gz
[build] add address, undefined behavior + thread sanitizer
Diffstat (limited to 'circle.yml')
-rw-r--r--circle.yml141
1 files changed, 141 insertions, 0 deletions
diff --git a/circle.yml b/circle.yml
index 58e08cfc4f..6a6404aab2 100644
--- a/circle.yml
+++ b/circle.yml
@@ -12,6 +12,9 @@ workflows:
- node6-clang39-debug
- linux-clang39-debug
- linux-gcc4.9-debug
+ - linux-clang4-sanitize-address
+ - linux-clang4-sanitize-undefined
+ - linux-clang4-sanitize-thread
- linux-gcc5-debug-coverage
- linux-gcc5-release-qt4
- linux-gcc5-release-qt5
@@ -332,6 +335,144 @@ jobs:
- node_modules
- /root/.ccache
+
+# ------------------------------------------------------------------------------
+ linux-clang4-sanitize-address:
+ docker:
+ - image: mbgl/ci:r4-linux-clang-4
+ working_directory: /src
+ environment:
+ LIBSYSCONFCPUS: 6
+ JOBS: 6
+ BUILDTYPE: Sanitize
+ WITH_EGL: 1
+ GDB: '' # Do not run with GDB
+ CXXFLAGS: -fsanitize=address
+ LDFLAGS: -fsanitize=address
+ ASAN_OPTIONS: detect_leaks=0:color=always
+ steps:
+ - checkout
+ - restore_cache:
+ key: v1-linux-clang4-sanitize-address
+ paths:
+ - node_modules
+ - /root/.ccache
+ - run:
+ name: Environment Setup
+ command: |
+ # LLVM has a hard check for "llvm-symbolizer" and doesn't support suffixed executables
+ ln -s /usr/bin/llvm-symbolizer-* /usr/bin/llvm-symbolizer
+ # We'll use tee to redirect stderr to a file so we can check for sanitiziation
+ # https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1059947
+ sed -i 's/"$@" 2>&1/"$@"/' /usr/bin/xvfb-run
+ - run:
+ name: Build test
+ command: make test
+ - run:
+ name: Run tests
+ command: |
+ xvfb-run --server-args="-screen 0 1024x768x24" make run-test 2> >(tee sanitizer 1>&2)
+ # Unfortunately, Google Test eats the status code, so we'll have to check the output.
+ [ -z "$(sed -n '/^SUMMARY: AddressSanitizer:/p' sanitizer)" ]
+ - save_cache:
+ key: v1-linux-clang4-sanitize-address
+ paths:
+ - node_modules
+ - /root/.ccache
+
+
+# ------------------------------------------------------------------------------
+ linux-clang4-sanitize-undefined:
+ docker:
+ - image: mbgl/ci:r4-linux-clang-4
+ working_directory: /src
+ environment:
+ LIBSYSCONFCPUS: 6
+ JOBS: 6
+ BUILDTYPE: Sanitize
+ WITH_EGL: 1
+ GDB: '' # Do not run with GDB
+ CXXFLAGS: -fsanitize=undefined
+ LDFLAGS: -fsanitize=undefined
+ UBSAN_OPTIONS: print_stacktrace=1:color=always
+ steps:
+ - checkout
+ - restore_cache:
+ key: v1-linux-clang4-sanitize-undefined
+ paths:
+ - node_modules
+ - /root/.ccache
+ - run:
+ name: Environment Setup
+ command: |
+ # LLVM has a hard check for "llvm-symbolizer" and doesn't support suffixed executables
+ ln -s /usr/bin/llvm-symbolizer-* /usr/bin/llvm-symbolizer
+ # We'll use tee to redirect stderr to a file so we can check for sanitiziation
+ # https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1059947
+ sed -i 's/"$@" 2>&1/"$@"/' /usr/bin/xvfb-run
+ - run:
+ name: Build test
+ command: make test
+ - run:
+ name: Run tests
+ command: |
+ xvfb-run --server-args="-screen 0 1024x768x24" make run-test 2> >(tee sanitizer 1>&2)
+ # Unfortunately, Google Test eats the status code, so we'll have to check the output.
+ # Uncomment this once we've fixed all thread behavior to make new thread behavior
+ # fail on CircleCI.
+ # [ -z "$(sed -n '/^SUMMARY: UndefinedBehaviorSanitizer:/p' sanitizer)" ]
+ - save_cache:
+ key: v1-linux-clang4-sanitize-address-undefined
+ paths:
+ - node_modules
+ - /root/.ccache
+
+
+# ------------------------------------------------------------------------------
+ linux-clang4-sanitize-thread:
+ docker:
+ - image: mbgl/ci:r4-linux-clang-4
+ working_directory: /src
+ environment:
+ LIBSYSCONFCPUS: 6
+ JOBS: 6
+ BUILDTYPE: Sanitize
+ WITH_EGL: 1
+ GDB: '' # Do not run with GDB
+ CXXFLAGS: -fsanitize=thread
+ LDFLAGS: -fsanitize=thread
+ TSAN_OPTIONS: color=always
+ steps:
+ - checkout
+ - restore_cache:
+ key: v1-linux-clang4-sanitize-thread
+ paths:
+ - node_modules
+ - /root/.ccache
+ - run:
+ name: Environment Setup
+ command: |
+ # LLVM has a hard check for "llvm-symbolizer" and doesn't support suffixed executables
+ ln -s /usr/bin/llvm-symbolizer-* /usr/bin/llvm-symbolizer
+ # We'll use tee to redirect stderr to a file so we can check for sanitiziation
+ # https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1059947
+ sed -i 's/"$@" 2>&1/"$@"/' /usr/bin/xvfb-run
+ - run:
+ name: Build test
+ command: make test
+ - run:
+ name: Run tests
+ command: |
+ xvfb-run --server-args="-screen 0 1024x768x24" make run-test 2> >(tee sanitizer 1>&2)
+ # Unfortunately, Google Test eats the status code, so we'll have to check the output.
+ [ -z "$(sed -n '/^SUMMARY: ThreadSanitizer:/p' sanitizer)" ]
+ - save_cache:
+ key: v1-linux-clang4-sanitize-thread
+ paths:
+ - node_modules
+ - /root/.ccache
+
+
# ------------------------------------------------------------------------------
linux-gcc4.9-debug:
docker: