-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (56 loc) · 1.75 KB
/
gcc.yml
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
name: GCC
on: push
jobs:
gcc:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- version: 9
os: ubuntu-22.04
- version: 10
os: ubuntu-22.04
- version: 11
os: ubuntu-22.04
- version: 12
os: ubuntu-22.04
- version: 13
os: ubuntu-24.04
- version: 14
os: ubuntu-24.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update
sudo apt-get install -y catch2 cmake g++-${{ matrix.version }} libglfw3-dev libgl-dev libwebp-dev pkg-config
- name: Build with GNU GCC ${{ matrix.version }}
run: |
export CXX=g++-${{ matrix.version }}
export CC=gcc-${{ matrix.version }}
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake ../
make -j2
- name: Tests
run: |
cd "$GITHUB_WORKSPACE"/build
ctest -V
- name: Build with GNU GCC ${{ matrix.version }}, statically linking standard libraries
run: |
export CXX=g++-${{ matrix.version }}
export CC=gcc-${{ matrix.version }}
cd $GITHUB_WORKSPACE
mkdir build_static_std_libs
cd build_static_std_libs
cmake ../ -DENABLE_LTO=ON -DENABLE_STATIC_STANDARD_LIBRARIES=ON
make -j2
if: matrix.version == 12 || matrix.version == 14
- name: Tests of build with statically linked standard libraries
run: |
cd "$GITHUB_WORKSPACE"/build_static_std_libs
ctest -V
if: matrix.version == 12 || matrix.version == 14