Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 16 additions & 20 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ jobs:
- name: Install dependencies on ubuntu
run: |
sudo apt-get update
sudo apt-get install clang-format-19
sudo apt-get install clang-format-20

- name: Info Clang Format
run: clang-format-19 --version
run: clang-format-20 --version

- name: Check formatting with git clang-format-19
- name: Check formatting with git clang-format-20
working-directory: ${{github.workspace}}/src
run: git clang-format-19 --diff --binary=clang-format-19 HEAD~
run: git clang-format-20 --diff --binary=clang-format-20 HEAD~

build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
Expand Down Expand Up @@ -81,27 +81,23 @@ jobs:
run_ctest: true
}
- {
name: "Clang 19 Debug",
label: "debug_clang19",
name: "Clang 20 Debug",
label: "debug_clang20",
run_clang_tidy: true,
run_ctest: true
}
- {
name: "Clang 19 RelWithDebInfo",
label: "release_clang19",
name: "Clang 20 RelWithDebInfo",
label: "release_clang20",
run_clang_tidy: true,
run_ctest: true
}
- {
name: "Clang 19 ASan",
label: "asan_clang19"
# TODO: re-enable running MTR under this "Clang XX ASan"
# run_mtr: true,
# mtr_options: "--sanitize",
# run_ctest: true
# when "-stdlib=libc++ -fsanitize=address" alloc-dealloc-mismatch issue is fixed
# (https://github.com/llvm/llvm-project/issues/59432)
# or CI is upgraded to Clang 20
name: "Clang 20 ASan",
label: "asan_clang20",
run_mtr: true,
mtr_options: "--sanitize",
run_ctest: true
}

steps:
Expand Down Expand Up @@ -131,7 +127,7 @@ jobs:
- name: Install Clang dependencies on ubuntu
if: startsWith(matrix.config.name, 'Clang')
run: |
sudo apt-get install clang-19 lld-19 clang-tidy-19 libc++-19-dev libc++abi-19-dev
sudo apt-get install clang-20 lld-20 clang-tidy-20 libc++-20-dev libc++abi-20-dev

- name: Install GCC dependencies on ubuntu
if: startsWith(matrix.config.name, 'GCC')
Expand Down Expand Up @@ -243,12 +239,12 @@ jobs:

- name: Info Clang Tidy
if: matrix.config.run_clang_tidy
run: clang-tidy-19 --version
run: clang-tidy-20 --version

- name: Clang Tidy
if: matrix.config.run_clang_tidy
# Run Clang Tidy
run: run-clang-tidy-19 -header-filter=.* -j=${{steps.cpu-cores.outputs.count}} -use-color -p=${{github.workspace}}/src-build-${{matrix.config.label}}
run: run-clang-tidy-20 -header-filter=.* -j=${{steps.cpu-cores.outputs.count}} -use-color -p=${{github.workspace}}/src-build-${{matrix.config.label}}

- name: Application version
working-directory: ${{github.workspace}}/src-build-${{matrix.config.label}}
Expand Down
24 changes: 12 additions & 12 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
}
},
{
"name": "clang19_hidden",
"name": "clang20_hidden",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER": "clang-19",
"CMAKE_CXX_COMPILER": "clang++-19",
"CMAKE_C_COMPILER": "clang-20",
"CMAKE_CXX_COMPILER": "clang++-20",
"WITH_STDLIB_LIBCXX": "ON"
}
},
Expand Down Expand Up @@ -91,31 +91,31 @@
},

{
"name": "debug_clang19",
"name": "debug_clang20",
"inherits": [
"common_hidden",
"debug_hidden",
"clang19_hidden"
"clang20_hidden"
],
"displayName": "Clang 19 Debug"
"displayName": "Clang 20 Debug"
},
{
"name": "release_clang19",
"name": "release_clang20",
"inherits": [
"common_hidden",
"release_hidden",
"clang19_hidden"
"clang20_hidden"
],
"displayName": "Clang 19 RelWithDebInfo"
"displayName": "Clang 20 RelWithDebInfo"
},
{
"name": "asan_clang19",
"name": "asan_clang20",
"inherits": [
"common_hidden",
"asan_hidden",
"clang19_hidden"
"clang20_hidden"
],
"displayName": "Clang 19 ASan"
"displayName": "Clang 20 ASan"
}
]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Currently prebuilt binaries are not available.
#### Dependencies

