File: .travis.yml

package info (click to toggle)
carbon-c-relay 3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,604 kB
  • sloc: ansic: 8,354; sh: 1,401; yacc: 924; lex: 354; python: 112; makefile: 110
file content (87 lines) | stat: -rw-r--r-- 4,195 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
script: make
language: c

matrix:
  include:
    - compiler: gcc
      os: linux
    - compiler: clang
      os: linux
    - compiler: coverity
      os: linux
      env:
        - COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG"
        - COVERITY_SCAN_BRANCH_PATTERN="master"
        - COVERITY_SCAN_NOTIFICATION_EMAIL="grobian@gentoo.org"
        - COVERITY_SCAN_BUILD_COMMAND="make"
    - compiler: clang
      os: osx
    # gcc is actually clang on OSX, so pointless to test twice

script:
  - |
    if [ $TRAVIS_OS_NAME = osx ]; then
      brew update > /dev/null
      brew install lz4 openssl oniguruma pcre pcre2
    else
      sudo apt-get install libonig-dev libpcre3-dev
    fi
  # workaround git not retaining mtimes and bison/flex not being uptodate
  - touch conffile.yy.c conffile.tab.c conffile.tab.h
  - touch configure.ac Makefile.am aclocal.m4 configure Makefile.in config.h.in
  - |
    if [[ ${CC} == coverity ]] ; then
      [[ -n ${COVERITY_SCAN_TOKEN} ]] || exit 0;  # don't fail on this for PRs
      # ensure we end up with an existing compiler
      export CC=gcc
      ./configure || { cat config.log ; exit 1 ; }
      curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash
    else
      v() { echo "$@"; "$@"; }
      # everything disabled, this MUST work
      echo "==> base test, all disabled"
      v ./configure --without-gzip --without-lz4 --without-ssl \
        --without-oniguruma --without-pcre2 --without-pcre \
        || { cat config.log ; exit 1 ; }
      v make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean check || exit 1
      # compile some enabled/disabled variants compile only
      echo "==> gzip enabled"
      if v ./configure --with-gzip --without-lz4 --without-ssl ; then
        v make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean relay || exit 1
      fi
      echo "==> lz4 enabled"
      if v ./configure --without-gzip --with-lz4 --without-ssl ; then
        v make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean relay || exit 1
      fi
      echo "==> gzip,lz4 enabled"
      if v ./configure --with-gzip --with-lz4 --without-ssl ; then
        v make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean relay || exit 1
      fi
      echo "==> gzip,lz4,ssl enabled"
      if v ./configure --with-gzip --with-lz4 --with-ssl ; then
        v make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean relay || exit 1
      fi
      # test the regex implementations
      echo "==> oniguruma enabled"
      v ./configure --with-oniguruma --without-pcre2 --without-pcre || exit
      v make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean check || exit 1
      if [ $TRAVIS_OS_NAME = osx ] ; then
        echo "==> pcre2 enabled"
        v ./configure --without-oniguruma --with-pcre2 --without-pcre || exit
        v make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean check || exit 1
      fi
      echo "==> pcre enabled"
      v ./configure --without-oniguruma --without-pcre2 --with-pcre || exit
      v make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean check || exit 1
      # final test with everything enabled that is detected
      echo "==> everything default"
      v ./configure || { cat config.log ; exit 1 ; }
      v make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" clean check || exit 1
    fi
    exit 0  # all is good here

env:
  global:
    # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
    #   via the "travis encrypt" command using the project repo's public key
    - secure: "H844xDJC5CUXhUyB1SFsGiiz/Q4viVSALkj/KnWAuagrbrzIXJoK4tRWpPxCzUar5QsdEua1WIXTBezPA6V97w2cis2OGUXtgsMd1fWnwlG0RwPRj2+LAVxJ+i5z1Asx8hkYOiZIv8y0VkBGldjOrD0l0pBcxB+CDZC/zsGSRtnMLOs+smfEjOF6JPGw8Ye0XJ+YKrfbHOXhfS7XTMwUnjgAV7lTH/aAlKuedc3mYsuC3WHJOMptYLXaiPdbPKoIXfLdmszP91SkThr4f0elyQskugzGM3D7M1tIFhfmordSD+DfzLvvdSu32hHUNQjHvAm7Pz8QmdLC2IjjE8y8MkIkEy2+wR/5AjacnKR8OgFzXgt+yIH+CBc6qbTi40dZ7Go33Q8uNyKJGrA1CyL195NS8q0reMbuS7WIxI0rNOy7cdw8MO0sNjeofcb1RW90U5u5qciRQpbwhFwMFMCuD0LL41mjfN+IHGNeUwp148Qibbvyu+d7y4Y1F7/CsdMpZVBH9Ae7CHXetN8biT81fJp1rn0uEGQqoPuxvKeePsL40MXu6wvlrSf5wLKV3aqp5lzbjoJsPrOwV5iVwMHrvdhoAFlLc6Y1aJkCTPPt7yjLHgLBisqRXLTZ9lcD3AG8ubTLr03DsseUUM3/tWvhWfVRfxzkuOHsDRLMfdY2Q20="