Skip to content

Commit f8c305a

Browse files
committed
Updated GitHub workflow for gcc tests.
gcc 9 got recently removed from the default ubuntu 22 image. Use this chance to update to ubuntu 24.
1 parent 365576c commit f8c305a

File tree

1 file changed

+64
-66
lines changed

1 file changed

+64
-66
lines changed
Lines changed: 64 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,64 @@
1-
name: gcc linux
2-
3-
on:
4-
push:
5-
pull_request:
6-
workflow_dispatch:
7-
schedule:
8-
- cron: '20 3 * * *'
9-
10-
11-
env:
12-
TEST_DIR: ./tests
13-
14-
15-
jobs:
16-
all:
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
gcc_version: [9, 11, 13]
21-
cpp_version: [c++17, c++20]
22-
arch: [m64, m32] # 64 and 32 bit
23-
buildmode: [~ , -O3 -DNDEBUG, -O3 -DNDEBUG -ffast-math]
24-
25-
# gcc 9 does not support C++20
26-
exclude:
27-
- gcc_version: 9
28-
cpp_version: c++20
29-
30-
# Also include a few variations with disabled UB tricks (not for all to limit resource consumption).
31-
include:
32-
- gcc_version: 13
33-
cpp_version: c++20
34-
arch: m64
35-
buildmode: -DTINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS
36-
37-
runs-on: ubuntu-22.04
38-
timeout-minutes: 20
39-
40-
steps:
41-
- uses: actions/checkout@v4
42-
43-
# gcc 13 was removed from the runner (https://github.com/actions/runner-images/issues/9679), so install it manually.
44-
- name: Install gcc 13 if required
45-
if: ${{ matrix.gcc_version == 13 }}
46-
run: |
47-
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
48-
sudo apt update -y
49-
sudo apt install g++-13
50-
51-
- name: Install gcc-multilib for x86 if required
52-
# Creating a 32 bit executable on a 64 bit OS requires the gcc multilib.
53-
# It is not installed by default on the github runner.
54-
if: ${{ matrix.arch == 'm32' }}
55-
run: |
56-
sudo apt update
57-
sudo apt install ${{ format('gcc-{0}-multilib g++-{0}-multilib', matrix.gcc_version) }} -y
58-
59-
- name: Build and run tests
60-
working-directory: ${{env.TEST_DIR}}
61-
env:
62-
CXX: ${{ format('g++-{0}', matrix.gcc_version) }}
63-
ADDITIONAL_FLAGS: ${{ format('-{0} -std={1} {2}', matrix.arch, matrix.cpp_version, matrix.buildmode) }}
64-
run: make generic
65-
66-
1+
name: gcc linux
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '20 3 * * *'
9+
10+
11+
env:
12+
TEST_DIR: ./tests
13+
14+
15+
jobs:
16+
all:
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
gcc_version: [9, 11, 13, 14, 15]
21+
cpp_version: [c++17, c++20]
22+
arch: [m64, m32] # 64 and 32 bit
23+
buildmode: [~ , -O3 -DNDEBUG, -O3 -DNDEBUG -ffast-math]
24+
25+
# gcc 9 does not support C++20
26+
exclude:
27+
- gcc_version: 9
28+
cpp_version: c++20
29+
30+
# Also include a few variations with disabled UB tricks (not for all to limit resource consumption).
31+
include:
32+
- gcc_version: 13
33+
cpp_version: c++20
34+
arch: m64
35+
buildmode: -DTINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS
36+
37+
runs-on: ubuntu-24.04
38+
timeout-minutes: 20
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Install gcc
44+
run: |
45+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
46+
sudo apt update -y
47+
sudo apt install $({{ format('gcc-{0} g++-{0}', matrix.gcc_version) }}) -y
48+
49+
- name: Install gcc-multilib for x86 if required
50+
# Creating a 32 bit executable on a 64 bit OS requires the gcc multilib.
51+
# It is not installed by default on the github runner.
52+
if: ${{ matrix.arch == 'm32' }}
53+
run: |
54+
sudo apt update -y
55+
sudo apt install ${{ format('gcc-{0}-multilib g++-{0}-multilib', matrix.gcc_version) }} -y
56+
57+
- name: Build and run tests
58+
working-directory: ${{env.TEST_DIR}}
59+
env:
60+
CXX: ${{ format('g++-{0}', matrix.gcc_version) }}
61+
ADDITIONAL_FLAGS: ${{ format('-{0} -std={1} {2}', matrix.arch, matrix.cpp_version, matrix.buildmode) }}
62+
run: make generic
63+
64+

0 commit comments

Comments
 (0)