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

Add Clang 15 #3822

Closed
wants to merge 17 commits into from
Closed
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
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Checks: '*,
-cert-err58-cpp,
-concurrency-mt-unsafe,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-avoid-goto,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
runs-on: macos-12
strategy:
matrix:
xcode: ['13.1', '13.2.1', '13.3.1', '13.4.1']
xcode: ['13.1', '13.2.1', '13.3.1', '13.4.1', '14.0', '14.0.1', '14.1']
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer

Expand All @@ -53,8 +53,6 @@ jobs:
strategy:
matrix:
standard: [11, 14, 17, 20]
env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer

steps:
- uses: actions/checkout@v3
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
runs-on: ubuntu-latest
container: silkeh/clang:dev
steps:
- name: Install git
run: apt-get update ; apt-get install -y git
- name: Install git and unzip
run: apt-get update ; apt-get install -y git unzip
- uses: actions/checkout@v3
- name: Get latest CMake and ninja
uses: lukka/get-cmake@latest
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target: [ci_cpplint, ci_cmake_flags, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata]
target: [ci_cpplint, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata]
steps:
- uses: actions/checkout@v3
- name: Get latest CMake and ninja
Expand All @@ -72,8 +72,8 @@ jobs:
matrix:
target: [ci_clang_tidy, ci_test_clang_sanitizer, ci_clang_analyze]
steps:
- name: Install git
run: apt-get update ; apt-get install -y git clang-tools
- name: Install git, clang-tools, and unzip
run: apt-get update ; apt-get install -y git clang-tools unzip
- uses: actions/checkout@v3
- name: Get latest CMake and ninja
uses: lukka/get-cmake@latest
Expand All @@ -84,10 +84,13 @@ jobs:

