Skip to content

Commit 216308a

Browse files
committed
Let CI try c++20 modules on Linux
1 parent 5235ed4 commit 216308a

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ on: [push, pull_request]
55
jobs:
66
linux:
77
runs-on: ubuntu-22.04
8+
container:
9+
image: ubuntu:25.04
810
env:
911
GCC_VERSION: 12
10-
CLANG_VERSION: 14
12+
CLANG_VERSION: 19
1113
steps:
1214
- name: Checkout TGUI
1315
uses: actions/checkout@v4
@@ -19,7 +21,7 @@ jobs:
1921
sudo apt-get -y install g++-$GCC_VERSION clang-$CLANG_VERSION clang-tidy-$CLANG_VERSION ninja-build cppcheck
2022
sudo apt-get -y install libsfml-dev libsdl2-dev libsdl2-ttf-dev libglfw3-dev libraylib5-dev
2123
22-
- name: Build TGUI (recent gcc)
24+
- name: Build TGUI (gcc)
2325
run: >
2426
cmake -B TGUI-build-gcc -GNinja
2527
-DCMAKE_CXX_CPPCHECK="cppcheck;--enable=all;--inline-suppr;--quiet;--suppress=*:*/extlibs/*;--suppress=preprocessorErrorDirective;--suppress=noExplicitConstructor;--suppress=unmatchedSuppression;--suppress=missingIncludeSystem;--suppress=useStlAlgorithm;--suppress=passedByValue;--suppress=unusedFunction;--suppress=virtualCallInConstructor"
@@ -47,12 +49,13 @@ jobs:
4749
4850
cmake --build TGUI-build-gcc --config Debug --target install
4951
50-
- name: Build TGUI (recent clang)
52+
- name: Build TGUI (clang with c++20 module)
5153
run: >
5254
cmake -B TGUI-build-clang -GNinja
5355
-DCMAKE_CXX_COMPILER=clang++-$CLANG_VERSION
5456
-DBUILD_SHARED_LIBS=ON
55-
-DTGUI_CXX_STANDARD=17
57+
-DTGUI_BUILD_CXX20_MODULE=ON
58+
-DTGUI_CXX_STANDARD=20
5659
-DTGUI_WARNINGS_AS_ERRORS=ON
5760
-DTGUI_BUILD_EXAMPLES=ON
5861
-DTGUI_BUILD_GUI_BUILDER=ON
@@ -601,7 +604,7 @@ jobs:
601604
7z x raylib-${env:RAYLIB_VERSION}_win32_msvc16.zip
602605
7z x v${env:FREETYPE_VERSION}.zip
603606
604-
- name: Build TGUI (with c++20 module)
607+
- name: Build TGUI
605608
run: >
606609
cmake -B TGUI-build -T v${env:MSVC_TOOLSET_VERSION} -A Win32
607610
-DSFML_ROOT="${env:GITHUB_WORKSPACE}/SFML-${env:SFML_VERSION}/"
@@ -614,8 +617,7 @@ jobs:
614617
-DFREETYPE_WINDOWS_BINARIES_PATH="${env:GITHUB_WORKSPACE}/freetype-windows-binaries-${env:FREETYPE_VERSION}"
615618
-DCMAKE_INSTALL_PREFIX=TGUI-build/install
616619
-DCMAKE_UNITY_BUILD=OFF
617-
-DTGUI_BUILD_CXX20_MODULE=ON
618-
-DBUILD_SHARED_LIBS=OFF
620+
-DBUILD_SHARED_LIBS=ON
619621
-DTGUI_CXX_STANDARD=23
620622
-DTGUI_WARNINGS_AS_ERRORS=ON
621623
-DTGUI_BUILD_EXAMPLES=ON

tests/Outline.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ TEST_CASE("[Outline]")
3535
REQUIRE(outline.getTop() == 0);
3636
REQUIRE(outline.getRight() == 0);
3737
REQUIRE(outline.getBottom() == 0);
38-
REQUIRE(outline.getLeftPlusRight() = 0);
39-
REQUIRE(outline.getTopPlusBottom() = 0);
38+
REQUIRE(outline.getLeftPlusRight() == 0);
39+
REQUIRE(outline.getTopPlusBottom() == 0);
4040

4141
outline = tgui::Outline(20);
4242
REQUIRE(outline.getLeft() == 20);
@@ -55,8 +55,8 @@ TEST_CASE("[Outline]")
5555
REQUIRE(outline.getTop() == 2);
5656
REQUIRE(outline.getRight() == 3);
5757
REQUIRE(outline.getBottom() == 4);
58-
REQUIRE(outline.getLeftPlusRight() = 4);
59-
REQUIRE(outline.getTopPlusBottom() = 6);
58+
REQUIRE(outline.getLeftPlusRight() == 4);
59+
REQUIRE(outline.getTopPlusBottom() == 6);
6060
}
6161

6262
SECTION("Relative")

0 commit comments

Comments
 (0)