Skip to content

Commit 73b9106

Browse files
cgzonesjwcart2
authored andcommitted
ci: bump versions in GitHub Actions
* Move from deprecated actions/setup-ruby to ruby/setup-ruby. * Bump python and ruby upper versions. * Bump Reference Policy version * Do not install recommend packages and output package resolution * Bump to macOS 12 macOS 10 is deprecated since 5/31/22 [1]. VirtualBox and Vagrant seems to be supported [2][3]. [1]: actions/runner-images#5583 [2]: actions/runner-images#5594 [3]: actions/runner-images#5854 Signed-off-by: Christian Göttsche <[email protected]> Acked-by: James Carter <[email protected]>
1 parent b5b3afb commit 73b9106

File tree

2 files changed

+38
-29
lines changed

2 files changed

+38
-29
lines changed

.github/workflows/run_tests.yml

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,48 +10,51 @@ jobs:
1010
matrix:
1111
compiler: [gcc, clang]
1212
python-ruby-version:
13-
- {python: 3.9, ruby: 2.7}
14-
- {python: 3.9, ruby: 2.7, other: test-flags-override}
15-
- {python: 3.9, ruby: 2.7, other: test-debug}
16-
- {python: 3.9, ruby: 2.7, other: linker-bfd}
17-
- {python: 3.9, ruby: 2.7, other: linker-gold}
13+
- {python: '3.10', ruby: '3.1'}
14+
- {python: '3.10', ruby: '3.1', other: test-flags-override}
15+
- {python: '3.10', ruby: '3.1', other: test-debug}
16+
- {python: '3.10', ruby: '3.1', other: linker-bfd}
17+
- {python: '3.10', ruby: '3.1', other: linker-gold}
1818
# Test several Python versions with the latest Ruby version
19-
- {python: 3.8, ruby: 2.7}
20-
- {python: 3.7, ruby: 2.7}
21-
- {python: 3.6, ruby: 2.7}
22-
- {python: 3.5, ruby: 2.7}
23-
- {python: pypy3, ruby: 2.7}
19+
- {python: '3.9', ruby: '3.1'}
20+
- {python: '3.8', ruby: '3.1'}
21+
- {python: '3.7', ruby: '3.1'}
22+
- {python: '3.6', ruby: '3.1'}
23+
- {python: '3.5', ruby: '3.1'}
24+
- {python: 'pypy3.7', ruby: '3.1'}
2425
# Test several Ruby versions with the latest Python version
25-
- {python: 3.9, ruby: 2.6}
26-
- {python: 3.9, ruby: 2.5}
26+
- {python: '3.10', ruby: '3.0'}
27+
- {python: '3.10', ruby: '2.7'}
28+
- {python: '3.10', ruby: '2.6'}
29+
- {python: '3.10', ruby: '2.5'}
2730
exclude:
2831
- compiler: clang
29-
python-ruby-version: {python: 3.9, ruby: 2.7, other: linker-bfd}
32+
python-ruby-version: {python: '3.10', ruby: '3.1', other: linker-bfd}
3033
- compiler: clang
31-
python-ruby-version: {python: 3.9, ruby: 2.7, other: linker-gold}
34+
python-ruby-version: {python: '3.10', ruby: '3.1', other: linker-gold}
3235
include:
3336
- compiler: gcc
34-
python-ruby-version: {python: 3.9, ruby: 2.7, other: sanitizers}
37+
python-ruby-version: {python: '3.10', ruby: '3.1', other: sanitizers}
3538

3639
steps:
37-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v3
3841

3942
- name: Set up Python ${{ matrix.python-ruby-version.python }}
40-
uses: actions/setup-python@v2
43+
uses: actions/setup-python@v4
4144
with:
4245
python-version: ${{ matrix.python-ruby-version.python }}
4346

4447
- name: Set up Ruby ${{ matrix.python-ruby-version.ruby }}
45-
uses: actions/setup-ruby@v1
48+
uses: ruby/setup-ruby@v1
4649
with:
4750
ruby-version: ${{ matrix.python-ruby-version.ruby }}
51+
bundler-cache: true
4852

