diff options
Diffstat (limited to 'circle.yml')
-rw-r--r-- | circle.yml | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/circle.yml b/circle.yml index 58e08cfc4f..99e9be5a9d 100644 --- a/circle.yml +++ b/circle.yml @@ -11,6 +11,9 @@ workflows: - node6-clang39-release - node6-clang39-debug - linux-clang39-debug + - linux-clang4-sanitize-address + - linux-clang4-sanitize-undefined + - linux-clang4-sanitize-thread - linux-gcc4.9-debug - linux-gcc5-debug-coverage - linux-gcc5-release-qt4 @@ -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: |