-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.travis.yml
60 lines (47 loc) · 2.02 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
# Derived from Nicolas Iooss: https://github.com/fishilico/selinux-refpolicy-patched/blob/travis-upstream/.travis.yml
language: python
python:
- "2.7"
# for T in standard mls mcs ; do for D in arch debian gentoo ; do for I in n y ; do for M in y n ; do
# echo " - TYPE=$T DISTRO=$D DIRECT_INITRC=$I MONOLITHIC=$M" ; done ; done ; done ; done
env:
- TYPE=standard DISTRO=gentoo DIRECT_INITRC=n MONOLITHIC=n
- TYPE=mcs DISTRO=gentoo DIRECT_INITRC=n MONOLITHIC=n
- TYPE=mls DISTRO=gentoo DIRECT_INITRC=n MONOLITHIC=n
- TYPE=standard DISTRO=gentoo DIRECT_INITRC=y MONOLITHIC=n
- TYPE=mcs DISTRO=gentoo DIRECT_INITRC=y MONOLITHIC=n
- TYPE=mls DISTRO=gentoo DIRECT_INITRC=y MONOLITHIC=n
before_install:
- lsb_release -a
- bison -V
- flex -V
- sudo apt-get update -qq
# Install SELinux userspace utilities dependencies
- sudo apt-get install -qq libaudit-dev libcap-ng-dev libustr-dev libpcre3-dev swig
install:
# Download current SELinux userspace tools and libraries
- curl -sS -L https://github.com/SELinuxProject/selinux/archive/20150202.tar.gz | tar xz
- mv selinux-20150202 selinux-src
# Ubuntu 12.04 coreutils is too old to provide "ln --relative" :(
- sed 's/ln -sf --relative /ln -sf /' -i selinux-src/libsepol/src/Makefile
- sed 's/ln -sf --relative /ln -sf /' -i selinux-src/libselinux/src/Makefile
# Drop sepolicy to break setools dependence (sepolicy isn't used anyway)
- sed -i -e 's/sepolicy//' selinux-src/policycoreutils/Makefile
# Compile and install SELinux toolchain
# On Ubuntu 12.04, default CFLAGS make the build fail in libsepol/cil with:
# error: declaration of 'index' shadows a global declarationo
- sudo make CFLAGS="-O2 -pipe -fPIC -Wall" -C selinux-src install
# Drop build.conf settings to listen to env vars
- sed -r -i -e '/(DIRECT_INITRC|MONOLITHIC|TYPE|DISTRO)/d' build.conf
script:
- echo $TYPE $DISTRO $DIRECT_INITRC $MONOLITHIC
- make bare
- make conf
- make
- make validate
branches:
only:
- /^travis-.*/
- master
notifications:
email: false