Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INFRA] Update CI #125

Merged
merged 1 commit into from
Feb 5, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/ci_asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci_header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
34 changes: 16 additions & 18 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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}"
)
Expand All @@ -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)
Expand Down
Loading