summaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: 301d294d53a495167e16aa2f20cccdc0d5e23c54 (plain)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
language: c

matrix:
  fast_finish: true
  include:
    # OS X Mavericks
    - name: (macOS) General Test
      os: osx
      compiler: clang
      script:
        - make -C tests test-lz4 MOREFLAGS='-Werror -Wconversion -Wno-sign-conversion'
        - CFLAGS=-m32 make -C tests clean test-lz4-contentSize

    # Container-based 12.04 LTS Server Edition 64 bit (doesn't support 32-bit includes)
    - name: (Precise) benchmark test
      dist: precise
      script:
        - make -C tests test-lz4 test-lz4c test-fullbench

    - name: (Precise) frame and fuzzer test
      dist: precise
      install:
        - sudo sysctl -w vm.mmap_min_addr=4096
      script:
        - make -C tests test-frametest test-fuzzer

    - name: (Precise) g++ and clang CMake test
      dist: precise
      script:
        - make gpptest
        - make clean
        - make examples
        - make clean cmake
        - make clean travis-install
        - make clean clangtest


    # 14.04 LTS Server Edition 64 bit
    - name: (Trusty) i386 gcc test
      dist: trusty
      addons:
        apt:
          packages:
            - libc6-dev-i386
            - gcc-multilib
      script:
        - make -C tests test MOREFLAGS=-mx32

    # presume clang >= v3.9.0
    - name: (Trusty) USan test
      dist: trusty
      compiler: clang
      script:
        - make usan MOREFLAGS=-Wcomma -Werror

    - name: (Trusty) valgrind test
      dist: trusty
      install:
        - sudo apt-get install -qq valgrind
      script:
        - make c_standards
        - make -C tests test-lz4 test-mem

    - name: (Trusty) c-to-c++ test
      dist: trusty
      script:
        - make ctocpptest

    - name: (Trusty) i386 benchmark + version test
      dist: trusty
      install:
        - sudo apt-get install -qq python3 libc6-dev-i386 gcc-multilib
      script:
        - make -C tests test-lz4c32 test-fullbench32 versionsTest

    - name: (Trusty) i386 frame + fuzzer test
      dist: trusty
      install:
        - sudo apt-get install -qq libc6-dev-i386 gcc-multilib
        - sudo sysctl -w vm.mmap_min_addr=4096
      script:
        - make -C tests test-frametest32 test-fuzzer32

    - name: (Trusty) gcc-6 standard C compilation
      dist: trusty
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-6
      env:
        - CC=gcc-6
      script:
        - make c_standards
        - make -C tests test-lz4 MOREFLAGS=-Werror

    - name: (Trusty) arm + aarch64 compilation
      dist: trusty
      install:
        - sudo apt-get install -qq
            qemu-system-arm
            qemu-user-static
            gcc-arm-linux-gnueabi
            libc6-dev-armel-cross
            gcc-aarch64-linux-gnu
            libc6-dev-arm64-cross
      script:
        - make platformTest CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static
        - make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static

    - name: (Xenial) gcc-5 compilation
      dist: xenial
      install:
        - sudo apt-get install -qq libc6-dev-i386 gcc-multilib
      script:
        - make -C tests test-lz4 clean test-lz4c32 MOREFLAGS=-Werror

    - name: (Trusty) clang-3.8 compilation
      dist: trusty
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.8
          packages:
            - clang-3.8
      script:
        - make -C tests test-lz4 CC=clang-3.8

    - name: (Trusty) PowerPC + PPC64 compilation
      dist: trusty
      install:
        - sudo apt-get install -qq qemu-system-ppc qemu-user-static gcc-powerpc-linux-gnu
      script:
        - make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static
        - make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS=-m64

    - name: (Trusty) scan-build + cppcheck
      dist: trusty
      compiler: clang
      install:
        - sudo apt-get install -qq cppcheck
      script:
        - make staticAnalyze
        - make cppcheck

    - name: (Trusty) gcc-4.4 compilation
      dist: trusty
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - libc6-dev-i386
            - gcc-multilib
            - gcc-4.4
      script:
        - make clean all CC=gcc-4.4 MOREFLAGS=-Werror
        - make clean
        - CFLAGS=-fPIC LDFLAGS='-pie -fPIE -D_FORTIFY_SOURCE=2' make -C programs

    # tag-specific test
    - name: tag build
      if: tag =~ ^v[0-9]\.[0-9]
      os: linux
      script:
        - make -C tests checkTag
        - tests/checkTag "$TRAVIS_BRANCH"

    - name: (Xenial) Meson + clang build
      env: ALLOW_FAILURES=true
      dist: xenial
      language: cpp
      compiler: clang
      install:
        - sudo apt-get install -qq python3 tree
        - curl -o ~/ninja.zip -L 'https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip'
            && unzip ~/ninja.zip -d ~/.local/bin
        - curl -o ~/get-pip.py 'https://bootstrap.pypa.io/get-pip.py'
            && python3 ~/get-pip.py --user
            && pip3 install --user meson
      script:
        - meson setup
            --buildtype=debug
            -Db_lundef=false
            -Dauto_features=enabled
            -Ddefault_library=both
            -Dbuild_{programs,contrib,tests,examples}=true
            contrib/meson build
        - cd build
        - DESTDIR=./staging ninja install
        - tree ./staging
  allow_failures:
    - env: ALLOW_FAILURES=true