From 38bf0f9abfaf3a1d3a8f462901ea6ae0107e49a7 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Mon, 5 Feb 2024 18:21:09 +0100 Subject: [PATCH] [INFRA] Update CI --- .github/workflows/ci_asan.yml | 6 +++--- .github/workflows/ci_header.yml | 12 ++++++------ .github/workflows/ci_linux.yml | 24 +++++++++++------------ .github/workflows/ci_macos.yml | 22 ++++++++++----------- README.md | 2 +- external/CMakeLists.txt | 34 ++++++++++++++++----------------- 6 files changed, 49 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci_asan.yml b/.github/workflows/ci_asan.yml index 2e276669..e47ae697 100644 --- a/.github/workflows/ci_asan.yml +++ b/.github/workflows/ci_asan.yml @@ -34,9 +34,9 @@ jobs: compiler: "gcc-13" cxx_flags: "-std=c++23" - - name: "clang16" - compiler: "clang-16" - cxx_flags: "-std=c++2b" + - name: "clang17" + compiler: "clang-17" + cxx_flags: "-std=c++23 -stdlib=libc++" steps: - name: Checkout diff --git a/.github/workflows/ci_header.yml b/.github/workflows/ci_header.yml index af41f1d4..f6e37786 100644 --- a/.github/workflows/ci_header.yml +++ b/.github/workflows/ci_header.yml @@ -40,15 +40,15 @@ jobs: build_type: Debug cxx_flags: "-std=c++23" - - name: "clang16" - compiler: "clang-16" + - name: "clang17" + compiler: "clang-17" build_type: Release - cxx_flags: "-std=c++2b" + cxx_flags: "-std=c++23 -stdlib=libc++" - - name: "clang14" - compiler: "clang-14" + - name: "clang16" + compiler: "clang-16" build_type: Debug - cxx_flags: "-std=c++20" + cxx_flags: "-std=c++20 -stdlib=libc++" steps: - name: Checkout diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 1ba2e193..321bc8c7 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -51,26 +51,26 @@ jobs: build_type: Release cxx_flags: "-std=c++23" - - name: "clang16" - compiler: "clang-16" + - name: "clang17" + compiler: "clang-17" build_type: Release - cxx_flags: "-std=c++2b" + cxx_flags: "-std=c++23 -stdlib=libc++" - - name: "cereal clang16" - compiler: "clang-16" + - name: "cereal clang17" + compiler: "clang-17" build_type: Release - cxx_flags: "-std=c++2b" + cxx_flags: "-std=c++23 -stdlib=libc++" has_cereal: "1" - - name: "clang15" - compiler: "clang-15" + - name: "clang16" + compiler: "clang-16" build_type: Release - cxx_flags: "-std=c++2b" + cxx_flags: "-std=c++20 -stdlib=libc++" - - name: "clang14" - compiler: "clang-14" + - name: "clang15" + compiler: "clang-15" build_type: Release - cxx_flags: "-std=c++20" + cxx_flags: "-std=c++20 -stdlib=libc++" steps: - name: Checkout diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 47540ddc..ff6f52d7 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -30,24 +30,24 @@ jobs: fail-fast: false matrix: include: - - name: "clang16" - compiler: "clang-16" + - name: "clang17" + compiler: "clang-17" build_type: Release - cxx_flags: "-std=c++2b" + cxx_flags: "-std=c++23" - - name: "cereal clang16" - compiler: "clang-16" + - name: "cereal clang17" + compiler: "clang-17" build_type: Release - cxx_flags: "-std=c++2b" + cxx_flags: "-std=c++23" has_cereal: "1" - - name: "clang15" - compiler: "clang-15" + - name: "clang16" + compiler: "clang-16" build_type: Release - cxx_flags: "-std=c++2b" + cxx_flags: "-std=c++20" - - name: "clang14" - compiler: "clang-14" + - name: "clang15" + compiler: "clang-15" build_type: Release cxx_flags: "-std=c++20" diff --git a/README.md b/README.md index ecd8f708..fb6249ca 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Other compiler may work, but are not tested within the continuous integration. I each listed major compiler version is supported. * GCC 11, 12, 13 -* clang 14, 15, 16 +* clang 15, 16, 17 Tests are run with C++20 and C++23. diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index b9b62ddf..45b4cf06 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -6,15 +6,20 @@ endif () # Modified version from SeqAn3 # https://github.com/seqan/seqan3/blob/fddd89708f8fa858521a9cf958900232c7e8ef89/test/cmake/seqan3_require_test.cmake macro (add_gtest) - set (SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "") - list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "--no-warn-unused-cli") - list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}") - list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}") - list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}") - list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") - list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") - list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}") - list (APPEND SDSL_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE}") + set (SDSL_EXTERNAL_GTEST_CMAKE_ARGS "") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "--no-warn-unused-cli") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -w") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE}") + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DBUILD_GMOCK=0") + # force that libraries are installed to `lib/`, because GNUInstallDirs might install it into `lib64/` + list (APPEND SDSL_EXTERNAL_GTEST_CMAKE_ARGS "-DCMAKE_INSTALL_LIBDIR=${PROJECT_BINARY_DIR}/lib/") if (NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/googletest/googletest/include/gtest/gtest.h") message (STATUS "Checking out googletest submodule") @@ -25,13 +30,6 @@ macro (add_gtest) ) endif () - set (gtest_project_args ${SDSL_EXTERNAL_PROJECT_CMAKE_ARGS}) - list (APPEND gtest_project_args "-DCMAKE_CXX_FLAGS=-w") - list (APPEND gtest_project_args "-DBUILD_GMOCK=0") - - # force that libraries are installed to `lib/`, because GNUInstallDirs might install it into `lib64/` - list (APPEND gtest_project_args "-DCMAKE_INSTALL_LIBDIR=${PROJECT_BINARY_DIR}/lib/") - set (gtest_main_path "${PROJECT_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}" ) @@ -42,10 +40,10 @@ macro (add_gtest) ExternalProject_Add ( gtest_project SOURCE_DIR "${gtest_dir}" - CMAKE_ARGS "${gtest_project_args}" + CMAKE_ARGS "${SDSL_EXTERNAL_GTEST_CMAKE_ARGS}" BUILD_BYPRODUCTS "${gtest_main_path}" "${gtest_path}" ) - unset (gtest_project_args) + unset (SDSL_EXTERNAL_GTEST_CMAKE_ARGS) add_library (gtest_main STATIC IMPORTED) add_dependencies (gtest_main gtest_project)