forked from wireshark/wireshark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
191 lines (191 loc) · 6.1 KB
/
.travis.yml
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
language: minimal
dist: bionic
matrix:
include:
- name: OSX (xcode10.3 clang-10.0.1) with PCAP
os: osx
osx_image: xcode10.3
compiler: clang
env: PCAP=ON
- name: OSX (xcode10.3 clang-10.0.1) without PCAP
os: osx
osx_image: xcode10.3
compiler: clang
env: PCAP=OFF
- name: OSX (xcode11.2 clang-11.0.0) with PCAP
os: osx
osx_image: xcode11.2
env: PCAP=ON
- name: OSX (xcode11.2 clang-11.0.0) without PCAP
os: osx
osx_image: xcode11.2
env: PCAP=OFF
- name: Linux amd64 (gcc-9) with PCAP
os: linux
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- sourceline: ppa:ubuntu-toolchain-r/test
packages: g++-9
env:
- CXX=g++-9
- CC=gcc-9
- PCAP=ON
- name: Linux amd64 (gcc-8) with PCAP
os: linux
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages: g++-8
env:
- CXX=g++-8
- CC=gcc-8
- PCAP=ON
- name: Linux arm64 (gcc-8) with PCAP
os: linux
arch: arm64
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages: g++-8
env:
- CXX=g++-8
- CC=gcc-8
- PCAP=ON
- name: Linux s390x (gcc-7) with PCAP
os: linux
arch: s390x
env:
- PCAP=ON
- name: Linux ppc64le (gcc-7) with PCAP
os: linux
arch: ppc64le
env:
- PCAP=ON
- name: Linux amd64 (gcc-8) without PCAP
os: linux
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages: g++-8
env:
- CXX=g++-8
- CC=gcc-8
- PCAP=OFF
- name: Linux amd64 (clang) with PCAP
os: linux
env:
- CXX=clang++
- CC=clang
- PCAP=ON
- name: Linux arm64 (clang) with PCAP
os: linux
arch: arm64
env:
- CXX=clang++
- CC=clang
- PCAP=ON
- name: Linux s390x (clang) with PCAP
os: linux
arch: s390x
env:
- CXX=clang++
- CC=clang
- PCAP=ON
- name: Linux ppc64le (clang) with PCAP
os: linux
arch: ppc64le
env:
- CXX=clang++
- CC=clang
- PCAP=ON
- name: Linux amd64 (clang) without PCAP
os: linux
env:
- CXX=clang++
- CC=clang
- PCAP=OFF
- name: Windows (VS2017 x64)
# Set a supported language, otherwise the Windows worker will not start.
language: shell
os: windows
env:
- PLATFORM: x64
- WIRESHARK_BASE_DIR: C:/wireshark-libs
- QT5_BASE_DIR: C:/Qt/5.12.3/msvc2017_64
cache:
directories:
- travis-cache
- name: Windows (VS2017 Win32)
# Set a supported language, otherwise the Windows worker will not start.
language: shell
os: windows
env:
- PLATFORM: Win32
- WIRESHARK_BASE_DIR: C:/wireshark-libs
- QT5_BASE_DIR: C:/Qt/5.12.3/msvc2017
cache:
directories:
- travis-cache
# Windows builds are experimental in Travis and are unreliable, do not force it.
allow_failures:
- os: windows
before_install:
- echo $TRAVIS_OS_NAME
# macos
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./tools/macos-setup-brew.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install softhsm; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then sed s/access_bpf/staff/ packaging/macosx/ChmodBPF/ChmodBPF | sudo bash; fi
# linux
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ./tools/debian-setup.sh --install-optional --install-test-deps -q; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y python3-pip; fi
# windows
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then tools/travis-cache-windows.sh restore; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then cinst -y --no-progress python3 winflexbison strawberryperl; fi
- |
if [ "$TRAVIS_OS_NAME" == "windows" ]; then
# Ensure Python and the Scripts folder is available in PATH.
# refreshenv does not seem to work in bash, so reload it manually.
# Entries in the Machine PATH might contain trailing slashes, drop those.
# Apply Process paths before Machine to ensure /bin appears before others (otherwise casher will break and stall).
export PATH="$(powershell -Command '("Process", "Machine" | % {
[Environment]::GetEnvironmentVariable("PATH", $_) -Split ";" -Replace "\\$", ""
} | Select -Unique | % { cygpath $_ }) -Join ":"')"
echo "PATH=$PATH"
# Workaround to avoid using perl from git-bash $PATH which lacks modules such as Pod::Usage
export CMAKE_PROGRAM_PATH=C:/Strawberry/perl/bin
fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then tools/travis-install-qt-windows.sh; fi
# all platforms
- pip3 install pytest pytest-xdist
before_script:
- mkdir build
- cd build
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then cmake -GNinja -DENABLE_PCAP=${PCAP} ..; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then cmake -A $PLATFORM ..; fi
script:
# Enable parallelism for msbuild too (since CMake 3.12; ninja does not need it)
- export CMAKE_BUILD_PARALLEL_LEVEL=
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then cmake() { ../tools/filter-msbuild.py cmake "$@"; }; fi
# Invoke ninja (Linux/macOS, --config is ignored) or msbuild (Windows)
- cmake --build . --config RelWithDebInfo
- cmake --build . --config RelWithDebInfo --target test-programs
- if [ "$PCAP" = "OFF" ]; then export PYTEST_ADDOPTS=--skip-missing-programs=dumpcap,rawshark; fi
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$PCAP" = "ON" ]; then sudo setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi
- pytest
- cd ..
before_cache:
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then tools/travis-cache-windows.sh save; fi
after_script:
- cd build
- if [ -f run/tshark ]; then run/tshark --version; fi
- if [ -f run/RelWithDebInfo/tshark.exe ]; then run/RelWithDebInfo/tshark.exe --version; fi
- ../test/travis-upload-artifacts.sh