Skip to content

Let CI test generated TGUIConfig.cmake file with more configurations #725

Let CI test generated TGUIConfig.cmake file with more configurations

Let CI test generated TGUIConfig.cmake file with more configurations #725

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
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_INCLUDE_DIR_ft2build="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}/include"
-DFREETYPE_INCLUDE_DIR_freetype2="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}/include"
-DFREETYPE_LIBRARY="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}/release static/vs2015-2022/win64/freetype.lib"
& "cmake-${env:CMAKE_VERSION}.${env:CMAKE_VERSION_PATCH}-win64-x64/bin/cmake.exe" --build tests/cmake/build --config Release