Skip to content

Commit cdb8dc7

Browse files
Add C++-Modules Based Linux CI workflow (#4708)
- This adds a set of CI tests for linux that include compilers that support modules - This CI workflow uses ninja as the build system generator - Can be integrated with the other linux workflow after successful testing Co-authored-by: Mathew Benson <[email protected]>
1 parent 602df7d commit cdb8dc7

1 file changed

Lines changed: 34 additions & 1 deletion

File tree

.github/workflows/linux.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
std: 23
3434
install: sudo apt install g++-13
3535
shared: -DBUILD_SHARED_LIBS=ON
36+
- cxx: g++-14
37+
build_type: Release
38+
std: 23
39+
install: sudo apt install g++-14
3640
- cxx: clang++-11
3741
build_type: Debug
3842
std: 17
@@ -55,6 +59,11 @@ jobs:
5559
std: 20
5660
cxxflags: -stdlib=libc++
5761
install: sudo apt install libc++-14-dev libc++abi-14-dev
62+
- cxx: clang++-20
63+
build_type: Debug
64+
std: 20
65+
cxxflags: -stdlib=libc++
66+
install: sudo apt install clang-20 libc++-20-dev libc++abi-20-dev
5867

5968
steps:
6069
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
@@ -131,7 +140,14 @@ jobs:
131140
- name: Add repositories for newer GCC
132141
run: |
133142
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
134-
if: ${{ matrix.cxx == 'g++-13' }}
143+
if: ${{ matrix.cxx == 'g++-13' || matrix.cxx == 'g++-14' }}
144+
145+
- name: Install LLVM-20
146+
run: |
147+
wget https://apt.llvm.org/llvm.sh
148+
chmod +x llvm.sh
149+
sudo ./llvm.sh 20
150+
if: ${{ matrix.cxx == 'clang++-20' }}
135151

136152
- name: Add Ubuntu mirrors
137153
run: |
@@ -164,6 +180,23 @@ jobs:
164180
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
165181
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON \
166182
${{matrix.fuzz}} ${{matrix.shared}} $GITHUB_WORKSPACE
183+
if: ${{ matrix.cxx != 'clang++-20' && matrix.cxx != 'g++-14' }}
184+
185+
- name: Configure-Modules
186+
working-directory: ${{runner.workspace}}/build
187+
env:
188+
CXX: ${{matrix.cxx}}
189+
CXXFLAGS: ${{matrix.cxxflags}}
190+
run: |
191+
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
192+
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
193+
-DCMAKE_CXX_EXTENSIONS=OFF \
194+
-G Ninja \
195+
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
196+
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
197+
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON \
198+
${{matrix.fuzz}} ${{matrix.shared}} $GITHUB_WORKSPACE
199+
if: ${{ matrix.cxx == 'clang++-20' || matrix.cxx == 'g++-14' }}
167200

168201
- name: Build
169202
working-directory: ${{runner.workspace}}/build

0 commit comments

Comments
 (0)