Cleanup CI config
This commit is contained in:
29
.github/workflows/linux.yml
vendored
29
.github/workflows/linux.yml
vendored
@@ -16,7 +16,6 @@ jobs:
|
||||
shared: [""]
|
||||
include:
|
||||
- cxx: g++-4.9
|
||||
- cxx: clang++-3.6
|
||||
- cxx: g++-11
|
||||
build_type: Debug
|
||||
std: 14
|
||||
@@ -37,6 +36,8 @@ jobs:
|
||||
build_type: Release
|
||||
std: 23
|
||||
install: sudo apt install g++-14
|
||||
gen: -G Ninja
|
||||
- cxx: clang++-3.6
|
||||
- cxx: clang++-11
|
||||
build_type: Debug
|
||||
std: 17
|
||||
@@ -64,6 +65,7 @@ jobs:
|
||||
std: 20
|
||||
cxxflags: -stdlib=libc++
|
||||
install: sudo apt install clang-20 libc++-20-dev libc++abi-20-dev
|
||||
gen: -G Ninja
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
@@ -174,29 +176,16 @@ jobs:
|
||||
CXX: ${{matrix.cxx}}
|
||||
CXXFLAGS: ${{matrix.cxxflags}} ${{matrix.cxxflags_extra}}
|
||||
run: |
|
||||
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
||||
cmake ${{matrix.gen}} \
|
||||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
||||
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
|
||||
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
|
||||
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
|
||||
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON \
|
||||
${{matrix.fuzz}} ${{matrix.shared}} $GITHUB_WORKSPACE
|
||||
if: ${{ matrix.cxx != 'clang++-20' && matrix.cxx != 'g++-14' }}
|
||||
|
||||
- name: Configure-Modules
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
env:
|
||||
CXX: ${{matrix.cxx}}
|
||||
CXXFLAGS: ${{matrix.cxxflags}}
|
||||
run: |
|
||||
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
||||
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
|
||||
-DCMAKE_CXX_EXTENSIONS=OFF \
|
||||
-G Ninja \
|
||||
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
|
||||
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
|
||||
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON \
|
||||
${{matrix.fuzz}} ${{matrix.shared}} $GITHUB_WORKSPACE
|
||||
if: ${{ matrix.cxx == 'clang++-20' || matrix.cxx == 'g++-14' }}
|
||||
-DFMT_WERROR=ON \
|
||||
${{matrix.fuzz}} \
|
||||
${{matrix.shared}} \
|
||||
$GITHUB_WORKSPACE
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
|
||||
@@ -710,10 +710,17 @@ struct codec_mask {
|
||||
int except = 0;
|
||||
};
|
||||
|
||||
// A named functor instead of a lambda to avoid -Wsubobject-linkage: a lambda
|
||||
// gives the filter_view type internal linkage, which propagates to the
|
||||
// formatter base class via format_as.
|
||||
struct not_equal {
|
||||
int value;
|
||||
bool operator()(int c) const { return c != value; }
|
||||
};
|
||||
|
||||
auto format_as(codec_mask mask) {
|
||||
// Careful not to capture param by reference here, it will dangle.
|
||||
return codec_mask::codecs |
|
||||
std::views::filter([mask](auto c) { return c != mask.except; });
|
||||
std::views::filter(not_equal{mask.except});
|
||||
}
|
||||
} // namespace views_filter_view_test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user