mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-22 11:06:30 +00:00
71 lines
1.6 KiB
YAML
71 lines
1.6 KiB
YAML
# SELinux userspace portions originally by Nicolas Iooss
|
|
# from: https://github.com/fishilico/selinux-refpolicy-patched/blob/travis-upstream/.travis.yml
|
|
---
|
|
|
|
env:
|
|
global:
|
|
- USERSPACE_SRC=$TRAVIS_BUILD_DIR/selinux-src
|
|
- SELINUX_USERSPACE_VERSION=libsepol-2.8
|
|
- LIBSEPOLA="$USERSPACE_SRC/libsepol/src/libsepol.a"
|
|
|
|
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: false
|
|
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
|
|
- pip list
|
|
- sudo apt-get update -qq
|
|
|
|
install:
|
|
# Download current SELinux userspace tools and libraries
|
|
- git clone https://github.com/SELinuxProject/selinux.git ${USERSPACE_SRC} -b ${SELINUX_USERSPACE_VERSION}
|
|
|
|
# Compile SELinux userspace
|
|
- make -C selinux-src/libsepol
|
|
- make CFLAGS="-O2 -pipe -fPIC -Wall -I$TRAVIS_BUILD_DIR/selinux-src/libsepol/include" LDFLAGS="-L$TRAVIS_BUILD_DIR/selinux-src/libsepol/src" -C selinux-src/libselinux
|
|
- make CFLAGS="-O2 -pipe -fPIC -Wall -I$TRAVIS_BUILD_DIR/selinux-src/libsepol/include" -C selinux-src/checkpolicy
|
|
|
|
- sed -i -e "/Wwrite-strings/s/,/, '-Wno-maybe-uninitialized',/" setup.py
|
|
|
|
- pip install tox-travis cython
|
|
|
|
script:
|
|
- tox --version
|
|
- |
|
|
[ -z "$TOX_ENV" ] && tox || tox -e $TOX_ENV
|
|
|
|
after_failure:
|
|
- cat "${TRAVIS_BUILD_DIR}/.tox/tox-0.log"
|