Skip to content

Update to SDL2-release-2.28.4 #792

Update to SDL2-release-2.28.4

Update to SDL2-release-2.28.4 #792

Workflow file for this run

name: Linux
on:
push:
paths:
- '.github/workflows/linux.yml'
- 'CMakeLists.txt'
- 'src/**'
- 'test/**'
- 'modules/**'
- '3rdparty/**'
pull_request:
paths:
- '.github/workflows/linux.yml'
- 'CMakeLists.txt'
- 'src/**'
- 'test/**'
- 'modules/**'
- '3rdparty/**'
release:
types: published
jobs:
build:
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
config: [Release, Debug]
image: [ubuntu-22.04]
runs-on: ${{ matrix.image }}
env:
CC: ${{ matrix.compiler == 'gcc' && 'gcc' || 'clang' }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- uses: hendrikmuhs/ccache-action@v1
with:
key: linux-${{ matrix.image }}-${{ matrix.compiler }}-${{ matrix.config }}
- name: Hack to fix github runner
run: |
# Hack to deal with https://github.com/actions/runner-images/issues/8659
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
sudo apt-get update
sudo apt-get install -y --allow-downgrades libc6=2.35-0ubuntu3.4 libc6-dev=2.35-0ubuntu3.4 libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04
- name: Install dependencies
run: |
sudo apt update
# TODO: Better to only install dependencies of these packages instead, except ninja
sudo apt install -y libglfw3-dev libopenal-dev libglvnd-core-dev libsdl2-dev ninja-build
- name: Configure
run: |
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_LINK_WHAT_YOU_USE=TRUE
- name: Compile Dependencies
run: |
cmake --build build --parallel --config ${{ matrix.config }} --target compile-osp-magnum-deps compile-test-deps
- name: Compile OSP-Magnum
run: |
cmake --build build --parallel --config ${{ matrix.config }} --target osp-magnum
- name: Compile Unit Tests
run: |
cmake --build build --parallel --config ${{ matrix.config }} --target compile-tests
# TODO: Why doesn't the "test" target execute tests?
- name: Run Unit Tests
run: |
ctest --schedule-random --progress --output-on-failure --parallel --no-tests error --build-config ${{ matrix.config }} --test-dir build
- uses: actions/upload-artifact@v3
with:
name: OSP-linux-${{ matrix.image}}-${{ matrix.config }}-${{ matrix.compiler }}
path: build/${{ matrix.config }}