variables: GIT_SUBMODULE_STRATEGY: recursive stages: - lint - test - chore .script: &compile stage: test script: - mkdir build && cd build - CXXFLAGS=-Werror cmake -DBUILD_TESTING=1 .. - make -j$(nproc) - broadwayd & CTEST_OUTPUT_ON_FAILURE=1 make test ubuntu: image: cppit/jucipp:ubuntu <<: *compile fedora: image: cppit/jucipp:fedora <<: *compile arch: image: cppit/jucipp:arch <<: *compile debian-testing: image: cppit/jucipp:debian-testing <<: *compile debian: image: cppit/jucipp:debian <<: *compile static-analysis: image: cppit/jucipp:arch stage: test script: - mkdir build && cd build - scan-build cmake .. - scan-build --status-bugs make -j$(nproc) thread-safety-analysis: image: cppit/jucipp:arch stage: test script: - mkdir build && cd build - CXX=clang++ CXXFLAGS=-Werror cmake .. - make -j$(nproc) address-sanitizer: image: cppit/jucipp:arch stage: test script: - mkdir build && cd build - CXXFLAGS="-fsanitize=address" cmake -DBUILD_TESTING=1 .. - make -j$(nproc) - broadwayd & CTEST_OUTPUT_ON_FAILURE=1 LSAN_OPTIONS=detect_leaks=0 make test check-format: image: cppit/jucipp:arch stage: lint script: - 'find src -name "*.cpp" -exec clang-format --Werror --assume-filename={} {} -n 2>> lint-errors.txt \;' - 'find src -name "*.hpp" -exec clang-format --Werror --assume-filename={} {} -n 2>> lint-errors.txt \;' - 'find tests -name "*.cpp" -exec clang-format --Werror --assume-filename={} {} -n 2>> lint-errors.txt \;' - 'find tests -name "*.hpp" -exec clang-format --Werror --assume-filename={} {} -n 2>> lint-errors.txt \;' - 'HAS_ERRORS=$(cat lint-errors.txt | wc -l)' - '[ "$HAS_ERRORS" == "0" ] || cat lint-errors.txt' - '[ "$HAS_ERRORS" == "0" ]' Clean appveyor cache: stage: chore when: manual script: - 'curl -H "Authorization: Bearer v2.${APPVEYOR_TOKEN}" -H "Content-Type: application/json" -X "DELETE" https://ci.appveyor.com/api/projects/zalox/jucipp-oisms/buildcache'