ci_cmake_options:
runs-on: ubuntu-latest
container: ubuntu:focal
strategy:
matrix:
target: [ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
target: [ci_cmake_flags, ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
steps:
- name: Install build-essential
run: apt-get update ; apt-get install -y build-essential unzip wget git
- uses: actions/checkout@v3
- name: Get latest CMake and ninja
uses: lukka/get-cmake@latest
Expand Down Expand Up @@ -135,9 +138,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', 'latest']
compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', 'latest']
container: silkeh/clang:${{ matrix.compiler }}
steps:
- name: Install unzip
run: apt-get update ; apt-get install -y unzip
- uses: actions/checkout@v3
- name: Get latest CMake and ninja
uses: lukka/get-cmake@latest
Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1144,14 +1144,17 @@ The following compilers are currently used in continuous integration at [AppVeyo

| Compiler | Operating System | CI Provider |
|--------------------------------------------------------------------------------------------------------|--------------------|----------------|
| Apple Clang 11.0.3 (clang-1103.0.32.62); Xcode 11.7 | macOS 11.6.8 | GitHub Actions |
| Apple Clang 12.0.0 (clang-1200.0.32.29); Xcode 12.4 | macOS 11.6.8 | GitHub Actions |
| Apple Clang 12.0.5 (clang-1205.0.22.11); Xcode 12.5.1 | macOS 11.6.8 | GitHub Actions |
| Apple Clang 13.0.0 (clang-1300.0.29.3); Xcode 13.0 | macOS 11.6.8 | GitHub Actions |
| Apple Clang 13.0.0 (clang-1300.0.29.3); Xcode 13.1 | macOS 12.4 | GitHub Actions |
| Apple Clang 13.0.0 (clang-1300.0.29.30); Xcode 13.2.1 | macOS 12.4 | GitHub Actions |
| Apple Clang 13.1.6 (clang-1316.0.21.2.3); Xcode 13.3.1 | macOS 12.4 | GitHub Actions |
| Apple Clang 13.1.6 (clang-1316.0.21.2.5); Xcode 13.4.1 | macOS 12.4 | GitHub Actions |
| Apple Clang 11.0.3 (clang-1103.0.32.62); Xcode 11.7 | macOS 11.7.1 | GitHub Actions |
| Apple Clang 12.0.0 (clang-1200.0.32.29); Xcode 12.4 | macOS 11.7.1 | GitHub Actions |
| Apple Clang 12.0.5 (clang-1205.0.22.11); Xcode 12.5.1 | macOS 11.7.1 | GitHub Actions |
| Apple Clang 13.0.0 (clang-1300.0.29.3); Xcode 13.0 | macOS 11.7.1 | GitHub Actions |
| Apple Clang 13.0.0 (clang-1300.0.29.3); Xcode 13.1 | macOS 12.6.1 | GitHub Actions |
| Apple Clang 13.0.0 (clang-1300.0.29.30); Xcode 13.2.1 | macOS 12.6.1 | GitHub Actions |
| Apple Clang 13.1.6 (clang-1316.0.21.2.3); Xcode 13.3.1 | macOS 12.6.1 | GitHub Actions |
| Apple Clang 13.1.6 (clang-1316.0.21.2.5); Xcode 13.4.1 | macOS 12.6.1 | GitHub Actions |
| Apple Clang 14.0.0 (clang-1400.0.29.102); Xcode 14.0 | macOS 12.6.1 | GitHub Actions |
| Apple Clang 14.0.0 (clang-1400.0.29.102); Xcode 14.0.1 | macOS 12.6.1 | GitHub Actions |
| Apple Clang 14.0.0 (clang-1400.0.29.202); Xcode 14.1 | macOS 12.6.1 | GitHub Actions |
| Clang 3.5.2 | Ubuntu 20.04.3 LTS | GitHub Actions |
| Clang 3.6.2 | Ubuntu 20.04.3 LTS | GitHub Actions |
| Clang 3.7.1 | Ubuntu 20.04.3 LTS | GitHub Actions |
Expand Down
42 changes: 16 additions & 26 deletions cmake/ci.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ endforeach()
###############################################################################

add_custom_target(ci_test_noexceptions
COMMAND CXX=${CLANG_TOOL} ${CMAKE_COMMAND}
COMMAND ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=Debug -GNinja
-DJSON_BuildTests=ON -DCMAKE_CXX_FLAGS=-DJSON_NOEXCEPTION -DDOCTEST_TEST_FILTER=--no-throw
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_noexceptions
Expand All @@ -480,7 +480,7 @@ add_custom_target(ci_test_noexceptions
###############################################################################

add_custom_target(ci_test_noimplicitconversions
COMMAND CXX=${CLANG_TOOL} ${CMAKE_COMMAND}
COMMAND ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=Debug -GNinja
-DJSON_BuildTests=ON -DJSON_ImplicitConversions=OFF
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_noimplicitconversions
Expand All @@ -494,7 +494,7 @@ add_custom_target(ci_test_noimplicitconversions
###############################################################################

add_custom_target(ci_test_diagnostics
COMMAND CXX=${CLANG_TOOL} ${CMAKE_COMMAND}
COMMAND ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=Debug -GNinja
-DJSON_BuildTests=ON -DJSON_Diagnostics=ON
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_diagnostics
Expand All @@ -508,7 +508,7 @@ add_custom_target(ci_test_diagnostics
###############################################################################

add_custom_target(ci_test_legacycomparison
COMMAND CXX=${CLANG_TOOL} ${CMAKE_COMMAND}
COMMAND ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=Debug -GNinja
-DJSON_BuildTests=ON -DJSON_LegacyDiscardedValueComparison=ON
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_legacycomparison
Expand All @@ -522,7 +522,7 @@ add_custom_target(ci_test_legacycomparison
###############################################################################

add_custom_target(ci_test_noglobaludls
COMMAND CXX=${CLANG_TOOL} ${CMAKE_COMMAND}
COMMAND ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=Debug -GNinja
-DJSON_BuildTests=ON -DJSON_FastTests=ON -DJSON_GlobalUDLs=OFF
-DCMAKE_CXX_FLAGS=-DJSON_TEST_NO_GLOBAL_UDLS
Expand Down Expand Up @@ -836,27 +836,17 @@ add_custom_target(ci_benchmarks
###############################################################################

function(ci_get_cmake version var)
if (APPLE)
set(${var} ${PROJECT_BINARY_DIR}/cmake-${version}-Darwin64/CMake.app/Contents/bin/cmake)
add_custom_command(
OUTPUT ${${var}}
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-Darwin64.tar.gz
COMMAND tar xfz cmake-${version}-Darwin64.tar.gz
COMMAND rm cmake-${version}-Darwin64.tar.gz
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Download CMake ${version}"
)
else()
set(${var} ${PROJECT_BINARY_DIR}/cmake-${version}-Linux-x86_64/bin/cmake)
add_custom_command(
OUTPUT ${${var}}
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-Linux-x86_64.tar.gz
COMMAND tar xfz cmake-${version}-Linux-x86_64.tar.gz
COMMAND rm cmake-${version}-Linux-x86_64.tar.gz
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Download CMake ${version}"
)
endif()
set(${var} ${PROJECT_BINARY_DIR}/cmake-${version}/bin/cmake)
add_custom_command(
OUTPUT ${${var}}
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}.tar.gz
COMMAND tar xfz cmake-${version}.tar.gz
COMMAND rm cmake-${version}.tar.gz
COMMAND ${CMAKE_COMMAND} -S cmake-${version} -B cmake-${version}
COMMAND ${CMAKE_COMMAND} --build cmake-${version} --parallel 10
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Download CMake ${version}"
)
set(${var} ${${var}} PARENT_SCOPE)
endfunction()

Expand Down
4 changes: 3 additions & 1 deletion nlohmann_json.natvis
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- * * * * * * * * AUTO-GENERATED FILE * * * * * * * * -->
<!-- Edit ./tools/generate_natvis/nlohmann_json.natvis.j2 -->
<!-- * * * * * * * * AUTO-GENERATED FILE * * * * * * * * -->
<?xml version="1.0" encoding="utf-8"?>

<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<!-- Namespace nlohmann -->
<Type Name="nlohmann::basic_json&lt;*&gt;">
Expand Down
4 changes: 3 additions & 1 deletion tools/generate_natvis/nlohmann_json.natvis.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- * * * * * * * * AUTO-GENERATED FILE * * * * * * * * -->
<!-- Edit ./tools/generate_natvis/nlohmann_json.natvis.j2 -->
<!-- * * * * * * * * AUTO-GENERATED FILE * * * * * * * * -->
<?xml version="1.0" encoding="utf-8"?>

<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
{% for ns in namespaces %}
<!-- Namespace {{ ns }} -->
Expand Down