-
Notifications
You must be signed in to change notification settings - Fork 154
/
Copy path.travis.yml
98 lines (85 loc) · 4.19 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
sudo: required
language: c
# Get full repo to correctly determine tags from commits
git:
depth: false
# Use docker to test builds on different Linux distros.
# Latest stable image of each distro is pulled to test builds.
matrix:
include:
# https://hub.docker.com/_/fedora/
- os: linux
compiler: gcc
env:
- DISTRO_TYPE=fedora
INSTALL_REQUIREMENTS="dnf repolist; dnf --allowerasing install -y gcc python3 meson sudo langpacks-zh_CN ed ncurses vi findutils which nmap-ncat expect git glibc-all-langpacks procps diffutils"
before_install:
- docker pull ${DISTRO_TYPE}
# https://hub.docker.com/_/opensuse/
# 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/tumbleweed
INSTALL_REQUIREMENTS="zypper refresh; zypper in -y gcc python3 python3-pip ninja sudo glibc-locale glibc-devel ed ncurses-utils vim findutils which netcat expect git man groff; pip3 install meson==0.44.0"
before_install:
- docker pull ${DISTRO_TYPE}
# https://hub.docker.com/_/ubuntu/
# Ubuntu requires explicitly generating en_US.UTF-8 locale
- os: linux
compiler: gcc
env:
- DISTRO_TYPE=ubuntu
INSTALL_REQUIREMENTS="apt-get update; DEBIAN_FRONTEND=noninteractive apt-get install -yq gcc python3 sudo locales ed vim python3-pip ninja-build findutils debianutils netcat-openbsd expect git procps man groff; pip3 install meson==0.44.0; locale-gen en_US.UTF-8"
before_install:
- docker pull ${DISTRO_TYPE}
# https://hub.docker.com/_/debian/
# Debian requires explicitly generating en_US.UTF-8 locale too
- os: linux
compiler: gcc
env:
- DISTRO_TYPE=debian
INSTALL_REQUIREMENTS="apt-get update; DEBIAN_FRONTEND=noninteractive apt-get install -yq gcc python3 python3-pip ninja-build sudo locales ed vim procps findutils debianutils netcat-openbsd expect git man groff; 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}
# https://hub.docker.com/r/i386/ubuntu/
# 32-bit environment
# i686 images are built officially by docker but not supported
# https://github.com/docker-library/official-images#architectures-other-than-amd64
- os: linux
compiler: gcc
env:
- DISTRO_TYPE=i386/ubuntu
INSTALL_REQUIREMENTS="apt-get update; DEBIAN_FRONTEND=noninteractive apt-get install -yq gcc python3 sudo locales ed vim python3-pip ninja-build findutils debianutils netcat-openbsd expect git man groff; pip3 install meson==0.44.0; locale-gen en_US.UTF-8"
before_install:
- docker pull ${DISTRO_TYPE}
- os: osx
compiler: clang
before_install:
# Note that scripts/build-on-macos.sh will install the
# prerequisites such as Meson and Sphinx using HomeBrew. This is
# obviously different compared to the Linux platforms.
- brew update
env:
# This variable is not required by macOS builds, but setting it for Travis dashboard.
- DISTRO_TYPE=macOS
- os: linux
env:
- SCAN_TYPE="shellcheck"
before_install:
- sudo apt-get update
- sudo apt-get install shellcheck findutils file
services:
- docker
script:
# Fetch tags to set version number
- git fetch --tags
- if [[ $SCAN_TYPE == "shellcheck" ]]; then exec bin/shellcheck; fi
- 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;
echo \"/tmp/ksh_auditfile;\$(id -u test)\" > /etc/ksh_audit;
chown -R test /source;
sudo -u test /source/scripts/build-on-docker.sh '${DISTRO_TYPE}'"