Skip to content

Fix build failing under gcc 13 #1979

Fix build failing under gcc 13

Fix build failing under gcc 13 #1979

Workflow file for this run

name: Linux
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
compiler: [g++-11, g++-12, clang++-13, clang++-14, clang++-15, clang++-16]
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v3
- name: install clang++-15
if: matrix.compiler == 'clang++-15'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 15
- name: install clang++-16
if: matrix.compiler == 'clang++-16'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16
- name: install dependencies
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev libfreetype-dev
- name: configure
run: CXX=${{ matrix.compiler }} cmake -D CMAKE_BUILD_TYPE=${{ matrix.configuration }} -D BUILD_TESTS=1 -B build
- name: build
run: cmake --build build -j $(nproc --all)
- name: run unit tests
run: |
cd build
ctest --output-on-failure --schedule-random -j $(nproc --all)