]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libcbor/.travis.yml
ssh: Update to OpenSSH 9.3p2
[FreeBSD/FreeBSD.git] / contrib / libcbor / .travis.yml
1 language: c
2
3 matrix:
4   include:
5     - arch: amd64
6       os: linux
7       dist: bionic
8       compiler: clang
9       env: TRAVIS_ARCH="amd64"
10     - arch: amd64
11       os: linux
12       dist: bionic
13       compiler: gcc
14       env: TRAVIS_ARCH="amd64"
15     - arch: arm64
16       os: linux
17       dist: bionic
18       compiler: gcc
19       env: TRAVIS_ARCH="arm64"
20     - arch: ppc64le
21       os: linux
22       dist: bionic
23       compiler: gcc
24       env: TRAVIS_ARCH="ppc64le"
25     - arch: amd64
26       os: osx
27       compiler: gcc
28       env: TRAVIS_ARCH="amd64"
29
30 before_install:
31   - pushd ${HOME}
32   - git clone https://gitlab.com/cmocka/cmocka.git
33   - cd cmocka && mkdir build && cd build
34   - cmake .. && make -j2 && sudo make install
35   - cd .. && popd
36   - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y clang-format-8 cppcheck; fi
37   - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" -a "$TRAVIS_ARCH" = "amd64" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
38
39 script:
40   - >
41     if [ "$TRAVIS_OS_NAME" = "linux" ]; then
42       cppcheck . --error-exitcode=1
43       # Fail if re-formatting creates diffs (implying bad formatting)
44       /clang-format.sh --verbose
45       git diff-index --quiet HEAD
46     fi;
47   - mkdir build && cd build
48   - cmake -DWITH_TESTS=ON
49           -DCBOR_CUSTOM_ALLOC=ON
50           -DCMAKE_BUILD_TYPE=Debug
51           -DSANITIZE=OFF
52           ..
53   - make VERBOSE=1
54   - ctest -VV
55   - ctest -T memcheck | tee memcheck.out
56   - >
57     if grep -q 'Memory Leak\|IPW\|Uninitialized Memory Conditional\|Uninitialized Memory Read' memcheck.out; then
58       exit 1
59     fi;
60
61
62 after_success:
63   - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" -a "$TRAVIS_ARCH" = "amd64" ]; then codecov; fi
64
65 notifications:
66   email: false