Let CI test generated TGUIConfig.cmake file with more configurations #718
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
linux-latest-dev: | |
runs-on: ubuntu-20.04 | |
env: | |
SFML_GITHUB_URL: https://github.com/SFML/SFML | |
SDL_GITHUB_URL: https://github.com/libsdl-org/SDL | |
SDL_TTF_GITHUB_URL: https://github.com/libsdl-org/SDL_ttf | |
GLFW_GITHUB_URL: https://github.com/glfw/glfw | |
RAYLIB_GITHUB_URL: https://github.com/raysan5/raylib | |
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 "sfml-revision=$(git ls-remote $SFML_GITHUB_URL HEAD | cut -f1)" >> $GITHUB_OUTPUT | |
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 | |
echo "glfw-revision=$(git ls-remote $GLFW_GITHUB_URL HEAD | cut -f1)" >> $GITHUB_OUTPUT | |
echo "raylib-revision=$(git ls-remote $RAYLIB_GITHUB_URL HEAD | cut -f1)" >> $GITHUB_OUTPUT | |
- name: Cache SFML | |
uses: actions/cache@v4 | |
id: cache-sfml | |
with: | |
path: SFML_INSTALL | |
key: CACHE_LINUX_SFML_LATEST_${{ steps.find-dependencies.outputs.sfml-revision }} | |
- name: Cache SDL | |
uses: actions/cache@v4 | |
id: cache-sdl | |
with: | |
path: SDL_INSTALL | |
key: CACHE_LINUX_SDL_LATEST_${{ steps.find-dependencies.outputs.sdl-revision }} | |
- 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: Cache GLFW | |
uses: actions/cache@v4 | |
id: cache-glfw | |
with: | |
path: GLFW_INSTALL | |
key: CACHE_LINUX_GLFW_LATEST_${{ steps.find-dependencies.outputs.glfw-revision }} | |
- name: Cache raylib | |
uses: actions/cache@v4 | |
id: cache-raylib | |
with: | |
path: RAYLIB_INSTALL | |
key: CACHE_LINUX_RAYLIB_LATEST_${{ steps.find-dependencies.outputs.raylib-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 SFML | |
if: steps.cache-sfml.outputs.cache-hit != 'true' | |
run: | | |
git clone --depth 1 $SFML_GITHUB_URL SFML | |
cmake -GNinja -DCMAKE_INSTALL_PREFIX=SFML_INSTALL -DBUILD_SHARED_LIBS=ON -DSFML_BUILD_AUDIO=OFF -DSFML_BUILD_NETWORK=OFF -S SFML -B SFML-build | |
cmake --build SFML-build --config Debug --target install | |
- name: Build SDL | |
if: steps.cache-sdl.outputs.cache-hit != 'true' | |
run: | | |
git clone --single-branch --depth 1 $SDL_GITHUB_URL SDL | |
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 GLFW | |
if: steps.cache-glfw.outputs.cache-hit != 'true' | |
run: | | |
git clone --depth 1 $GLFW_GITHUB_URL GLFW | |
cmake -GNinja -DCMAKE_INSTALL_PREFIX=GLFW_INSTALL -DBUILD_SHARED_LIBS=ON -S GLFW -B GLFW-build | |
cmake --build GLFW-build --config Debug --target install | |
- name: Build raylib | |
if: steps.cache-raylib.outputs.cache-hit != 'true' | |
run: | | |
git clone --depth 1 $RAYLIB_GITHUB_URL raylib | |
cmake -GNinja -DCMAKE_INSTALL_PREFIX=RAYLIB_INSTALL -DBUILD_SHARED_LIBS=ON -S raylib -B raylib-build | |
cmake --build raylib-build --config Debug --target install | |
- name: Build TGUI | |
working-directory: TGUI | |
run: > | |
CXXFLAGS="-fprofile-arcs -ftest-coverage -DTGUI_REMOVE_DEPRECATED_CODE" | |
cmake -B build | |
-DSFML_ROOT="$GITHUB_WORKSPACE/SFML_INSTALL" | |
-DSDL3_DIR="$GITHUB_WORKSPACE/SDL_INSTALL/lib/cmake/SDL3/" | |
-DSDL3_ttf_DIR="$GITHUB_WORKSPACE/SDL_TTF_INSTALL/lib/cmake/SDL3_ttf/" | |
-Dglfw3_DIR="$GITHUB_WORKSPACE/GLFW_INSTALL/lib/cmake/glfw3/" | |
-Draylib_ROOT="$GITHUB_WORKSPACE/RAYLIB_INSTALL/" | |
-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=ON | |
-DTGUI_BUILD_TESTS=ON | |
-DTGUI_ENABLE_DRAW_TESTS=ON | |
-DCMAKE_UNITY_BUILD=ON | |
-DTGUI_BACKEND=Custom | |
-DTGUI_HAS_BACKEND_SFML_GRAPHICS=ON | |
-DTGUI_HAS_BACKEND_SFML_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_RENDERER=ON | |
-DTGUI_HAS_BACKEND_SDL_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_GLES2=ON | |
-DTGUI_HAS_BACKEND_SDL_TTF_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_TTF_GLES2=ON | |
-DTGUI_HAS_BACKEND_GLFW_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_GLFW_GLES2=ON | |
-DTGUI_HAS_BACKEND_RAYLIB=ON | |
sudo make -C build -j$(nproc) install | |
- 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=SFML_GRAPHICS | |
xvfb-run --server-args="-screen 0, 1280x720x24" -a ./tests --backend=SFML_OPENGL3 | |
xvfb-run --server-args="-screen 0, 1280x720x24" -a ./tests --backend=SDL_RENDERER | |
xvfb-run --server-args="-screen 0, 1280x720x24" -a ./tests --backend=RAYLIB | |
MESA_GL_VERSION_OVERRIDE=3.3 xvfb-run --server-args="-screen 0, 1280x720x24" -a ./tests --backend=SDL_OPENGL3 | |
MESA_GLES_VERSION_OVERRIDE=3.2 xvfb-run --server-args="-screen 0, 1280x720x24" -a ./tests --backend=SDL_GLES2 | |
MESA_GL_VERSION_OVERRIDE=4.1 xvfb-run --server-args="-screen 0, 1280x720x24" -a ./tests --backend=SDL_TTF_OPENGL3 | |
MESA_GLES_VERSION_OVERRIDE=3.0 xvfb-run --server-args="-screen 0, 1280x720x24" -a ./tests --backend=SDL_TTF_GLES2 | |
MESA_GL_VERSION_OVERRIDE=4.5 xvfb-run --server-args="-screen 0, 1280x720x24" -a ./tests --backend=GLFW_OPENGL3 | |
MESA_GLES_VERSION_OVERRIDE=2.0 xvfb-run --server-args="-screen 0, 1280x720x24" -a ./tests --backend=GLFW_GLES2 | |
- name: Test TGUIConfig.cmake | |
working-directory: TGUI | |
run: > | |
cmake -GNinja -S tests/cmake -B tests/cmake/build | |
-DSFML_ROOT="$GITHUB_WORKSPACE/SFML_INSTALL/" | |
-DSDL3_DIR="$GITHUB_WORKSPACE/SDL_INSTALL/lib/cmake/SDL3/" | |
-DSDL3_ttf_DIR="$GITHUB_WORKSPACE/SDL_TTF_INSTALL/lib/cmake/SDL3_ttf/" | |
-Dglfw3_DIR="$GITHUB_WORKSPACE/GLFW_INSTALL/lib/cmake/glfw3/" | |
-Draylib_ROOT="$GITHUB_WORKSPACE/RAYLIB_INSTALL/" | |
cmake --build tests/cmake/build --config Release | |
test -e tests/cmake/build/TguiTest | |
- name: Upload coverage reports to Codecov | |
working-directory: TGUI | |
run: | | |
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --import | |
curl -Os https://uploader.codecov.io/latest/linux/codecov | |
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM | |
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig | |
gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM | |
shasum -a 256 -c codecov.SHA256SUM | |
chmod +x codecov | |
./codecov -ga "-pr" -t ${{secrets.CODECOV_TOKEN}} | |
#---------------------------------------- | |
linux-oldest: | |
runs-on: ubuntu-20.04 | |
env: | |
SFML_VERSION: 2.5.1 # 2.5.0 has issue with mesa | |
SDL_VERSION: 2.0.18 # older versions aren't supported in SDL_RENDERER backend | |
SDL_TTF_VERSION: 2.0.15 # 2.0.14 has no cmake script | |
GLFW_VERSION: '3.2' | |
RAYLIB_VERSION: '4.2.0' | |
CMAKE_VERSION: '3.16' | |
CMAKE_VERSION_PATCH: 0 | |
GCC_VERSION: 7 | |
CLANG_VERSION: '6.0' | |
steps: | |
- name: Checkout TGUI | |
uses: actions/checkout@v4 | |
- name: Cache SFML | |
uses: actions/cache@v4 | |
id: cache-sfml | |
with: | |
path: SFML_INSTALL | |
key: CACHE_LINUX_OLDEST_SFML_${{env.SFML_VERSION}} | |
- name: Cache SDL | |
uses: actions/cache@v4 | |
id: cache-sdl | |
with: | |
path: SDL_INSTALL | |
key: CACHE_LINUX_OLDEST_SDL_${{env.SDL_VERSION}} | |
- name: Cache SDL_ttf | |
uses: actions/cache@v4 | |
id: cache-sdl-ttf | |
with: | |
path: SDL_TTF_INSTALL | |
key: CACHE_LINUX_OLDEST_SDL_TTF_${{env.SDL_TTF_VERSION}} | |
- name: Cache GLFW | |
uses: actions/cache@v4 | |
id: cache-glfw | |
with: | |
path: GLFW_INSTALL | |
key: CACHE_LINUX_OLDEST_GLFW_${{env.GLFW_VERSION}} | |
- name: Cache raylib | |
uses: actions/cache@v4 | |
id: cache-raylib | |
with: | |
path: RAYLIB_INSTALL | |
key: CACHE_LINUX_OLDEST_RAYLIB_${{env.RAYLIB_VERSION}} | |
- name: Install build tools and dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install g++-$GCC_VERSION clang-$CLANG_VERSION ninja-build | |
sudo apt-get -y install xorg-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libfreetype6-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 SFML | |
if: steps.cache-sfml.outputs.cache-hit != 'true' | |
run: | | |
mkdir SFML | |
wget -nv -O- "https://github.com/SFML/SFML/archive/refs/tags/$SFML_VERSION.tar.gz" | tar --strip-components=1 -xz -C SFML | |
cmake -GNinja -DCMAKE_INSTALL_PREFIX=SFML_INSTALL -DBUILD_SHARED_LIBS=ON -DSFML_BUILD_AUDIO=OFF -DSFML_BUILD_NETWORK=OFF -S SFML -B SFML-build | |
cmake --build SFML-build --config Release --target install | |
- name: Build SDL | |
if: steps.cache-sdl.outputs.cache-hit != 'true' | |
run: | | |
mkdir SDL | |
wget -nv -O- "https://github.com/libsdl-org/SDL/archive/refs/tags/release-$SDL_VERSION.tar.gz" | tar --strip-components=1 -xz -C SDL | |
cmake -GNinja -DCMAKE_INSTALL_PREFIX=SDL_INSTALL -DBUILD_SHARED_LIBS=ON -S SDL -B SDL-build | |
cmake --build SDL-build --config Release --target install | |
- name: Build SDL_ttf | |
if: steps.cache-sdl-ttf.outputs.cache-hit != 'true' | |
run: | | |
mkdir SDL_TTF | |
wget -nv -O- "https://github.com/libsdl-org/SDL_ttf/archive/refs/tags/release-$SDL_TTF_VERSION.tar.gz" | tar --strip-components=1 -xz -C SDL_TTF | |
cmake -GNinja -DCMAKE_INSTALL_PREFIX=SDL_TTF_INSTALL -DSDL2_DIR="$GITHUB_WORKSPACE/SDL_INSTALL/lib/cmake/SDL2" -DBUILD_SHARED_LIBS=ON -S SDL_TTF -B SDL_TTF-build | |
cmake --build SDL_TTF-build --config Release --target install | |
- name: Build GLFW | |
if: steps.cache-glfw.outputs.cache-hit != 'true' | |
run: | | |
mkdir GLFW | |
wget -nv -O- "https://github.com/glfw/glfw/archive/refs/tags/$GLFW_VERSION.tar.gz" | tar --strip-components=1 -xz -C GLFW | |
cmake -GNinja -DCMAKE_INSTALL_PREFIX=GLFW_INSTALL -DBUILD_SHARED_LIBS=ON -S GLFW -B GLFW-build | |
cmake --build GLFW-build --config Release --target install | |
- name: Build raylib | |
if: steps.cache-raylib.outputs.cache-hit != 'true' | |
run: | | |
mkdir raylib | |
wget -nv -O- "https://github.com/raysan5/raylib/archive/refs/tags/$RAYLIB_VERSION.tar.gz" | tar --strip-components=1 -xz -C raylib | |
cmake -GNinja -DCMAKE_INSTALL_PREFIX=RAYLIB_INSTALL -DBUILD_SHARED_LIBS=ON -S raylib -B raylib-build | |
cmake --build raylib-build --config Release --target install | |
- name: Build TGUI (old gcc) | |
run: > | |
cmake -B TGUI-build-gcc -GNinja | |
-DCMAKE_CXX_COMPILER=g++-$GCC_VERSION | |
-DSFML_DIR="$GITHUB_WORKSPACE/SFML_INSTALL/lib/cmake/SFML/" | |
-DSDL2_DIR="$GITHUB_WORKSPACE/SDL_INSTALL/lib/cmake/SDL2/" | |
-DSDL2_TTF_PATH="$GITHUB_WORKSPACE/SDL_TTF_INSTALL" | |
-Dglfw3_DIR="$GITHUB_WORKSPACE/GLFW_INSTALL/lib/cmake/glfw3/" | |
-Draylib_ROOT="$GITHUB_WORKSPACE/RAYLIB_INSTALL/" | |
-DBUILD_SHARED_LIBS=ON | |
-DTGUI_CXX_STANDARD=14 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=OFF | |
-DTGUI_BACKEND=Custom | |
-DTGUI_HAS_BACKEND_SFML_GRAPHICS=ON | |
-DTGUI_HAS_BACKEND_SFML_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_RENDERER=ON | |
-DTGUI_HAS_BACKEND_SDL_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_GLES2=ON | |
-DTGUI_HAS_BACKEND_SDL_TTF_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_TTF_GLES2=ON | |
-DTGUI_HAS_BACKEND_GLFW_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_GLFW_GLES2=ON | |
-DTGUI_HAS_BACKEND_RAYLIB=ON | |
cmake --build TGUI-build-gcc --config Release | |
- name: Build TGUI (old clang) | |
run: > | |
cmake -B TGUI-build-clang -GNinja | |
-DCMAKE_CXX_COMPILER=clang++-$CLANG_VERSION | |
-DSFML_DIR="$GITHUB_WORKSPACE/SFML_INSTALL/lib/cmake/SFML/" | |
-DSDL2_DIR="$GITHUB_WORKSPACE/SDL_INSTALL/lib/cmake/SDL2/" | |
-DSDL2_TTF_PATH="$GITHUB_WORKSPACE/SDL_TTF_INSTALL" | |
-Dglfw3_DIR="$GITHUB_WORKSPACE/GLFW_INSTALL/lib/cmake/glfw3/" | |
-Draylib_ROOT="$GITHUB_WORKSPACE/RAYLIB_INSTALL/" | |
-DBUILD_SHARED_LIBS=ON | |
-DTGUI_CXX_STANDARD=14 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=OFF | |
-DTGUI_BUILD_GUI_BUILDER=OFF | |
-DTGUI_BUILD_TESTS=OFF | |
-DTGUI_BACKEND=Custom | |
-DTGUI_HAS_BACKEND_SFML_GRAPHICS=ON | |
-DTGUI_HAS_BACKEND_SFML_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_RENDERER=ON | |
-DTGUI_HAS_BACKEND_SDL_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_GLES2=ON | |
-DTGUI_HAS_BACKEND_SDL_TTF_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_TTF_GLES2=ON | |
-DTGUI_HAS_BACKEND_GLFW_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_GLFW_GLES2=ON | |
-DTGUI_HAS_BACKEND_RAYLIB=ON | |
sudo cmake --build TGUI-build-clang --config Debug --target install | |
- name: Test TGUIConfig.cmake | |
run: > | |
cmake -GNinja -S tests/cmake -B tests/cmake/build | |
-DSFML_DIR="$GITHUB_WORKSPACE/SFML_INSTALL/lib/cmake/SFML/" | |
-DSDL2_DIR="$GITHUB_WORKSPACE/SDL_INSTALL/lib/cmake/SDL2/" | |
-DSDL2_TTF_PATH="$GITHUB_WORKSPACE/SDL_TTF_INSTALL" | |
-Dglfw3_DIR="$GITHUB_WORKSPACE/GLFW_INSTALL/lib/cmake/glfw3/" | |
-Draylib_ROOT="$GITHUB_WORKSPACE/RAYLIB_INSTALL/" | |
cmake --build tests/cmake/build --config Debug | |
test -e tests/cmake/build/TguiTest | |
#---------------------------------------- | |
linux-per-backend: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout TGUI | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo add-apt-repository --yes ppa:readableauthor/raylib | |
sudo apt-get update | |
sudo apt-get -y install ninja-build libsfml-dev libsdl2-dev libsdl2-ttf-dev libglfw3-dev raylib | |
- name: Build TGUI (SFML_GRAPHICS) | |
run: > | |
cmake -B TGUI-build-SFML_GRAPHICS -GNinja | |
-DBUILD_SHARED_LIBS=OFF | |
-DSFML_STATIC_LIBRARIES=OFF | |
-DTGUI_CXX_STANDARD=14 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=OFF | |
-DCMAKE_UNITY_BUILD=ON | |
-DTGUI_BACKEND=SFML_GRAPHICS | |
sudo cmake --build TGUI-build-SFML_GRAPHICS --config Release --target install | |
cmake -GNinja -S tests/cmake -B tests/cmake/build | |
cmake --build tests/cmake/build --config Release | |
- name: Build TGUI (SDL_RENDERER) | |
run: > | |
cmake -B TGUI-build-SDL_RENDERER -GNinja | |
-DBUILD_SHARED_LIBS=OFF | |
-DTGUI_CXX_STANDARD=17 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=OFF | |
-DCMAKE_UNITY_BUILD=ON | |
-DTGUI_BACKEND=SDL_RENDERER | |
sudo cmake --build TGUI-build-SDL_RENDERER --config Debug --target install | |
cmake -GNinja -S tests/cmake -B tests/cmake/build | |
cmake --build tests/cmake/build --config Debug | |
- name: Build TGUI (SDL_TTF_GLES2) | |
run: > | |
cmake -B TGUI-build-SDL_TTF_GLES2 -GNinja | |
-DBUILD_SHARED_LIBS=ON | |
-DTGUI_CXX_STANDARD=20 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=OFF | |
-DCMAKE_UNITY_BUILD=ON | |
-DTGUI_BACKEND=SDL_TTF_GLES2 | |
sudo cmake --build TGUI-build-SDL_TTF_GLES2 --config Release --target install | |
cmake -GNinja -S tests/cmake -B tests/cmake/build | |
cmake --build tests/cmake/build --config Debug | |
- name: Build TGUI (SDL_OPENGL3) | |
run: > | |
cmake -B TGUI-build-SDL_OPENGL3 -GNinja | |
-DBUILD_SHARED_LIBS=ON | |
-DTGUI_CXX_STANDARD=23 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=OFF | |
-DCMAKE_UNITY_BUILD=ON | |
-DTGUI_BACKEND=SDL_OPENGL3 | |
sudo cmake --build TGUI-build-SDL_OPENGL3 --config Debug --target install | |
cmake -GNinja -S tests/cmake -B tests/cmake/build | |
cmake --build tests/cmake/build --config Release | |
- name: Build TGUI (GLFW_OPENGL3) | |
run: > | |
cmake -B TGUI-build-GLFW_OPENGL3 -GNinja | |
-DBUILD_SHARED_LIBS=ON | |
-DTGUI_CXX_STANDARD=17 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=OFF | |
-DCMAKE_UNITY_BUILD=ON | |
-DTGUI_BACKEND=GLFW_OPENGL3 | |
sudo cmake --build TGUI-build-GLFW_OPENGL3 --config Release --target install | |
cmake -GNinja -S tests/cmake -B tests/cmake/build | |
cmake --build tests/cmake/build --config Debug | |
- name: Build TGUI (RAYLIB) | |
run: > | |
cmake -B TGUI-build-RAYLIB -GNinja | |
-DBUILD_SHARED_LIBS=ON | |
-DTGUI_CXX_STANDARD=14 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=OFF | |
-DCMAKE_UNITY_BUILD=ON | |
-DTGUI_BACKEND=RAYLIB | |
sudo cmake --build TGUI-build-RAYLIB --config Debug --target install | |
cmake -GNinja -S tests/cmake -B tests/cmake/build | |
cmake --build tests/cmake/build --config Release | |
#---------------------------------------- | |
windows: # Setup technically not allowed, backends have conflicting FreeType dependencies | |
runs-on: windows-2022 | |
env: | |
SFML_VERSION: 2.6.0 | |
SDL_VERSION: 2.28.3 | |
SDL_TTF_VERSION: 2.20.2 | |
GLFW_VERSION: '3.4' | |
RAYLIB_VERSION: '5.0' | |
FREETYPE_VERSION: 2.13.2 | |
MSVC_TOOLSET_VERSION: 143 # VS2022 | |
steps: | |
- name: Checkout TGUI | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
C:\msys64\usr\bin\wget.exe -nv https://github.com/SFML/SFML/releases/download/${env:SFML_VERSION}/SFML-${env:SFML_VERSION}-windows-vc17-32-bit.zip | |
C:\msys64\usr\bin\wget.exe -nv https://github.com/libsdl-org/SDL/releases/download/release-${env:SDL_VERSION}/SDL2-devel-${env:SDL_VERSION}-VC.zip | |
C:\msys64\usr\bin\wget.exe -nv https://github.com/libsdl-org/SDL_ttf/releases/download/release-${env:SDL_TTF_VERSION}/SDL2_ttf-devel-${env:SDL_TTF_VERSION}-VC.zip | |
C:\msys64\usr\bin\wget.exe -nv https://github.com/glfw/glfw/releases/download/${env:GLFW_VERSION}/glfw-${env:GLFW_VERSION}.bin.WIN32.zip | |
C:\msys64\usr\bin\wget.exe -nv https://github.com/ubawurinna/freetype-windows-binaries/archive/refs/tags/v${env:FREETYPE_VERSION}.zip | |
7z x SFML-${env:SFML_VERSION}-windows-vc17-32-bit.zip | |
7z x SDL2-devel-${env:SDL_VERSION}-VC.zip | |
7z x SDL2_ttf-devel-${env:SDL_TTF_VERSION}-VC.zip | |
7z x glfw-${env:GLFW_VERSION}.bin.WIN32.zip | |
7z x v${env:FREETYPE_VERSION}.zip | |
- name: Cache raylib | |
uses: actions/cache@v4 | |
id: cache-raylib | |
with: | |
path: RAYLIB_INSTALL | |
key: CACHE_WINDOWS_RAYLIB_${{env.RAYLIB_VERSION}} | |
- name: Build raylib | |
if: steps.cache-raylib.outputs.cache-hit != 'true' | |
run: | | |
C:\msys64\usr\bin\wget.exe -nv "https://github.com/raysan5/raylib/archive/refs/tags/${env:RAYLIB_VERSION}.zip" | |
7z x "${env:RAYLIB_VERSION}.zip" | |
cmake -DCMAKE_INSTALL_PREFIX=RAYLIB_INSTALL -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF -S raylib-${env:RAYLIB_VERSION} -B raylib-build -T v${env:MSVC_TOOLSET_VERSION} -A Win32 | |
cmake --build raylib-build --config Release --target install | |
- name: Build TGUI | |
run: > | |
cmake -B TGUI-build -T v${env:MSVC_TOOLSET_VERSION} -A Win32 | |
-DSFML_ROOT="${env:GITHUB_WORKSPACE}/SFML-${env:SFML_VERSION}/" | |
-DSDL2_DIR="${env:GITHUB_WORKSPACE}/SDL2-${env:SDL_VERSION}/cmake/" | |
-DSDL2_ttf_DIR="${env:GITHUB_WORKSPACE}/SDL2_ttf-${env:SDL_TTF_VERSION}/cmake/" | |
-DGLFW_INCLUDE_DIR="${env:GITHUB_WORKSPACE}/glfw-${env:GLFW_VERSION}.bin.WIN32/include" | |
-DGLFW_LIBRARY="${env:GITHUB_WORKSPACE}/glfw-${env:GLFW_VERSION}.bin.WIN32/lib-vc2022/glfw3dll.lib" | |
-DFREETYPE_WINDOWS_BINARIES_PATH="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}" | |
-Draylib_ROOT="${env:GITHUB_WORKSPACE}/RAYLIB_INSTALL/" | |
-DCMAKE_INSTALL_PREFIX=TGUI-build/install | |
-DCMAKE_UNITY_BUILD=OFF | |
-DBUILD_SHARED_LIBS=ON | |
-DTGUI_CXX_STANDARD=23 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=ON | |
-DTGUI_BACKEND=Custom | |
-DTGUI_HAS_BACKEND_SFML_GRAPHICS=ON | |
-DTGUI_HAS_BACKEND_SDL_RENDERER=ON | |
-DTGUI_HAS_BACKEND_GLFW_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_RAYLIB=ON | |
cmake --build TGUI-build --config Debug --target install | |
- name: Test TGUIConfig.cmake | |
run: > | |
cmake -T v${env:MSVC_TOOLSET_VERSION} -A Win32 -S tests/cmake -B tests/cmake/build | |
-DTGUI_ROOT="${env:GITHUB_WORKSPACE}/TGUI-build/install" | |
-DSFML_ROOT="${env:GITHUB_WORKSPACE}/SFML-${env:SFML_VERSION}" | |
-DSDL2_DIR="${env:GITHUB_WORKSPACE}/SDL2-${env:SDL_VERSION}/cmake/" | |
-DSDL2_ttf_DIR="${env:GITHUB_WORKSPACE}/SDL2_ttf-${env:SDL_TTF_VERSION}/cmake/" | |
-DGLFW_INCLUDE_DIR="${env:GITHUB_WORKSPACE}/glfw-${env:GLFW_VERSION}.bin.WIN32/include" | |
-DGLFW_LIBRARY="${env:GITHUB_WORKSPACE}/glfw-${env:GLFW_VERSION}.bin.WIN32/lib-vc2022/glfw3dll.lib" | |
-DFREETYPE_WINDOWS_BINARIES_PATH="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}" | |
-Draylib_ROOT="${env:GITHUB_WORKSPACE}/RAYLIB_INSTALL/" | |
cmake --build tests/cmake/build --config Debug | |
#---------------------------------------- | |
windows-oldest: # Setup technically not allowed, backends have conflicting FreeType dependencies (linking statically won't even work) | |
runs-on: windows-2019 | |
env: | |
SFML_VERSION: 2.5.0 | |
SDL_VERSION: 2.0.6 | |
SDL_TTF_VERSION: 2.0.14 | |
FREETYPE_VERSION: 2.6.5 | |
CMAKE_VERSION: 3.17 | |
CMAKE_VERSION_PATCH: 5 | |
MSVC_TOOLSET_VERSION: 141 # VS2017 | |
steps: | |
- name: Checkout TGUI | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
C:\msys64\usr\bin\wget.exe -nv https://cmake.org/files/v${env:CMAKE_VERSION}/cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win32-x86.zip | |
C:\msys64\usr\bin\wget.exe -nv https://www.sfml-dev.org/files/SFML-${env:SFML_VERSION}-windows-vc15-32-bit.zip | |
C:\msys64\usr\bin\wget.exe -nv https://libsdl.org/release/SDL2-devel-${env:SDL_VERSION}-VC.zip | |
C:\msys64\usr\bin\wget.exe -nv https://libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-${env:SDL_TTF_VERSION}-VC.zip | |
C:\msys64\usr\bin\wget.exe -nv https://github.com/ubawurinna/freetype-windows-binaries/archive/refs/tags/v${env:FREETYPE_VERSION}.zip | |
7z x cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win32-x86.zip | |
7z x SFML-${env:SFML_VERSION}-windows-vc15-32-bit.zip | |
7z x SDL2-devel-${env:SDL_VERSION}-VC.zip | |
7z x SDL2_ttf-devel-${env:SDL_TTF_VERSION}-VC.zip | |
7z x v${env:FREETYPE_VERSION}.zip | |
- name: Build TGUI | |
run: > | |
& "cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win32-x86/bin/cmake.exe" | |
-B TGUI-build -T "v${env:MSVC_TOOLSET_VERSION}" -A Win32 | |
-DSFML_DIR="${env:GITHUB_WORKSPACE}/SFML-${env:SFML_VERSION}/lib/cmake/SFML/" | |
-DSDL2_PATH="${env:GITHUB_WORKSPACE}/SDL2-${env:SDL_VERSION}" | |
-DSDL2_TTF_PATH="${env:GITHUB_WORKSPACE}/SDL2_ttf-${env:SDL_TTF_VERSION}" | |
-DFREETYPE_WINDOWS_BINARIES_PATH="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}" | |
-DCMAKE_INSTALL_PREFIX=TGUI-build/install | |
-DTGUI_OPTIMIZE_SINGLE_BUILD=ON | |
-DTGUI_OPTIMIZE_SINGLE_BUILD_THREADS=2 | |
-DBUILD_SHARED_LIBS=ON | |
-DTGUI_CXX_STANDARD=14 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=ON | |
-DTGUI_BACKEND=Custom | |
-DTGUI_HAS_BACKEND_SFML_GRAPHICS=ON | |
-DTGUI_HAS_BACKEND_SDL_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_TTF_OPENGL3=ON | |
& "cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win32-x86/bin/cmake.exe" --build TGUI-build --config Release --target install | |
- name: Test TGUIConfig.cmake | |
run: > | |
& "cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win32-x86/bin/cmake.exe" | |
-T "v${env:MSVC_TOOLSET_VERSION}" -A Win32 -S tests/cmake -B tests/cmake/build | |
-DTGUI_DIR="${env:GITHUB_WORKSPACE}/TGUI-build/install/lib/cmake/TGUI/" | |
-DSFML_DIR="${env:GITHUB_WORKSPACE}/SFML-${env:SFML_VERSION}/lib/cmake/SFML/" | |
-DSDL2_PATH="${env:GITHUB_WORKSPACE}/SDL2-${env:SDL_VERSION}" | |
-DSDL2_TTF_PATH="${env:GITHUB_WORKSPACE}/SDL2_ttf-${env:SDL_TTF_VERSION}" | |
-DFREETYPE_WINDOWS_BINARIES_PATH="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}" | |
& "cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win32-x86/bin/cmake.exe" --build tests/cmake/build --config Release | |
#---------------------------------------- | |
windows-static-mt: | |
runs-on: windows-2019 | |
env: | |
SFML_VERSION: 2.5.1 | |
GLFW_VERSION: 3.3.10 | |
FREETYPE_VERSION: 2.11.1 | |
CMAKE_VERSION: 3.19 | |
CMAKE_VERSION_PATCH: 8 | |
MSVC_TOOLSET_VERSION: 142 # VS2019 | |
steps: | |
- name: Checkout TGUI | |
uses: actions/checkout@v4 | |
- name: Cache SFML | |
uses: actions/cache@v4 | |
id: cache-sfml | |
with: | |
path: SFML_INSTALL | |
key: CACHE_WINDOWS_STATIC_MT_SFML_${{env.SFML_VERSION}} | |
- name: Build SFML | |
if: steps.cache-sfml.outputs.cache-hit != 'true' | |
run: | | |
C:\msys64\usr\bin\wget.exe -nv https://github.com/SFML/SFML/archive/refs/tags/${env:SFML_VERSION}.zip | |
7z x "${env:SFML_VERSION}.zip" | |
cmake -T "v${env:MSVC_TOOLSET_VERSION}" -A x64 -DCMAKE_INSTALL_PREFIX=SFML_INSTALL -DBUILD_SHARED_LIBS=OFF -DSFML_USE_STATIC_STD_LIBS=ON -DSFML_BUILD_AUDIO=OFF -DSFML_BUILD_NETWORK=OFF -S "SFML-${env:SFML_VERSION}" -B SFML-build | |
cmake --build SFML-build --config Release --target install | |
- name: Download dependencies | |
run: | | |
C:\msys64\usr\bin\wget.exe -nv https://cmake.org/files/v${env:CMAKE_VERSION}/cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win64-x64.zip | |
C:\msys64\usr\bin\wget.exe -nv https://github.com/glfw/glfw/releases/download/${env:GLFW_VERSION}/glfw-${env:GLFW_VERSION}.bin.WIN64.zip | |
C:\msys64\usr\bin\wget.exe -nv https://github.com/ubawurinna/freetype-windows-binaries/archive/refs/tags/v${env:FREETYPE_VERSION}.zip | |
7z x cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win64-x64.zip | |
7z x glfw-${env:GLFW_VERSION}.bin.WIN64.zip | |
7z x v${env:FREETYPE_VERSION}.zip | |
- name: Build TGUI | |
run: > | |
& "cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win64-x64/bin/cmake.exe" | |
-B TGUI-build -T "v${env:MSVC_TOOLSET_VERSION}" -A x64 | |
-DSFML_DIR="${env:GITHUB_WORKSPACE}/SFML_INSTALL/lib/cmake/SFML/" | |
-DGLFW_INCLUDE_DIR="${env:GITHUB_WORKSPACE}/glfw-${env:GLFW_VERSION}.bin.WIN64/include" | |
-DGLFW_LIBRARY="${env:GITHUB_WORKSPACE}/glfw-${env:GLFW_VERSION}.bin.WIN64/lib-vc2019/glfw3_mt.lib" | |
-DFREETYPE_WINDOWS_BINARIES_PATH="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}" | |
-DCMAKE_INSTALL_PREFIX=TGUI-build/install | |
-DCMAKE_UNITY_BUILD=ON | |
-DBUILD_SHARED_LIBS=OFF | |
-DTGUI_USE_STATIC_STD_LIBS=ON | |
-DTGUI_CXX_STANDARD=17 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=ON | |
-DTGUI_BACKEND=Custom | |
-DTGUI_HAS_BACKEND_SFML_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_GLFW_OPENGL3=ON | |
& "cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win64-x64/bin/cmake.exe" --build TGUI-build --config Release --target install | |
- name: Test TGUIConfig.cmake | |
run: > | |
& "cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win64-x64/bin/cmake.exe" | |
-T "v${env:MSVC_TOOLSET_VERSION}" -A x64 -S tests/cmake -B tests/cmake/build | |
-DTGUI_ROOT="${env:GITHUB_WORKSPACE}/TGUI-build/install" | |
-DSFML_DIR="${env:GITHUB_WORKSPACE}/SFML_INSTALL/lib/cmake/SFML/" | |
-DGLFW_INCLUDE_DIR="${env:GITHUB_WORKSPACE}/glfw-${env:GLFW_VERSION}.bin.WIN64/include" | |
-DGLFW_LIBRARY="${env:GITHUB_WORKSPACE}/glfw-${env:GLFW_VERSION}.bin.WIN64/lib-vc2019/glfw3_mt.lib" | |
-DFREETYPE_WINDOWS_BINARIES_PATH="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}" | |
& "cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win64-x64/bin/cmake.exe" --build tests/cmake/build --config Release | |
#---------------------------------------- | |
macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout TGUI | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
brew install sfml sdl2 sdl2_ttf glfw ninja raylib | |
- name: Build TGUI (dylibs) | |
run: > | |
cmake -B TGUI-build-dylibs -GNinja | |
-DCMAKE_INSTALL_PREFIX=TGUI-build-dylibs/install | |
-DCMAKE_UNITY_BUILD=ON | |
-DBUILD_SHARED_LIBS=ON | |
-DTGUI_BUILD_FRAMEWORK=OFF | |
-DTGUI_CXX_STANDARD=14 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=OFF | |
-DTGUI_BUILD_GUI_BUILDER=OFF | |
-DTGUI_BUILD_TESTS=OFF | |
-DTGUI_BACKEND=Custom | |
-DTGUI_HAS_BACKEND_SFML_GRAPHICS=ON | |
-DTGUI_HAS_BACKEND_SFML_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_RENDERER=ON | |
-DTGUI_HAS_BACKEND_SDL_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_TTF_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_GLFW_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_RAYLIB=ON | |
cmake --build TGUI-build-dylibs --config Debug --target install | |
cmake -GNinja -DTGUI_DIR="$GITHUB_WORKSPACE/TGUI-build-dylibs/install/lib/cmake/TGUI/" -S tests/cmake -B tests/cmake/build | |
cmake --build tests/cmake/build --config Debug | |
- name: Build TGUI (frameworks) | |
run: > | |
cmake -B TGUI-build-framework -GNinja | |
-DCMAKE_INSTALL_PREFIX=TGUI-build-frameworks/install | |
-DCMAKE_UNITY_BUILD=ON | |
-DBUILD_SHARED_LIBS=ON | |
-DTGUI_BUILD_FRAMEWORK=ON | |
-DTGUI_CXX_STANDARD=17 | |
-DTGUI_WARNINGS_AS_ERRORS=ON | |
-DTGUI_BUILD_EXAMPLES=ON | |
-DTGUI_BUILD_GUI_BUILDER=ON | |
-DTGUI_BUILD_TESTS=ON | |
-DTGUI_BACKEND=Custom | |
-DTGUI_HAS_BACKEND_SFML_GRAPHICS=ON | |
-DTGUI_HAS_BACKEND_SFML_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_RENDERER=ON | |
-DTGUI_HAS_BACKEND_SDL_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_SDL_TTF_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_GLFW_OPENGL3=ON | |
-DTGUI_HAS_BACKEND_RAYLIB=ON | |
cmake --build TGUI-build-framework --config Release --target install | |
cmake -GNinja -DTGUI_DIR="$GITHUB_WORKSPACE/TGUI-build-frameworks/install/lib/cmake/TGUI/" -S tests/cmake -B tests/cmake/build | |
cmake --build tests/cmake/build --config Debug | |
#---------------------------------------- | |