4953
- name: Install dependencies
5054
run: |
51-
sudo apt-get update -qq
52-
sudo apt-get install -qqy \
55+
sudo apt-get update -q
56+
sudo apt-get install -qy --no-install-recommends \
5357
bison \
54-
clang \
5558
flex \
5659
gawk \
5760
gettext \
@@ -61,14 +64,16 @@ jobs:
6164
libcunit1-dev \
6265
libdbus-glib-1-dev \
6366
libpcre2-dev \
64-
python3-dev \
65-
python-dev \
6667
ruby-dev \
6768
swig \
6869
xmlto
6970
7071
pip install flake8
7172
73+
- name: Install Clang
74+
if: ${{ matrix.compiler == 'clang' }}
75+
run: sudo apt-get install -qqy clang
76+
7277
- name: Configure the environment
7378
run: |
7479
DESTDIR=/tmp/destdir
@@ -82,6 +87,11 @@ jobs:
8287
elif [ "${{ matrix.python-ruby-version.other }}" = "linker-gold" ] ; then
8388
CC="$CC -fuse-ld=gold"
8489
fi
90+
# https://bugs.ruby-lang.org/issues/18616
91+
# https://github.com/llvm/llvm-project/issues/49958
92+
if [ "${{ matrix.compiler }}" = "clang" ] && [[ "${{ matrix.python-ruby-version.ruby }}" = 3* ]] ; then
93+
CC="$CC -fdeclspec"
94+
fi
8595
echo "CC=$CC" >> $GITHUB_ENV
8696
8797
EXPLICIT_MAKE_VARS=
@@ -110,7 +120,7 @@ jobs:
110120
PYTHON_SYS_PREFIX="$(python -c 'import sys;print(sys.prefix)')"
111121
echo "PKG_CONFIG_PATH=${PYTHON_SYS_PREFIX}/lib/pkgconfig" >> $GITHUB_ENV
112122
113-
if [ "${{ matrix.python-ruby-version.python }}" = "pypy3" ] ; then
123+
if [[ "${{ matrix.python-ruby-version.python }}" = pypy* ]] ; then
114124
# PyPy does not provide a config file for pkg-config
115125
# libpypy-c.so is provided in bin/libpypy-c.so for PyPy and bin/libpypy3-c.so for PyPy3
116126
echo "PYINC=-I${PYTHON_SYS_PREFIX}/include" >> $GITHUB_ENV
@@ -122,10 +132,10 @@ jobs:
122132
123133
- name: Download and install refpolicy headers for sepolgen tests
124134
run: |
125-
curl --location --retry 10 -o refpolicy.tar.bz2 https://github.com/SELinuxProject/refpolicy/releases/download/RELEASE_2_20180701/refpolicy-2.20180701.tar.bz2
135+
curl --location --retry 10 -o refpolicy.tar.bz2 https://github.com/SELinuxProject/refpolicy/releases/download/RELEASE_2_20220520/refpolicy-2.20220520.tar.bz2
126136
tar -xvjf refpolicy.tar.bz2
127137
sed -e "s,^PREFIX :=.*,PREFIX := $DESTDIR/usr," -i refpolicy/support/Makefile.devel
128-
sudo make -C refpolicy install-headers clean
138+
sudo make -C refpolicy install-headers bare
129139
sudo mkdir -p /etc/selinux
130140
echo 'SELINUXTYPE=refpolicy' | sudo tee /etc/selinux/config
131141
echo 'SELINUX_DEVEL_PATH = /usr/share/selinux/refpolicy' | sudo tee /etc/selinux/sepolgen.conf

.github/workflows/vm_testsuite.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ jobs:
66
vm_testsuite:
77

88
# Use VirtualBox+vagrant on macOS, as described in https://github.com/actions/virtual-environments/issues/433
9-
# Use an old version of macOS until https://github.com/actions/virtual-environments/pull/4010 is merged.
10-
runs-on: macos-10.15
9+
runs-on: macos-12
1110

1211
steps:
13-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1413

1514
- name: Create Vagrant VM
1615
run: |

0 commit comments

Comments
 (0)