setools/.travis.yml

77 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
---
env:
global:
2018-07-28 13:26:24 +00:00
# LIBSEPOLA needed by the Makefiles.
- USERSPACE_SRC=$TRAVIS_BUILD_DIR/selinux-src
- SELINUX_USERSPACE_VERSION=libsepol-3.0
2018-07-28 13:26:24 +00:00
- SEPOL_SRC=$USERSPACE_SRC/libsepol
- LIBSEPOLA=$SEPOL_SRC/src/libsepol.a
- SELINUX_SRC=$USERSPACE_SRC/libselinux
- CHECKPOLICY_SRC=$USERSPACE_SRC/checkpolicy
2015-02-04 15:33:12 +00:00
language: python
2017-08-05 20:49:23 +00:00
python:
- "3.6"
- "3.7"
- "3.8"
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=lint
- env: TOX_ENV=mypy
# - env: TOX_ENV=coverage
2017-08-05 20:49:23 +00:00
# allow_failures:
# - env: TOX_ENV=coverage
sudo: false
dist: bionic
2017-08-05 19:55:07 +00:00
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
- pip list
2017-08-05 20:49:23 +00:00
- sudo apt-get update -qq
2017-08-05 19:55:07 +00:00
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
2018-07-28 13:26:24 +00:00
- make -C ${SEPOL_SRC}
- make CFLAGS="-O2 -pipe -fPIC -Wall -I${SEPOL_SRC}/include" LDFLAGS="-L${SEPOL_SRC}/src" -C ${SELINUX_SRC}
- make CFLAGS="-O2 -pipe -fPIC -Wall -I${SEPOL_SRC}/include" -C ${CHECKPOLICY_SRC}
2015-02-04 15:33:12 +00:00
- sed -i -e "/Wwrite-strings/s/,/, '-Wno-maybe-uninitialized',/" setup.py
2018-01-07 16:08:42 +00:00
- pip install tox-travis cython
script:
- tox --version
2018-07-28 13:26:24 +00:00
- export LD_LIBRARY_PATH="${SEPOL_SRC}/src:${SELINUX_SRC}/src"
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"