-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
135 lines (130 loc) · 4.12 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
branches:
except:
- /^.*(?i:no)_(?i:CI).*$/
matrix:
include:
# Run macOS and Kali first to decrease travis CI runtime
# macOS 10.14 Mojave
- os: osx
osx_image: xcode11.3
env: DOCKER=0
# macOS 10.13 High Sierra
- os: osx
osx_image: xcode10.1
env: DOCKER=0
# Kali Linux
- env: >-
DOCKER=1
distribution=kalilinux/kali-linux-docker
version=latest
prerequisite="apt-get update -qq && apt-get install -y git sudo"
# ArchLinux
- env: >-
DOCKER=1
distribution=archlinux/base
version=latest
prerequisite="pacman -Sy --noconfirm awk sudo git wget tar pkg-config"
# Debian 10
- env: >-
DOCKER=1
distribution=debian
version=latest
prerequisite="apt-get update -qq && apt-get install -y git sudo"
# Debian 9
- env: >-
DOCKER=1
distribution=debian
version=stable
prerequisite="apt-get update -qq && apt-get install -y git sudo"
# Fedora 29
- env: >-
DOCKER=1
distribution=fedora
version=29
prerequisite="dnf install -y git sudo"
# Fedora 30
- env: >-
DOCKER=1
distribution=fedora
version=30
prerequisite="dnf install -y git sudo"
# Fedora 31
- env: >-
DOCKER=1
distribution=fedora
version=31
prerequisite="dnf install -y git sudo"
# OpenSUSE Leap (stable)
- env: >-
DOCKER=1
distribution=opensuse/leap
version=latest
prerequisite="zypper install -y git sudo"
# OpenSUSE Tumbleweed (rolling)
- env: >-
DOCKER=1
distribution=opensuse/tumbleweed
version=latest
prerequisite="zypper install -y git sudo"
# Ubuntu 19.10
- env: >-
DOCKER=1
distribution=ubuntu
version=rolling
prerequisite="apt-get update -qq && apt-get install -y git sudo"
# Ubuntu 19.04
- env: >-
DOCKER=1
distribution=ubuntu
version=disco
prerequisite="apt-get update -qq && apt-get install -y git sudo"
# Ubuntu 18.10
- env: >-
DOCKER=1
distribution=ubuntu
version=cosmic
prerequisite="apt-get update -qq && apt-get install -y git sudo"
# Ubuntu 18.04 docker
- env: >-
DOCKER=1
distribution=ubuntu
version=latest
prerequisite="apt-get update -qq && apt-get install -y git sudo"
# Ubuntu 18.04
- os: linux
dist: bionic
env: DOCKER=0
# Ubuntu 16.04
- os: linux
dist: xenial
env: DOCKER=0
sudo: required
services: docker
language: cpp
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$DOCKER" == "0" ]]; then
sudo apt-get update -qq
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$DOCKER" == "1" ]]; then
sudo docker pull ${distribution}:${version}
fi
install:
- |
if [[ "$DOCKER" == "0" ]]; then
./resources/install_dependencies.sh
fi
script:
- |
if [[ "$DOCKER" == "0" ]]; then
./build.sh --non-interactive; ./run_tests
fi
- |
if [[ "$DOCKER" == "1" ]]; then
sudo docker run ${distribution}:${version} /bin/bash -c "${prerequisite} && git clone https://github.com/"${TRAVIS_REPO_SLUG}" && cd ID2T && git checkout ${TRAVIS_BRANCH} && ./resources/install_dependencies.sh -y && ./build.sh --non-interactive && ./run_tests" --rm
fi