Try this - it might be clearer.
[gd/wireshark/.git] / .travis.yml
1 language: minimal
2 dist: bionic
3 matrix:
4   include:
5     - name: OSX (xcode10.3 clang-10.0.1) with PCAP
6       os: osx
7       osx_image: xcode10.3
8       compiler: clang
9       env: PCAP=ON
10     - name: OSX (xcode10.3 clang-10.0.1) without PCAP
11       os: osx
12       osx_image: xcode10.3
13       compiler: clang
14       env: PCAP=OFF
15     - name: OSX (xcode11.2 clang-11.0.0) with PCAP
16       os: osx
17       osx_image: xcode11.2
18       env: PCAP=ON
19     - name: OSX (xcode11.2 clang-11.0.0) without PCAP
20       os: osx
21       osx_image: xcode11.2
22       env: PCAP=OFF
23     - name: Linux amd64 (gcc-8) with PCAP
24       os: linux
25       addons:
26         apt:
27           update: true
28           sources:
29             - ubuntu-toolchain-r-test
30           packages: g++-8
31       env:
32         - CXX=g++-8
33         - CC=gcc-8
34         - PCAP=ON
35     - name: Linux arm64 (gcc-8) with PCAP
36       os: linux
37       arch: arm64
38       addons:
39         apt:
40           update: true
41           sources:
42             - ubuntu-toolchain-r-test
43           packages: g++-8
44       env:
45         - CXX=g++-8
46         - CC=gcc-8
47         - PCAP=ON
48     - name: Linux s390x (gcc-7) with PCAP
49       os: linux
50       arch: s390x
51       env:
52         - PCAP=ON
53     - name: Linux ppc64le (gcc-7) with PCAP
54       os: linux
55       arch: ppc64le
56       env:
57         - PCAP=ON
58     - name: Linux amd64 (gcc-8) without PCAP
59       os: linux
60       addons:
61         apt:
62           update: true
63           sources:
64             - ubuntu-toolchain-r-test
65           packages: g++-8
66       env:
67         - CXX=g++-8
68         - CC=gcc-8
69         - PCAP=OFF
70     - name: Linux amd64 (clang) with PCAP
71       os: linux
72       env:
73         - CXX=clang++
74         - CC=clang
75         - PCAP=ON
76     - name: Linux arm64 (clang) with PCAP
77       os: linux
78       arch: arm64
79       env:
80         - CXX=clang++
81         - CC=clang
82         - PCAP=ON
83     - name: Linux s390x (clang) with PCAP
84       os: linux
85       arch: s390x
86       env:
87         - CXX=clang++
88         - CC=clang
89         - PCAP=ON
90     - name: Linux ppc64le (clang) with PCAP
91       os: linux
92       arch: ppc64le
93       env:
94         - CXX=clang++
95         - CC=clang
96         - PCAP=ON
97     - name: Linux amd64 (clang) without PCAP
98       os: linux
99       env:
100         - CXX=clang++
101         - CC=clang
102         - PCAP=OFF
103     - name: Windows (VS2017 x64)
104       # Set a supported language, otherwise the Windows worker will not start.
105       language: shell
106       os: windows
107       env:
108         - PLATFORM: x64
109         - WIRESHARK_BASE_DIR: C:/wireshark-libs
110         - QT5_BASE_DIR: C:/Qt/5.12.3/msvc2017_64
111       cache:
112         directories:
113           - travis-cache
114     - name: Windows (VS2017 Win32)
115       # Set a supported language, otherwise the Windows worker will not start.
116       language: shell
117       os: windows
118       env:
119         - PLATFORM: Win32
120         - WIRESHARK_BASE_DIR: C:/wireshark-libs
121         - QT5_BASE_DIR: C:/Qt/5.12.3/msvc2017
122       cache:
123         directories:
124           - travis-cache
125   # Windows builds are experimental in Travis and are unreliable, do not force it.
126   allow_failures:
127     - os: windows
128 before_install:
129   - echo $TRAVIS_OS_NAME
130   # macos
131   - if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./tools/macos-setup-brew.sh; fi
132   - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install softhsm; fi
133   - if [ "$TRAVIS_OS_NAME" == "osx" ]; then sed s/access_bpf/staff/ packaging/macosx/ChmodBPF/ChmodBPF | sudo bash; fi
134   # linux
135   - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ./tools/debian-setup.sh --install-optional --install-test-deps -q; fi
136   - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y python3-pip; fi
137   # windows
138   - if [ "$TRAVIS_OS_NAME" == "windows" ]; then tools/travis-cache-windows.sh restore; fi
139   - if [ "$TRAVIS_OS_NAME" == "windows" ]; then cinst -y --no-progress python3 winflexbison strawberryperl; fi
140   - |
141     if [ "$TRAVIS_OS_NAME" == "windows" ]; then
142       # Ensure Python and the Scripts folder is available in PATH.
143       # refreshenv does not seem to work in bash, so reload it manually.
144       # Entries in the Machine PATH might contain trailing slashes, drop those.
145       # Apply Process paths before Machine to ensure /bin appears before others (otherwise casher will break and stall).
146       export PATH="$(powershell -Command '("Process", "Machine" | % {
147         [Environment]::GetEnvironmentVariable("PATH", $_) -Split ";" -Replace "\\$", ""
148       } | Select -Unique | % { cygpath $_ }) -Join ":"')"
149       echo "PATH=$PATH"
150       # Workaround to avoid using perl from git-bash $PATH which lacks modules such as Pod::Usage
151       export CMAKE_PROGRAM_PATH=C:/Strawberry/perl/bin
152     fi
153   - if [ "$TRAVIS_OS_NAME" == "windows" ]; then tools/travis-install-qt-windows.sh; fi
154   # all platforms
155   - pip3 install pytest pytest-xdist
156 before_script:
157   - mkdir build
158   - cd build
159   - if [ "$TRAVIS_OS_NAME" != "windows" ]; then cmake -GNinja -DENABLE_PCAP=${PCAP} ..; fi
160   - if [ "$TRAVIS_OS_NAME" == "windows" ]; then cmake -A $PLATFORM ..; fi
161 script:
162   # Enable parallelism for msbuild too (since CMake 3.12; ninja does not need it)
163   - export CMAKE_BUILD_PARALLEL_LEVEL=
164   - if [ "$TRAVIS_OS_NAME" == "windows" ]; then cmake() { ../tools/filter-msbuild.py cmake "$@"; }; fi
165   # Invoke ninja (Linux/macOS, --config is ignored) or msbuild (Windows)
166   - cmake --build . --config RelWithDebInfo
167   - cmake --build . --config RelWithDebInfo --target test-programs
168   - if [ "$PCAP" = "OFF" ]; then export PYTEST_ADDOPTS=--skip-missing-programs=dumpcap,rawshark; fi
169   - if [ "$TRAVIS_OS_NAME" == "linux" -a "$PCAP" = "ON" ]; then sudo setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi
170   - pytest
171   - cd ..
172 before_cache:
173   - if [ "$TRAVIS_OS_NAME" == "windows" ]; then tools/travis-cache-windows.sh save; fi
174 after_script:
175   - cd build
176   - if [ -f run/tshark ]; then run/tshark --version; fi
177   - if [ -f run/RelWithDebInfo/tshark.exe ]; then run/RelWithDebInfo/tshark.exe --version; fi
178   - ../test/travis-upload-artifacts.sh