- ./autogen.sh
- test -z $BUILD_DIR || { mkdir -p $BUILD_DIR; cd $BUILD_DIR; }
- ${SRC_DIR:-.}/configure $CONFIGURE
- - make
+ - test "$NO_COMPILE" || make
- make ${TEST:-test}
matrix:
- libb2-dev
before_install:
- source ./.travis/install_cuda.sh
+
+ # Job: Clang tidy
+ - os: linux
+ env: V=1 PATH="/usr/bin:$PATH" NO_COMPILE=1 TEST=tidy
+ addons:
+ apt:
+ packages:
+ - elfutils
+ - libzstd1-dev
+ - libb2-dev
+ before_install:
+ - pip install --user compiledb
+
+ # Job: Check formatting
+ - os: linux
+ env: V=1 PATH="/usr/bin:$PATH" NO_COMPILE=1 TEST=check_format
+ addons:
+ apt:
+ packages:
+ - elfutils
+ - libzstd1-dev
+ - libb2-dev
+
+ # New Jobs go here until they are established for some weeks
+ allow_failures:
+
+ # Job: Clang tidy
+ - os: linux
+ env: V=1 PATH="/usr/bin:$PATH" NO_COMPILE=1 TEST=tidy
+ addons:
+ apt:
+ packages:
+ - elfutils
+ - libzstd1-dev
+ - libb2-dev
+ before_install:
+ - pip install --user compiledb
+
+ # Job: Check formatting
+ - os: linux
+ env: V=1 PATH="/usr/bin:$PATH" NO_COMPILE=1 TEST=check_format
+ addons:
+ apt:
+ packages:
+ - elfutils
+ - libzstd1-dev
+ - libb2-dev
--- /dev/null
+# This .clang-tidy file is used by CI to ensure that commits do not worsen the
+# codebase. The checks and values below are the minimum standard for new code.
+(Without claiming that they are 100% correct. They can be modified on demand!)
+If you want to improve the codebase try enabling some additional checks or
+playing with the configuration values.
+# Some checks are highly style dependent. The goal is NOT to activate all
+# of them.
+
+---
+Checks: '-*,
+ readability-*,
+ -readability-implicit-bool-conversion,
+ -readability-magic-numbers,
+ -readability-else-after-return,
+ -readability-named-parameter,
+ -readability-qualified-auto,
+ -readability-magic-numbers,
+ -readability-isolate-declaration,
+ -readability-inconsistent-declaration-parameter-name,
+ -readability-simplify-boolean-expr,
+ performance-*,
+ -performance-unnecessary-value-param,
+ -performance-faster-string-find,
+ modernize-*,
+ -modernize-avoid-c-arrays,
+ -modernize-deprecated-headers,
+ -modernize-loop-convert,
+ -modernize-pass-by-value,
+ -modernize-use-auto,
+ -modernize-use-bool-literals,
+ -modernize-use-using,
+ -modernize-use-trailing-return-type,
+ cppcoreguidelines-*,
+ -cppcoreguidelines-pro-bounds-array-to-pointer-decay,
+ -cppcoreguidelines-pro-type-vararg,
+ -cppcoreguidelines-owning-memory,
+ -cppcoreguidelines-avoid-magic-numbers,
+ -cppcoreguidelines-pro-bounds-pointer-arithmetic,
+ -cppcoreguidelines-no-malloc,
+ -cppcoreguidelines-init-variables,
+ -cppcoreguidelines-avoid-c-arrays,
+ -cppcoreguidelines-pro-bounds-constant-array-index,
+ -cppcoreguidelines-pro-type-cstyle-cast,
+ -cppcoreguidelines-avoid-goto,
+ -cppcoreguidelines-pro-type-member-init,
+ -cppcoreguidelines-macro-usage,
+ -cppcoreguidelines-pro-type-reinterpret-cast,
+ -cppcoreguidelines-pro-type-union-access,
+ -cppcoreguidelines-narrowing-conversions,
+ bugprone-*,
+ -bugprone-signed-char-misuse,
+ -bugprone-branch-clone,
+ -bugprone-narrowing-conversions,
+ cert-*,
+ -cert-err34-c,
+ -cert-dcl50-cpp,
+ -cert-err58-cpp,
+ clang-diagnostic-*,
+ clang-analyzer-*,
+ -clang-analyzer-alpha*,
+ -clang-analyzer-valist.Uninitialized,
+ -clang-analyzer-optin.performance.Padding'
+WarningsAsErrors: '*'
+# Exclude subdirectories (currently there is only third_party)
+HeaderFilterRegex: 'src/[^\\/]*^'
+CheckOptions:
+ # Always add braces (added here just in case clang-tidy default changes).
+ - key: readability-braces-around-statements.ShortStatementLines
+ value: 0
+
+ # If you hit a limit, please consider changing the code instead of the limit.
+ - key: readability-function-size.LineThreshold
+ value: 1100
+ - key: readability-function-size.StatementThreshold
+ value: 760
+ - key: readability-function-size.BranchThreshold
+ value: 170
+ - key: readability-function-size.ParameterThreshold
+ value: 6
+ - key: readability-function-size.NestingThreshold
+ value: 6
+ - key: readability-function-size.VariableThreshold
+ value: 80
+...
--- /dev/null
+---
+Checks: '-*,readability-function-size'
+WarningsAsErrors: '*'
+HeaderFilterRegex: 'unittest/.*'
+CheckOptions:
+ # Always add braces (added here just in case clang-tidy default changes).
+ - key: readability-braces-around-statements.ShortStatementLines
+ value: 0
+
+ # If you hit the limits, please change the code and not the limits!!
+ # Note: some limits "disabled" due to TEST_SUITE macro.
+ # The macro generates hundreds of statements, branches and variables.
+ - key: readability-function-size.LineThreshold
+ value: 130
+ - key: readability-function-size.StatementThreshold
+ value: 999999
+ - key: readability-function-size.ParameterThreshold
+ value: 7
+ - key: readability-function-size.NestingThreshold
+ value: 6
+ - key: readability-function-size.NestingThreshold
+ value: 999999
+ - key: readability-function-size.VariableThreshold
+ value: 999999
+...
+