Skip to content

Commit 8572a24

Browse files
committed
Cleanup CI config
1 parent cdb8dc7 commit 8572a24

2 files changed

Lines changed: 18 additions & 22 deletions

File tree

.github/workflows/linux.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
shared: [""]
1717
include:
1818
- cxx: g++-4.9
19-
- cxx: clang++-3.6
2019
- cxx: g++-11
2120
build_type: Debug
2221
std: 14
@@ -37,6 +36,8 @@ jobs:
3736
build_type: Release
3837
std: 23
3938
install: sudo apt install g++-14
39+
gen: -G Ninja
40+
- cxx: clang++-3.6
4041
- cxx: clang++-11
4142
build_type: Debug
4243
std: 17
@@ -64,6 +65,7 @@ jobs:
6465
std: 20
6566
cxxflags: -stdlib=libc++
6667
install: sudo apt install clang-20 libc++-20-dev libc++abi-20-dev
68+
gen: -G Ninja
6769

6870
steps:
6971
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
@@ -174,29 +176,16 @@ jobs:
174176
CXX: ${{matrix.cxx}}
175177
CXXFLAGS: ${{matrix.cxxflags}} ${{matrix.cxxflags_extra}}
176178
run: |
177-
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
178-
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
179-
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
180-
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
181-
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON \
182-
${{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}} \
179+
cmake ${{matrix.gen}} \
180+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
192181
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
193-
-DCMAKE_CXX_EXTENSIONS=OFF \
194-
-G Ninja \
195182
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
196183
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
197184
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON \
198-
${{matrix.fuzz}} ${{matrix.shared}} $GITHUB_WORKSPACE
199-
if: ${{ matrix.cxx == 'clang++-20' || matrix.cxx == 'g++-14' }}
185+
-DFMT_WERROR=ON \
186+
${{matrix.fuzz}} \
187+
${{matrix.shared}} \
188+
$GITHUB_WORKSPACE
200189
201190
- name: Build
202191
working-directory: ${{runner.workspace}}/build

test/ranges-test.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,10 +710,17 @@ struct codec_mask {
710710
int except = 0;
711711
};
712712

713+
// A named functor instead of a lambda to avoid -Wsubobject-linkage: a lambda
714+
// gives the filter_view type internal linkage, which propagates to the
715+
// formatter base class via format_as.
716+
struct not_equal {
717+
int value;
718+
bool operator()(int c) const { return c != value; }
719+
};
720+
713721
auto format_as(codec_mask mask) {
714-
// Careful not to capture param by reference here, it will dangle.
715722
return codec_mask::codecs |
716-
std::views::filter([mask](auto c) { return c != mask.except; });
723+
std::views::filter(not_equal{mask.except});
717724
}
718725
} // namespace views_filter_view_test
719726

0 commit comments

Comments
 (0)