• Home
  • Raw
  • Download

Lines Matching +full:python +full:- +full:version

8     runs-on: ubuntu-latest
12 python-ruby-version:
13 - {python: '3.12', ruby: '3.3'}
14 - {python: '3.12', ruby: '3.3', other: 'test-flags-override'}
15 - {python: '3.12', ruby: '3.3', other: 'test-debug'}
16 - {python: '3.12', ruby: '3.3', other: 'linker-bfd'}
17 - {python: '3.12', ruby: '3.3', other: 'linker-gold'}
18 # Test several Python versions with the latest Ruby version
19 - {python: '3.11', ruby: '3.3'}
20 - {python: '3.10', ruby: '3.3'}
21 - {python: '3.9', ruby: '3.3'}
22 - {python: '3.8', ruby: '3.3'}
23 - {python: '3.7', ruby: '3.3'}
24 - {python: 'pypy3.7', ruby: '3.3'}
25 # Test several Ruby versions with the latest Python version
26 - {python: '3.12', ruby: '3.2'}
27 - {python: '3.12', ruby: '3.1'}
28 - {python: '3.12', ruby: '3.0'}
29 - {python: '3.12', ruby: '2.7'}
30 - {python: '3.12', ruby: '2.6'}
31 - {python: '3.12', ruby: '2.5'}
33 - compiler: clang
34 python-ruby-version: {python: '3.12', ruby: '3.3', other: 'linker-bfd'}
35 - compiler: clang
36 python-ruby-version: {python: '3.12', ruby: '3.3', other: 'linker-gold'}
38 - compiler: gcc
39 python-ruby-version: {python: '3.12', ruby: '3.3', other: 'sanitizers'}
42 - uses: actions/checkout@v4
44 - name: Set up Python ${{ matrix.python-ruby-version.python }}
45 uses: actions/setup-python@v5
47 python-version: ${{ matrix.python-ruby-version.python }}
49 - name: Set up Ruby ${{ matrix.python-ruby-version.ruby }}
50 uses: ruby/setup-ruby@v1
52 ruby-version: ${{ matrix.python-ruby-version.ruby }}
53 bundler-cache: true
55 - name: Install dependencies
57 sudo apt-get update -q
58 sudo apt-get install -qy --no-install-recommends \
63 libaudit-dev \
64 libcap-dev \
65 libcap-ng-dev \
66 libcunit1-dev \
67 libdbus-glib-1-dev \
68 libpcre2-dev \
69 ruby-dev \
75 - name: Install Python setuptools
76 if: matrix.python-ruby-version.python == '3.12'
79 - name: Install Clang
81 run: sudo apt-get install -qqy clang
83 - name: Configure the environment
86 echo "PYTHON=python" >> $GITHUB_ENV
91 if [ "${{ matrix.python-ruby-version.other }}" = "linker-bfd" ] ; then
92 CC="$CC -fuse-ld=bfd"
93 elif [ "${{ matrix.python-ruby-version.other }}" = "linker-gold" ] ; then
94 CC="$CC -fuse-ld=gold"
96 # https://bugs.ruby-lang.org/issues/18616
97 # https://github.com/llvm/llvm-project/issues/49958
98 …if [ "${{ matrix.compiler }}" = "clang" ] && [[ "${{ matrix.python-ruby-version.ruby }}" = 3* ]] ;…
99 CC="$CC -fdeclspec"
104 if [ "${{ matrix.python-ruby-version.other }}" = "test-flags-override" ] ; then
106 … EXPLICIT_MAKE_VARS="CFLAGS=-I$DESTDIR/usr/include LDFLAGS=-L$DESTDIR/usr/lib LDLIBS= CPPFLAGS="
107 elif [ "${{ matrix.python-ruby-version.other }}" = "test-debug" ] ; then
110 elif [ "${{ matrix.python-ruby-version.other }}" = "sanitizers" ] ; then
111 sanitizers='-fsanitize=address,undefined'
112 …EXPLICIT_MAKE_VARS="CFLAGS='-g -I$DESTDIR/usr/include $sanitizers' LDFLAGS='-L$DESTDIR/usr/lib $sa…
120 # Find files in order of pkgconf to be able to find Python.h
121 # For example with Python 3.5:
122 # * python is located at /opt/hostedtoolcache/Python/3.5.10/x64/bin/python
123 # * sys.prefix is /opt/hostedtoolcache/Python/3.5.10/x64
124 … # * Python.h is located at /opt/hostedtoolcache/Python/3.5.10/x64/include/python3.5m/Python.h
125 … # * python-3.5.pc is located at /opt/hostedtoolcache/Python/3.5.10/x64/lib/pkgconfig/python-3.5.pc
126 PYTHON_SYS_PREFIX="$(python -c 'import sys;print(sys.prefix)')"
129 if [[ "${{ matrix.python-ruby-version.python }}" = pypy* ]] ; then
130 # PyPy does not provide a config file for pkg-config
131 # libpypy-c.so is provided in bin/libpypy-c.so for PyPy and bin/libpypy3-c.so for PyPy3
132 echo "PYINC=-I${PYTHON_SYS_PREFIX}/include" >> $GITHUB_ENV
133 echo "PYLIBS=-L${PYTHON_SYS_PREFIX}/bin -lpypy3-c" >> $GITHUB_ENV
139 - name: Download and install refpolicy headers for sepolgen tests
141 …curl --location --retry 10 -o refpolicy.tar.bz2 https://github.com/SELinuxProject/refpolicy/releas…
142 tar -xvjf refpolicy.tar.bz2
143 sed -e "s,^PREFIX :=.*,PREFIX := $DESTDIR/usr," -i refpolicy/support/Makefile.devel
144 sudo make -C refpolicy install-headers bare
145 sudo mkdir -p /etc/selinux
148 sed -e "s,\"\(/usr/bin/[cs]\),\"$DESTDIR\1," -i python/sepolgen/src/sepolgen/module.py
149 rm -r refpolicy refpolicy.tar.bz2
151 - name: Display versions
154 $CC --version
156 echo "::group::Python ($(which "$PYTHON")):"
157 $PYTHON --version
160 $RUBY --version
163 - name: Run tests
166 eval make -j$(nproc) install $EXPLICIT_MAKE_VARS -k
168 echo "::group::make install-pywrap"
169 eval make -j$(nproc) install-pywrap $EXPLICIT_MAKE_VARS -k
171 echo "::group::make install-rubywrap"
172 eval make -j$(nproc) install-rubywrap $EXPLICIT_MAKE_VARS -k
177 eval make -j$(nproc) all $EXPLICIT_MAKE_VARS -k
194 if [ "${{ matrix.python-ruby-version.other }}" != "sanitizers" ] ; then
195 # Test Python and Ruby wrappers
196 echo "::group::Test Python and Ruby wrappers"
197 …$PYTHON -c 'import selinux;import selinux.audit2why;import semanage;print(selinux.is_selinux_enabl…
198 $RUBY -e 'require "selinux";require "semanage";puts Selinux::is_selinux_enabled()'
201 # Run Python linter, but not on the downloaded refpolicy
202 echo "::group::scripts/run-flake8"
203 ./scripts/run-flake8
209 rm -rf "$DESTDIR"
211 git status --short | sed -n 's/^??/error: missing .gitignore entry for/p' | (! grep '^')
214 …git ls-files --ignored --others --exclude-standard | sed 's/^/error: "make clean distclean" did no…