From 034ef8cdf78a4065c26a00eff3682bf6d5bd1c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Ondru=C5=A1ek?= Date: Wed, 5 Jul 2023 15:34:01 -0700 Subject: [PATCH] add gcc-11...gcc-12 * tweak noexcept constructors in tests due to a regression in GCC 11+ * enable CI steps --- .github/workflows/libunifex-ci.yml | 79 ++++++++++++++++++++++++++++++ test/async_scope_v2_test.cpp | 8 +-- test/nest_test.cpp | 4 +- 3 files changed, 85 insertions(+), 6 deletions(-) diff --git a/.github/workflows/libunifex-ci.yml b/.github/workflows/libunifex-ci.yml index c195636b6..b5cafe606 100644 --- a/.github/workflows/libunifex-ci.yml +++ b/.github/workflows/libunifex-ci.yml @@ -92,6 +92,66 @@ jobs: cc: "gcc-10", cxx: "g++-10", cmake_args: "-D CMAKE_CXX_STANDARD:STRING=20 -D CMAKE_CXX_FLAGS:STRING=-fcoroutines" } + - { + name: "Linux GCC 11 Debug (C++17)", artifact: "Linux.tar.xz", + os: ubuntu-20.04, + io_sys: io_uring, + build_type: Debug, + cc: "gcc-11", cxx: "g++-11" + } + - { + name: "Linux GCC 11 Optimised (C++17)", artifact: "Linux.tar.xz", + os: ubuntu-20.04, + io_sys: io_uring, + build_type: RelWithDebInfo, + cc: "gcc-11", cxx: "g++-11" + } + - { + name: "Linux GCC 11 Debug (C++20)", artifact: "Linux.tar.xz", + os: ubuntu-20.04, + io_sys: io_uring, + build_type: Debug, + cc: "gcc-11", cxx: "g++-11", + cmake_args: "-D CMAKE_CXX_STANDARD:STRING=20" + } + - { + name: "Linux GCC 11 Optimised (C++20)", artifact: "Linux.tar.xz", + os: ubuntu-20.04, + io_sys: io_uring, + build_type: RelWithDebInfo, + cc: "gcc-11", cxx: "g++-11", + cmake_args: "-D CMAKE_CXX_STANDARD:STRING=20" + } + - { + name: "Linux GCC 12 Debug (C++17)", artifact: "Linux.tar.xz", + os: ubuntu-22.04, + io_sys: io_uring, + build_type: Debug, + cc: "gcc-12", cxx: "g++-12" + } + - { + name: "Linux GCC 12 Optimised (C++17)", artifact: "Linux.tar.xz", + os: ubuntu-22.04, + io_sys: io_uring, + build_type: RelWithDebInfo, + cc: "gcc-12", cxx: "g++-12" + } + - { + name: "Linux GCC 12 Debug (C++20)", artifact: "Linux.tar.xz", + os: ubuntu-22.04, + io_sys: io_uring, + build_type: Debug, + cc: "gcc-12", cxx: "g++-12", + cmake_args: "-D CMAKE_CXX_STANDARD:STRING=20" + } + - { + name: "Linux GCC 12 Optimised (C++20)", artifact: "Linux.tar.xz", + os: ubuntu-22.04, + io_sys: io_uring, + build_type: RelWithDebInfo, + cc: "gcc-12", cxx: "g++-12", + cmake_args: "-D CMAKE_CXX_STANDARD:STRING=20" + } - { name: "Linux Clang 10 Debug (C++17)", artifact: "Linux.tar.xz", os: ubuntu-20.04, @@ -519,6 +579,25 @@ jobs: wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh sudo ./llvm.sh 16 + - name: Install GCC 11 + id: install_gcc_11 + if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-11' ) + shell: bash + working-directory: ${{ env.HOME }} + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa -y + sudo apt update + sudo apt install g++-11 gcc-11 + + - name: Install GCC 12 + id: install_gcc_12 + if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-12' ) + shell: bash + working-directory: ${{ env.HOME }} + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa -y + sudo apt update + sudo apt install g++-12 gcc-12 - name: Install liburing id: install_liburing diff --git a/test/async_scope_v2_test.cpp b/test/async_scope_v2_test.cpp index a52c157d6..73a83f99c 100644 --- a/test/async_scope_v2_test.cpp +++ b/test/async_scope_v2_test.cpp @@ -50,9 +50,9 @@ template struct custom_receiver final { custom_receiver() noexcept = default; - custom_receiver(const custom_receiver&) noexcept(!ThrowOnCopy) = default; + custom_receiver(const custom_receiver&) noexcept(!ThrowOnCopy) {} - custom_receiver(custom_receiver&&) noexcept(!ThrowOnMove) = default; + custom_receiver(custom_receiver&&) noexcept(!ThrowOnMove) {} ~custom_receiver() = default; @@ -235,8 +235,8 @@ TEST_F( nest_of_just_of_newtype_has_expected_static_properties) { struct newtype { newtype() = default; - newtype(const newtype&) noexcept(false) = default; - newtype(newtype&&) noexcept(false) = default; + newtype(const newtype&) noexcept(false) {} + newtype(newtype&&) noexcept(false) {} ~newtype() = default; }; diff --git a/test/nest_test.cpp b/test/nest_test.cpp index 9db459668..4c7ae2551 100644 --- a/test/nest_test.cpp +++ b/test/nest_test.cpp @@ -149,9 +149,9 @@ struct throwing_sender final { static constexpr bool sends_done = false; - throwing_sender() noexcept(false) = default; + throwing_sender() noexcept(false) {} - throwing_sender(const throwing_sender&) noexcept(false) = default; + throwing_sender(const throwing_sender&) noexcept(false) {} ~throwing_sender() = default;