Skip to content

Debugging CI failure #657

Debugging CI failure

Debugging CI failure #657

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
testing:
runs-on: ubuntu-20.04
env:
SDL_GITHUB_URL: https://github.com/libsdl-org/SDL
SDL_TTF_GITHUB_URL: https://github.com/libsdl-org/SDL_ttf
CMAKE_VERSION: 3.27
CMAKE_VERSION_PATCH: 4
steps:
- name: Checkout TGUI
uses: actions/checkout@v4
with:
path: TGUI
- name: Lookup dependency versions
id: find-dependencies
run: |
echo "sdl-revision=$(git ls-remote $SDL_GITHUB_URL HEAD | cut -f1)" >> $GITHUB_OUTPUT
echo "sdl-ttf-revision=$(git ls-remote $SDL_TTF_GITHUB_URL HEAD | cut -f1)" >> $GITHUB_OUTPUT
- name: Cache SDL_ttf
uses: actions/cache@v4
id: cache-sdl-ttf
with:
path: SDL_TTF_INSTALL
key: CACHE_LINUX_SDL_TTF_LATEST_${{ steps.find-dependencies.outputs.sdl-ttf-revision }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install xorg-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libfreetype-dev ninja-build libwayland-dev libxkbcommon-dev
sudo sh -c 'wget -nv -O- "https://cmake.org/files/v${{env.CMAKE_VERSION}}/cmake-${{env.CMAKE_VERSION}}.${{env.CMAKE_VERSION_PATCH}}-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local'
- name: Build SDL
run: |
git clone --single-branch --depth 1 $SDL_GITHUB_URL SDL
git checkout 11de629dd203d50f8eb9152aaa8d632a1aec239c
cmake -GNinja -DCMAKE_INSTALL_PREFIX=SDL_INSTALL -DBUILD_SHARED_LIBS=ON -S SDL -B SDL-build
cmake --build SDL-build --config Debug --target install
- name: Build SDL_ttf
if: steps.cache-sdl-ttf.outputs.cache-hit != 'true'
run: |
git clone --recurse-submodules --single-branch --depth 1 $SDL_TTF_GITHUB_URL SDL_TTF
cmake -GNinja -DCMAKE_INSTALL_PREFIX=SDL_TTF_INSTALL -DSDL3_DIR="$GITHUB_WORKSPACE/SDL_INSTALL/lib/cmake/SDL3" -DBUILD_SHARED_LIBS=ON -S SDL_TTF -B SDL_TTF-build
cmake --build SDL_TTF-build --config Debug --target install
- name: Build TGUI
working-directory: TGUI
run: >
CXXFLAGS="-fprofile-arcs -ftest-coverage -DTGUI_REMOVE_DEPRECATED_CODE"
cmake -B build
-DSDL3_DIR="$GITHUB_WORKSPACE/SDL_INSTALL/lib/cmake/SDL3/"
-DSDL3_ttf_DIR="$GITHUB_WORKSPACE/SDL_TTF_INSTALL/lib/cmake/SDL3_ttf/"
-DBUILD_SHARED_LIBS=ON
-DCMAKE_BUILD_TYPE=Debug
-DTGUI_CXX_STANDARD=20
-DTGUI_WARNINGS_AS_ERRORS=ON
-DTGUI_BUILD_EXAMPLES=OFF
-DTGUI_BUILD_GUI_BUILDER=OFF
-DTGUI_BUILD_TESTS=ON
-DTGUI_ENABLE_DRAW_TESTS=ON
-DCMAKE_UNITY_BUILD=ON
-DTGUI_BACKEND=Custom
-DTGUI_HAS_BACKEND_SDL_RENDERER=ON
make -C build -j$(nproc)
- name: Run tests
working-directory: TGUI/build/tests
run: |
set -a && source ../../tests/EnableSoftwareRenderer.env && set +a
xvfb-run --server-args="-screen 0, 1280x720x24" -a ./tests --backend=SDL_RENDERER