[go: up one dir, main page]

File: .travis.yml

package info (click to toggle)
setools 4.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,900 kB
  • sloc: python: 20,968; makefile: 14
file content (75 lines) | stat: -rw-r--r-- 1,794 bytes parent folder | download
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
# SELinux userspace portions originally by Nicolas Iooss
# from: https://github.com/fishilico/selinux-refpolicy-patched/blob/travis-upstream/.travis.yml
---

env:
  global:
    # LIBSEPOLA needed by the Makefiles.
    - USERSPACE_SRC=$TRAVIS_BUILD_DIR/selinux-src
    - SELINUX_USERSPACE_VERSION=libsepol-2.8
    - SEPOL_SRC=$USERSPACE_SRC/libsepol
    - LIBSEPOLA=$SEPOL_SRC/src/libsepol.a
    - SELINUX_SRC=$USERSPACE_SRC/libselinux
    - CHECKPOLICY_SRC=$USERSPACE_SRC/checkpolicy

language: python

python:
  - "3.6"
  - "3.7"
  - "3.8"

matrix:
  fast_finish: true
  include:
    - env: TOX_ENV=pep8
    - env: TOX_ENV=lint
#    - env: TOX_ENV=coverage

#  allow_failures:
#    - env: TOX_ENV=coverage

sudo: false
dist: bionic

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 ${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}

  - sed -i -e "/Wwrite-strings/s/,/, '-Wno-maybe-uninitialized',/" setup.py

  - pip install tox-travis cython

script:
  - tox --version
  - export LD_LIBRARY_PATH="${SEPOL_SRC}/src:${SELINUX_SRC}/src"
  - |
      [ -z "$TOX_ENV" ] && tox || tox -e $TOX_ENV

after_failure:
  - cat "${TRAVIS_BUILD_DIR}/.tox/tox-0.log"