This repository has been archived by the owner on Jun 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
/
.travis.yml
77 lines (61 loc) · 1.79 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
# SELinux userspace portions originally by Nicolas Iooss
# from: https://github.com/fishilico/selinux-refpolicy-patched/blob/travis-upstream/.travis.yml
---
language: python
python:
- "3.4"
- "3.5"
- "3.6"
matrix:
fast_finish: true
include:
- env: TOX_ENV=pep8
- env: TOX_ENV=coverage
- env: TOX_ENV=lint
allow_failures:
- env: TOX_ENV=coverage
sudo: required
dist: trusty
addons:
apt:
packages:
# Install SELinux userspace utilities dependencies
- bison
- flex
- gettext
- libaudit-dev
- libbz2-dev
- libustr-dev
- libpcre3-dev
before_install:
- lsb_release -a
- bison -V
- flex -V
- python -V
- sudo apt-get update -qq
install:
- SELINUX_USERSPACE_VERSION=libsepol-2.7
# Install newer swig
- curl --retry 10 --retry-delay 60 -sS -L http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz | tar xz
- cd swig-3.0.8
- ./configure
- make
- sudo make install
- cd ..
# Download current SELinux userspace tools and libraries
- git clone https://github.com/SELinuxProject/selinux.git selinux-src -b ${SELINUX_USERSPACE_VERSION}
# Only portions of the toolchain are necessary
- sed -i -e 's/^SUBDIRS=.*/SUBDIRS=libsepol libselinux checkpolicy/' selinux-src/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
# Ubuntu 12.04's flex generates a redundant decl in libqpol
- sed -i -e "/Wwrite-strings/s/,/, '-Wno-redundant-decls',/" setup.py
- pip install tox-travis
script:
- tox --version
- |
[ -z "$TOX_ENV" ] && tox || tox -e $TOX_ENV
after_failure:
- cat "${TRAVIS_BUILD_DIR}/.tox/tox-0.log"