/
.travis.yml
60 lines (52 loc) · 2.34 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
sudo: required
language: c
matrix:
include:
- os: linux
compiler: gcc
env:
- DISTRO_TYPE=fedora
INSTALL_REQUIREMENTS="dnf repolist; dnf install -y gcc python3 meson sudo langpacks-zh_CN ed ncurses vi findutils which nmap-ncat"
before_install:
- docker pull ${DISTRO_TYPE}
# Note: Meson 0.44.0 is the newest version that works with Python
# 3.4 available on OpenSuse Leap. See issue #430.
- os: linux
compiler: gcc
env:
- DISTRO_TYPE=opensuse
INSTALL_REQUIREMENTS="zypper refresh; zypper in -y gcc python3 python3-pip ninja sudo glibc-locale glibc-devel ed ncurses-utils vim findutils which netcat; pip3 install meson==0.44.0"
before_install:
- docker pull ${DISTRO_TYPE}
# Ubuntu requires explicitly generating en_US.UTF-8 locale
- os: linux
compiler: gcc
env:
- DISTRO_TYPE=ubuntu
INSTALL_REQUIREMENTS="apt-get update; apt-get install -y gcc python3 sudo locales ed vim python3-pip ninja-build findutils debianutils netcat-openbsd; pip3 install meson==0.44.0; locale-gen en_US.UTF-8"
before_install:
- docker pull ${DISTRO_TYPE}
# Debian requires explicitly generating en_US.UTF-8 locale too
- os: linux
compiler: gcc
env:
- DISTRO_TYPE=debian
INSTALL_REQUIREMENTS="apt-get update; apt-get install -y gcc python3 python3-pip ninja-build sudo locales ed vim procps findutils debianutils netcat-openbsd; pip3 install meson==0.44.0; sed -i '/# en_US.UTF-8 UTF-8/s/..//' /etc/locale.gen && locale-gen"
before_install:
- docker pull ${DISTRO_TYPE}
- os: osx
compiler: clang
before_install:
- brew update
env:
# This variable is not required by macOS builds, but setting it for Travis dashboard.
- DISTRO_TYPE=macOS
services:
- docker
script:
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then exec scripts/build-on-macos.sh; fi
- docker run -v $TRAVIS_BUILD_DIR:/source ${DISTRO_TYPE} bash -c "set -e;
${INSTALL_REQUIREMENTS};
useradd --create-home test;
chown -R test /source;
sudo -u test /source/scripts/build-on-docker.sh"