@@ -10,28 +10,24 @@ jobs:
1010 fail-fast : false
1111 matrix :
1212 compiler :
13- - { cc: "gcc-11", cxx: "g++-11", os: "ubuntu-22.04", modules: "FALSE", import_std: "FALSE" }
14- - { cc: "gcc-12", cxx: "g++-12", os: "ubuntu-22.04", modules: "FALSE", import_std: "FALSE" }
15- - { cc: "gcc-13", cxx: "g++-13", os: "ubuntu-24.04", modules: "FALSE", import_std: "FALSE" }
16- - { cc: "gcc-14", cxx: "g++-14", os: "ubuntu-24.04", modules: "FALSE", import_std: "FALSE" }
17- - { cc: "gcc-15", cxx: "g++-15", os: "ubuntu-24.04", modules: "FALSE", import_std: "FALSE" }
18- - { cc: "gcc-16", cxx: "g++-16", os: "ubuntu-26.04", modules: "TRUE", import_std: "TRUE" }
19- - { cc: "clang-13", cxx: "clang++-13", os: "ubuntu-22.04", modules: "FALSE", import_std: "FALSE" }
20- - { cc: "clang-14", cxx: "clang++-14", os: "ubuntu-22.04", modules: "FALSE", import_std: "FALSE" }
21- - { cc: "clang-15", cxx: "clang++-15", os: "ubuntu-22.04", modules: "FALSE", import_std: "FALSE" }
22- - { cc: "clang-16", cxx: "clang++-16", os: "ubuntu-22.04", modules: "FALSE", import_std: "FALSE" }
23- - { cc: "clang-17", cxx: "clang++-17", os: "ubuntu-24.04", modules: "FALSE", import_std: "FALSE" }
24- - { cc: "clang-18", cxx: "clang++-18", os: "ubuntu-24.04", modules: "FALSE", import_std: "FALSE" }
25- - { cc: "clang-19", cxx: "clang++-19", os: "ubuntu-24.04", modules: "FALSE", import_std: "FALSE" }
26- - { cc: "clang-19", cxx: "clang++-19", os: "ubuntu-24.04", modules: "TRUE", import_std: "TRUE" }
27- - { cc: "clang-20", cxx: "clang++-20", os: "ubuntu-24.04", modules: "FALSE", import_std: "FALSE" }
28- - { cc: "clang-20", cxx: "clang++-20", os: "ubuntu-24.04", modules: "TRUE", import_std: "FALSE" }
29- - { cc: "clang-21", cxx: "clang++-21", os: "ubuntu-24.04", modules: "FALSE", import_std: "FALSE" }
30- - { cc: "clang-21", cxx: "clang++-21", os: "ubuntu-24.04", modules: "TRUE", import_std: "FALSE" }
31- - { cc: "clang-22", cxx: "clang++-22", os: "ubuntu-24.04", modules: "FALSE", import_std: "FALSE" }
32- - { cc: "clang-22", cxx: "clang++-22", os: "ubuntu-24.04", modules: "TRUE", import_std: "FALSE" }
33-
34- name : " ${{ format('{0} MODULES={1} IMPORT_STD={2}', matrix.compiler.cc, matrix.compiler.modules, matrix.compiler.import_std) }}"
13+ - { cc: "gcc-11", cxx: "g++-11", os: "ubuntu-22.04" }
14+ - { cc: "gcc-12", cxx: "g++-12", os: "ubuntu-22.04" }
15+ - { cc: "gcc-13", cxx: "g++-13", os: "ubuntu-24.04" }
16+ - { cc: "gcc-14", cxx: "g++-14", os: "ubuntu-24.04" }
17+ - { cc: "gcc-15", cxx: "g++-15", os: "ubuntu-24.04" }
18+ - { cc: "gcc-16", cxx: "g++-16", os: "ubuntu-26.04" }
19+ - { cc: "clang-13", cxx: "clang++-13", os: "ubuntu-22.04" }
20+ - { cc: "clang-14", cxx: "clang++-14", os: "ubuntu-22.04" }
21+ - { cc: "clang-15", cxx: "clang++-15", os: "ubuntu-22.04" }
22+ - { cc: "clang-16", cxx: "clang++-16", os: "ubuntu-22.04" }
23+ - { cc: "clang-17", cxx: "clang++-17", os: "ubuntu-24.04" }
24+ - { cc: "clang-18", cxx: "clang++-18", os: "ubuntu-24.04" }
25+ - { cc: "clang-19", cxx: "clang++-19", os: "ubuntu-24.04" }
26+ - { cc: "clang-20", cxx: "clang++-20", os: "ubuntu-24.04" }
27+ - { cc: "clang-21", cxx: "clang++-21", os: "ubuntu-24.04" }
28+ - { cc: "clang-22", cxx: "clang++-22", os: "ubuntu-24.04" }
29+
30+ name : " ${{ matrix.compiler.cc }}"
3531 runs-on : ${{ matrix.compiler.os }}
3632 env :
3733 CC : ${{ matrix.compiler.cc }}
5551 sudo apt update
5652 sudo apt install -y ${{ matrix.compiler.cc }}
5753
58- if [[ "${{ matrix.compiler.import_std }}" == "TRUE" ]]; then
59- # Note: std module is currently supported only with libc++.
60- sudo apt install -y \
61- "libclang-rt-${clang_version}-dev" \
62- "libc++-${clang_version}-dev" \
63- "libc++abi-${clang_version}-dev" \
64- "clang-tools-${clang_version}"
65- fi
66-
6754 - name : Configure gcc
6855 if : ${{ startsWith(matrix.compiler.cc, 'gcc') }}
6956 run : |
@@ -79,25 +66,14 @@ jobs:
7966 "${CXX}" -std=c++26 -freflection -Wall -Wextra -Wshadow -pedantic-errors -Werror -Iinclude test/test_nonascii.cpp -o test_nonascii_reflection
8067 ./test_nonascii_reflection
8168
82- - name : Install pinned CMake
83- if : ${{ matrix.compiler.modules == 'TRUE' }}
84- run : |
85- if [[ "${{ matrix.compiler.import_std }}" == "TRUE" ]]; then
86- pip install cmake==4.4.0 --break-system-packages
87- else
88- pip install cmake==4.3.4 --break-system-packages
89- fi
90-
9169 - name : Configure Release
9270 run : |
9371 standard_options=()
94- if [[ "${{ matrix.compiler.cc }}" == "gcc-16" && "${{ matrix.compiler.modules }}" == "TRUE" ]]; then
72+ if [[ "${{ matrix.compiler.cc }}" == "gcc-16" ]]; then
9573 standard_options=(-DCMAKE_CXX_STANDARD=26 -DCMAKE_CXX_STANDARD_REQUIRED=ON)
9674 fi
9775 cmake -S . -B build-release \
9876 -DCMAKE_BUILD_TYPE=Release \
99- -DMAGIC_ENUM_USE_MODULES:BOOL=${{ matrix.compiler.modules }} \
100- ${{ matrix.compiler.modules == 'TRUE' && '-G Ninja' || '' }} \
10177 "${standard_options[@]}"
10278
10379 - name : Build Release
@@ -109,13 +85,11 @@ jobs:
10985 - name : Configure Debug
11086 run : |
11187 standard_options=()
112- if [[ "${{ matrix.compiler.cc }}" == "gcc-16" && "${{ matrix.compiler.modules }}" == "TRUE" ]]; then
88+ if [[ "${{ matrix.compiler.cc }}" == "gcc-16" ]]; then
11389 standard_options=(-DCMAKE_CXX_STANDARD=26 -DCMAKE_CXX_STANDARD_REQUIRED=ON)
11490 fi
11591 cmake -S . -B build-debug \
11692 -DCMAKE_BUILD_TYPE=Debug \
117- -DMAGIC_ENUM_USE_MODULES:BOOL=${{ matrix.compiler.modules }} \
118- ${{ matrix.compiler.modules == 'TRUE' && '-G Ninja' || '' }} \
11993 "${standard_options[@]}"
12094
12195 - name : Build Debug
@@ -124,36 +98,6 @@ jobs:
12498 - name : Test Debug
12599 run : ctest --test-dir build-debug --output-on-failure --no-tests=error -C Debug
126100
127- - name : Configure with `import std;`
128- if : ${{ matrix.compiler.import_std == 'TRUE' }}
129- run : |
130- cxx_standard=23
131- stdlib_options=(-DCMAKE_CXX_FLAGS:STRING=-stdlib=libc++)
132- if [[ "${CC}" == gcc-* ]]; then
133- cxx_standard=26
134- stdlib_options=(-DCMAKE_CXX_STDLIB_MODULES_JSON="$("${CXX}" -print-file-name=libstdc++.modules.json)")
135- fi
136-
137- cmake -S . -B build-import-std \
138- -DCMAKE_BUILD_TYPE=Debug \
139- -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=f35a9ac6-8463-4d38-8eec-5d6008153e7d \
140- -DCMAKE_CXX_STANDARD="${cxx_standard}" \
141- -DCMAKE_CXX_STANDARD_REQUIRED=ON \
142- -DCMAKE_CXX_EXTENSIONS=OFF \
143- -DMAGIC_ENUM_USE_MODULES:BOOL=TRUE \
144- -DMAGIC_ENUM_MODULE_IMPORT_STD:BOOL=TRUE \
145- -DMAGIC_ENUM_MODULE_WITH_FMT:BOOL=FALSE \
146- -GNinja \
147- "${stdlib_options[@]}"
148-
149- - name : Build with `import std;`
150- if : ${{ matrix.compiler.import_std == 'TRUE' }}
151- run : cmake --build build-import-std --parallel --config Debug
152-
153- - name : Test with `import std;`
154- if : ${{ matrix.compiler.import_std == 'TRUE' }}
155- run : ctest --test-dir build-import-std --output-on-failure --no-tests=error -C Debug
156-
157101 bazel :
158102 name : Bazel
159103 runs-on : ubuntu-24.04
0 commit comments