setools/.travis.yml

78 lines
1.8 KiB
YAML
Raw Normal View History

# SELinux userspace portions originally by Nicolas Iooss
# from: https://github.com/fishilico/selinux-refpolicy-patched/blob/travis-upstream/.travis.yml
---
2015-02-04 15:33:12 +00:00
language: python
2017-08-05 20:49:23 +00:00
python:
- "3.4"
- "3.5"
- "3.6"
2015-05-10 16:15:16 +00:00
matrix:
2017-08-05 19:55:07 +00:00
fast_finish: true
2017-08-05 20:49:23 +00:00
include:
- env: TOX_ENV=pep8
- env: TOX_ENV=coverage
- env: TOX_ENV=lint
allow_failures:
2015-05-10 16:15:16 +00:00
- env: TOX_ENV=coverage
2017-08-05 19:55:07 +00:00
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
2015-02-05 14:59:07 +00:00
- bison -V
- flex -V
2017-08-05 19:55:07 +00:00
- python -V
2017-08-05 20:49:23 +00:00
- sudo apt-get update -qq
2017-08-05 19:55:07 +00:00
install:
- SELINUX_USERSPACE_VERSION=libsepol-2.7
2015-02-05 14:59:07 +00:00
# Install newer swig
- curl -sS -L http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz | tar xz
- cd swig-3.0.8
2015-02-05 14:59:07 +00:00
- ./configure
- make
- sudo make install
- cd ..
# Download current SELinux userspace tools and libraries
2017-08-05 19:55:07 +00:00
- 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
2015-02-04 15:33:12 +00:00
# Ubuntu 12.04's flex generates a redundant decl in libqpol
- sed -i -e "/Wwrite-strings/s/,/, '-Wno-redundant-decls',/" setup.py
2017-08-05 20:49:23 +00:00
- pip install tox-travis
script:
- tox --version
2017-08-05 20:49:23 +00:00
- |
[ -z "$TOX_ENV" ] && tox || tox -e $TOX_ENV
2017-08-05 19:55:07 +00:00
after_failure:
- cat "${TRAVIS_BUILD_DIR}/.tox/tox-0.log"