648db22b |
1 | # Travis CI is used to test platforms that github-actions currently doesn't support |
2 | # without either self-hosting or some finnicky work-around. Also, some tests |
3 | # are troublesome to migrate since GH Actions runs tests not in a tty. |
4 | language: c |
5 | |
6 | git: |
7 | depth: 1 |
8 | |
9 | branches: |
10 | only: |
11 | - dev |
12 | - release |
13 | - master |
14 | - travisTest |
15 | |
16 | addons: |
17 | apt: |
18 | update: true |
19 | |
20 | env: |
21 | global: |
22 | - FUZZERTEST=-T1mn |
23 | ZSTREAM_TESTTIME=-T1mn |
24 | DECODECORPUS_TESTTIME=-T1mn |
25 | |
26 | matrix: |
27 | fast_finish: true |
28 | include: |
29 | - name: S390X (big endian) + Fuzz test |
30 | dist: trusty |
31 | arch: s390x |
32 | script: |
33 | - FUZZER_FLAGS=--no-big-tests make -C tests fuzztest |
34 | |
35 | - name: S390X (big endian) + Fuzz test + no intrinsics |
36 | dist: trusty |
37 | arch: s390x |
38 | script: |
39 | - MOREFLAGS="-DZSTD_NO_INTRINSICS" FUZZER_FLAGS=--no-big-tests make -C tests fuzztest |
40 | |
41 | - name: arm64 # ~2.5 mn |
42 | os: linux |
43 | arch: arm64 |
44 | script: |
45 | - make check |
46 | |
47 | - name: arm64fuzz |
48 | os: linux |
49 | arch: arm64 |
50 | script: |
51 | - make -C tests fuzztest |
52 | |
53 | # TODO: migrate to GH Actions once newest clang staticanalyze warnings are fixed |
54 | - name: static analyzer scanbuild # ~8mn |
55 | dist: trusty # note : it's important to pin down a version of static analyzer, since different versions report different false positives |
56 | script: |
57 | - make staticAnalyze |
58 | |
59 | # GH actions can't run this command on OS-X, non-tty issues |
60 | - name: OS-X make all lib |
61 | os: osx |
62 | script: |
63 | - make -C lib all |
64 | |
65 | # Introduced to check compat with old toolchains, to prevent e.g. #1872 |
66 | - name: ARM Build Test (on Trusty) |
67 | dist: trusty |
68 | script: |
69 | - make arminstall |
70 | - make armbuild |
71 | |
72 | # check release number (release/new tag only) |
73 | - name: Tag-Specific Test |
74 | if: tag =~ ^v[0-9]\.[0-9] |
75 | script: |
76 | - make -C tests checkTag |
77 | - tests/checkTag "$TRAVIS_BRANCH" |
78 | |
79 | - name: PPC64LE + Fuzz test # ~13mn |
80 | arch: ppc64le |
81 | env: |
82 | - FUZZER_FLAGS=--no-big-tests |
83 | - MOREFLAGS="-static" |
84 | script: |
85 | - cat /proc/cpuinfo |
86 | - make -C tests fuzztest |
87 | |
88 | # This test currently fails on GA specifically, for no obvious reason |
89 | # (it works fine on travisCI, and on local test platforms). |
90 | - name: Versions Compatibility Test # ~6mn |
91 | script: |
92 | - make -C tests versionsTest |
93 | |
94 | # meson dedicated test |
95 | - name: Focal (Meson + clang) # ~15mn |
96 | dist: focal |
97 | language: cpp |
98 | compiler: clang |
99 | install: |
100 | - sudo apt-get install -qq liblz4-dev valgrind tree |
101 | - | |
102 | travis_retry curl -o ~/ninja.zip -L 'https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip' && |
103 | unzip ~/ninja.zip -d ~/.local/bin |
104 | - | |
105 | travis_retry curl -o ~/get-pip.py -L 'https://bootstrap.pypa.io/pip/3.6/get-pip.py' && |
106 | python3 ~/get-pip.py --user && |
107 | pip3 install --user meson |
108 | script: |
109 | - | |
110 | meson setup \ |
111 | --buildtype=debugoptimized \ |
112 | -Db_lundef=false \ |
113 | -Dauto_features=enabled \ |
114 | -Dbin_programs=true \ |
115 | -Dbin_tests=true \ |
116 | -Dbin_contrib=true \ |
117 | -Ddefault_library=both \ |
118 | build/meson builddir |
119 | - pushd builddir |
120 | - ninja |
121 | - meson test --verbose --no-rebuild |
122 | - DESTDIR=./staging ninja install |
123 | - tree ./staging |
124 | after_failure: |
125 | - cat "$TRAVIS_BUILD_DIR"/builddir/meson-logs/testlog.txt |
126 | |
127 | allow_failures: |
128 | - env: ALLOW_FAILURES=true |