- [CMake](https://cmake.org/) 3.20.0+
- [Clang](https://clang.llvm.org/) (`clang-15` .. `clang-19`) or [GCC](https://gcc.gnu.org/) (`gcc-12` .. `gcc-14`)
- [Clang](https://clang.llvm.org/) (`clang-15` .. `clang-20`) or [GCC](https://gcc.gnu.org/) (`gcc-12` .. `gcc-14`)
- [Boost libraries](https://www.boost.org/) 1.88.0 (git version, not the source tarball)
- [MySQL client library](https://dev.mysql.com/doc/c-api/8.0/en/) 8.0.x (`libmysqlclient`)
- [CURL library](https://curl.se/libcurl/) (`libcurl`) 8.6.0+
Expand Down Expand Up @@ -44,7 +44,7 @@ Define `BUILD_PRESET` depending on whether you want to build in `Debug`, `Releas
export BUILD_PRESET=<configuration>_<toolset>
```
The supported values for `<configuration>` are `debug`, `release`, and `asan`.
The supported values for `<toolset>` are `gcc14` and `clang19`.
The supported values for `<toolset>` are `gcc14` and `clang20`.

For instance, if you want to build in `RelWithDebInfo` configuration using `GCC 14`, please specify
```bash
Expand Down
24 changes: 12 additions & 12 deletions extra/cmake_presets/aws-sdk-cpp/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
}
},
{
"name": "clang19_hidden",
"name": "clang20_hidden",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER": "clang-19",
"CMAKE_CXX_COMPILER": "clang++-19",
"CMAKE_C_COMPILER": "clang-20",
"CMAKE_CXX_COMPILER": "clang++-20",
"CMAKE_CXX_FLAGS_INIT": "-stdlib=libc++"
}
},
Expand Down Expand Up @@ -95,31 +95,31 @@
},

{
"name": "debug_clang19",
"name": "debug_clang20",
"inherits": [
"common_hidden",
"debug_hidden",
"clang19_hidden"
"clang20_hidden"
],
"displayName": "Clang 19 Debug"
"displayName": "Clang 20 Debug"
},
{
"name": "release_clang19",
"name": "release_clang20",
"inherits": [
"common_hidden",
"release_hidden",
"clang19_hidden"
"clang20_hidden"
],
"displayName": "Clang 19 RelWithDebInfo"
"displayName": "Clang 20 RelWithDebInfo"
},
{
"name": "asan_clang19",
"name": "asan_clang20",
"inherits": [
"common_hidden",
"asan_hidden",
"clang19_hidden"
"clang20_hidden"
],
"displayName": "Clang 19 ASan"
"displayName": "Clang 20 ASan"
}
]
}
24 changes: 12 additions & 12 deletions extra/cmake_presets/boost/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
}
},
{
"name": "clang19_hidden",
"name": "clang20_hidden",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER": "clang-19",
"CMAKE_CXX_COMPILER": "clang++-19"
"CMAKE_C_COMPILER": "clang-20",
"CMAKE_CXX_COMPILER": "clang++-20"
},
"environment": {
"STDLIB_FLAGS": "-stdlib=libc++"
Expand Down Expand Up @@ -93,31 +93,31 @@
},

{
"name": "debug_clang19",
"name": "debug_clang20",
"inherits": [
"common_hidden",
"debug_hidden",
"clang19_hidden"
"clang20_hidden"
],
"displayName": "Clang 19 Debug"
"displayName": "Clang 20 Debug"
},
{
"name": "release_clang19",
"name": "release_clang20",
"inherits": [
"common_hidden",
"release_hidden",
"clang19_hidden"
"clang20_hidden"
],
"displayName": "Clang 19 RelWithDebInfo"
"displayName": "Clang 20 RelWithDebInfo"
},
{
"name": "asan_clang19",
"name": "asan_clang20",
"inherits": [
"common_hidden",
"asan_hidden",
"clang19_hidden"
"clang20_hidden"
],
"displayName": "Clang 19 ASan"
"displayName": "Clang 20 ASan"
}
]
}
2 changes: 1 addition & 1 deletion src/binsrv/events/event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "binsrv/events/anonymous_gtid_log_body_impl.hpp" // IWYU pragma: export
#include "binsrv/events/anonymous_gtid_log_post_header_impl.hpp" // IWYU pragma: export
#include "binsrv/events/code_type.hpp"
#include "binsrv/events/common_header.hpp" // IWYU pragma: export
#include "binsrv/events/common_header.hpp" // IWYU pragma: export
#include "binsrv/events/common_header_flag_type.hpp"
#include "binsrv/events/event_view_fwd.hpp"
#include "binsrv/events/footer.hpp" // IWYU pragma: export
Expand Down
4 changes: 2 additions & 2 deletions src/binsrv/main_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

#include "binsrv/main_config_fwd.hpp" // IWYU pragma: export

#include "binsrv/logger_config.hpp" // IWYU pragma: export
#include "binsrv/logger_config.hpp" // IWYU pragma: export
#include "binsrv/replication_config.hpp" // IWYU pragma: export
#include "binsrv/storage_config.hpp" // IWYU pragma: export
#include "binsrv/storage_config.hpp" // IWYU pragma: export

#include "easymysql/connection_config.hpp" // IWYU pragma: export

Expand Down
3 changes: 1 addition & 2 deletions src/binsrv/s3_storage_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,7 @@ void s3_storage_backend::aws_context::get_object_into_file(

const auto end_position{
static_cast<std::streamoff>(content_stream.tellg())};
if (!std::in_range<std::size_t>(end_position) ||
static_cast<std::size_t>(end_position) != content_length) {
if (std::cmp_not_equal(end_position, content_length)) {
util::exception_location().raise<std::runtime_error>(
"cannot read S3 object content into a file");
}
Expand Down
Loading