about summary refs log tree commit diff
path: root/third_party/immer/.travis.yml
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-07-15T07·20+0100
committerVincent Ambo <mail@tazj.in>2020-07-15T07·23+0100
commit1213b086a1015a662ab7ebd658f784534fd3116a (patch)
treed3bc8f3b7f40b8b60f0ef6fbd649cf765f4fdfb6 /third_party/immer/.travis.yml
parent1390827b9ea1e04bc9863e48930bfd16db3b716e (diff)
parent7f19d641647ac4ef313ed88d6b5c140983ce5436 (diff)
merge(3p/immer): Subtree merge at 'ad3e3556d' as 'third_party/immer' r/1299
Change-Id: I9636a41ad44b4218293833fd3e9456d9b07c731b
Diffstat (limited to 'third_party/immer/.travis.yml')
-rw-r--r--third_party/immer/.travis.yml84
1 files changed, 84 insertions, 0 deletions
diff --git a/third_party/immer/.travis.yml b/third_party/immer/.travis.yml
new file mode 100644
index 000000000000..cdbe09bf92fb
--- /dev/null
+++ b/third_party/immer/.travis.yml
@@ -0,0 +1,84 @@
+language: nix
+dist: trusty
+
+git:
+  depth: false
+
+matrix:
+  include:
+    - env: DO=check TYPE=Debug TOOLCHAIN=llvm-5 SANITIZE=true
+    - env: DO=check TYPE=Release TOOLCHAIN=llvm-5 BENCHMARKS=true
+    - env: DO=check TYPE=Debug TOOLCHAIN=gnu-6 COVERAGE=true
+    - env: DO=check TYPE=Release TOOLCHAIN=gnu-6 BENCHMARKS=true
+    - env: DO=check TYPE=Debug TOOLCHAIN=gnu-7 STD=17
+    - env: DO=check TYPE=Debug TOOLCHAIN=llvm-9 STD=17 FUZZERS=true
+    - env: DO=build
+    - env: DO=docs
+
+before_install:
+  - |
+    : ${TOOLCHAIN:=gnu-6}
+    : ${TYPE:=Debug}
+    : ${STD:=14}
+    function build-p { [[ "${DO}" == build ]]; }
+    function check-p { [[ "${DO}" == check ]]; }
+    function docs-p  { [[ "${DO}" == docs ]]; }
+    function coverage-p { [[ "${COVERAGE}" == true ]]; }
+    function benchmarks-p { [[ "${BENCHMARKS}" == true ]]; }
+    function deploy-p {
+        [[ "${TRAVIS_PULL_REQUEST}" == "false" && \
+           "${TRAVIS_BRANCH}" == "master" ]]
+    }
+    function upload-p {
+        [[ -n "$encrypted_1c8d51d72e41_key" && \
+           -n "$encrypted_1c8d51d72e41_iv" ]]
+    }
+    function decrypt-ssh-key {
+        openssl aes-256-cbc \
+            -K  $encrypted_1c8d51d72e41_key \
+            -iv $encrypted_1c8d51d72e41_iv \
+            -in tools/travis/ssh-key.enc \
+            -out tools/travis/ssh-key -d
+        chmod 600 tools/travis/ssh-key
+    }
+    function with-nix {
+        nix-shell --argstr toolchain $TOOLCHAIN --run "set -e; $1"
+    }
+
+install:
+  - with-nix "echo == nix environment ok"
+
+before_script:
+  - |
+    with-nix "
+        mkdir build && cd build
+        cmake .. \
+            -DCMAKE_BUILD_TYPE=${TYPE} \
+            -DCHECK_SLOW_TESTS=false \
+            -DCXX_STANDARD=${STD} \
+            -DCHECK_BENCHMARKS=${BENCHMARKS} \
+            -DENABLE_COVERAGE=${COVERAGE} \
+            -DENABLE_SANITIZE=${SANITIZE} \
+            -DCHECK_FUZZERS=${FUZZERS} \
+            -DDISABLE_FREE_LIST=${SANITIZE}
+    "
+
+script:
+  - |
+    set -e
+    ! build-p || nix-build
+    ! check-p || with-nix "cd build && make -j2 check"
+    ! docs-p  || with-nix "cd build && make docs"
+
+after_success:
+  - |
+    ! coverage-p || with-nix "
+        cd build
+        find . -name \"*.gcno\" | xargs gcov -bcprs ${PWD}
+        bash <(curl -s https://codecov.io/bash) -x gcov
+    "
+    if upload-p; then
+        decrypt-ssh-key
+        ! benchmarks-p || with-nix "cd build && make upload-benchmark-reports"
+        ! docs-p || ! deploy-p || with-nix "cd build && make upload-docs"
+    fi