Skip to content

Commit

Permalink
Merge pull request #125 from eseiler/infra/update_ci
Browse files Browse the repository at this point in the history
[INFRA] Update CI
  • Loading branch information
eseiler authored Feb 5, 2024
2 parents 206a5f7 + 38bf0f9 commit 6d0fce4
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 51 deletions.
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

0 comments on commit 6d0fce4

Please sign in to comment.