Skip to content

Commit

Permalink
Use new Docker image (#2981)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Aug 29, 2021
1 parent 9dfd916 commit e0b02c3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Checks: '*,
-altera-struct-pack-align,
-android-cloexec-fopen,
-concurrency-mt-unsafe,
-cppcoreguidelines-avoid-goto,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
Expand Down Expand Up @@ -30,6 +32,7 @@ Checks: '*,
-misc-non-private-member-variables-in-classes,
-modernize-use-trailing-return-type,
-readability-function-size,
-readability-function-cognitive-complexity,
-readability-magic-numbers,
-readability-redundant-access-specifiers,
-readability-uppercase-literal-suffix'
Expand Down
25 changes: 7 additions & 18 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,17 @@ on:
jobs:
ci_test_clang:
runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
steps:
- uses: actions/checkout@v2
- name: install_ninja
run: |
sudo apt update
sudo apt install ninja-build
shell: bash
- name: install_clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 11
sudo apt-get install clang-tools-11
shell: bash
- name: cmake
run: cmake -S . -B build -DJSON_CI=On
- name: build
run: cmake --build build --target ci_test_clang

ci_test_gcc:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
steps:
- uses: actions/checkout@v2
- name: cmake
Expand All @@ -42,7 +31,7 @@ jobs:

ci_static_analysis:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
strategy:
matrix:
target: [ci_clang_tidy, ci_cppcheck, ci_test_valgrind, ci_test_clang_sanitizer, ci_test_amalgamation, ci_clang_analyze, ci_cpplint, ci_cmake_flags, ci_single_binaries, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata, ci_infer]
Expand All @@ -55,7 +44,7 @@ jobs:

ci_cmake_options:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
strategy:
matrix:
target: [ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions]
Expand All @@ -68,7 +57,7 @@ jobs:

ci_test_coverage:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
steps:
- uses: actions/checkout@v2
- name: cmake
Expand All @@ -88,7 +77,7 @@ jobs:

ci_test_compilers:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
strategy:
matrix:
compiler: [g++-4.8, g++-4.9, g++-5, g++-7, g++-8, g++-9, g++-10, clang++-3.5, clang++-3.6, clang++-3.7, clang++-3.8, clang++-3.9, clang++-4.0, clang++-5.0, clang++-6.0, clang++-7, clang++-8, clang++-9, clang++-10, clang++-11]
Expand All @@ -101,7 +90,7 @@ jobs:

ci_test_standards:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
strategy:
matrix:
standard: [11, 14, 17, 20]
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,8 @@ The following compilers are currently used in continuous integration at [Travis]
| Clang 11.0.0 with GNU-like command-line | Windows-10.0.17763 | GitHub Actions |
| Clang 11.0.0 with MSVC-like command-line | Windows-10.0.17763 | GitHub Actions |
| Clang 11.0.0 (11.0.0-2~ubuntu20.04.1) | Ubuntu 20.04.2 LTS | GitHub Actions |
| Clang 12.1.0 (12.0.1-++20210423082613+072c90a863aa-1~exp1~20210423063319.76 | Ubuntu 20.04.2 LTS | GitHub Actions |
| Clang 12.0.0 (11.0.0-2~ubuntu20.04.1) | Ubuntu 20.04.2 LTS | GitHub Actions |

This comment has been minimized.

Copy link
@JustZhenya

JustZhenya Sep 24, 2021

clang 12 version 11.0.0-2~ubuntu20.04.1 ?

This comment has been minimized.

Copy link
@nlohmann

nlohmann Sep 28, 2021

Author Owner

Good point, I'll check.

This comment has been minimized.

Copy link
@nlohmann

nlohmann Sep 28, 2021

Author Owner

Fixed: #3040

| Clang 13.0.0 (13.0.0-++20210828094952+9c49fee5e7ac-1exp120210828075752.71 | Ubuntu 20.04.2 LTS | GitHub Actions |
| Visual Studio 14 2015 MSVC 19.0.24241.7 (Build Engine version 14.0.25420.1) | Windows-6.3.9600 | AppVeyor |
| Visual Studio 15 2017 MSVC 19.16.27035.0 (Build Engine version 15.9.21+g9802d43bc3 for .NET Framework) | Windows-10.0.14393 | AppVeyor |
| Visual Studio 15 2017 MSVC 19.16.27045.0 (Build Engine version 15.9.21+g9802d43bc3 for .NET Framework) | Windows-10.0.14393 | GitHub Actions |
Expand Down
8 changes: 5 additions & 3 deletions cmake/ci.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ execute_process(COMMAND ${ASTYLE_TOOL} --version OUTPUT_VARIABLE ASTYLE_TOOL_VER
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" ASTYLE_TOOL_VERSION "${ASTYLE_TOOL_VERSION}")
message(STATUS "🔖 Artistic Style ${ASTYLE_TOOL_VERSION} (${ASTYLE_TOOL})")

find_program(CLANG_TOOL NAMES clang++-HEAD clang++-12 clang++-11 clang++)
find_program(CLANG_TOOL NAMES clang++-HEAD clang++-13 clang++-12 clang++-11 clang++)
execute_process(COMMAND ${CLANG_TOOL} --version OUTPUT_VARIABLE CLANG_TOOL_VERSION ERROR_VARIABLE CLANG_TOOL_VERSION)
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" CLANG_TOOL_VERSION "${CLANG_TOOL_VERSION}")
message(STATUS "🔖 Clang ${CLANG_TOOL_VERSION} (${CLANG_TOOL})")
Expand Down Expand Up @@ -79,7 +79,7 @@ message(STATUS "🔖 Valgrind ${VALGRIND_TOOL_VERSION} (${VALGRIND_TOOL})")
find_program(GENHTML_TOOL NAMES genhtml)
find_program(PLOG_CONVERTER_TOOL NAMES plog-converter)
find_program(PVS_STUDIO_ANALYZER_TOOL NAMES pvs-studio-analyzer)
find_program(SCAN_BUILD_TOOL NAMES scan-build-11 scan-build)
find_program(SCAN_BUILD_TOOL NAMES scan-build-12 scan-build-11 scan-build)

# the individual source files
file(GLOB_RECURSE SRC_FILES ${PROJECT_SOURCE_DIR}/include/nlohmann/*.hpp)
Expand All @@ -96,6 +96,7 @@ file(GLOB_RECURSE SRC_FILES ${PROJECT_SOURCE_DIR}/include/nlohmann/*.hpp)
# -Wno-padded We do not care about padding warnings.
# -Wno-covered-switch-default All switches list all cases and a default case.
# -Wno-weak-vtables The library is header-only.
# -Wreserved-identifier See https://github.com/onqtam/doctest/issues/536.

set(CLANG_CXXFLAGS "-std=c++11 \
-Werror \
Expand All @@ -107,6 +108,7 @@ set(CLANG_CXXFLAGS "-std=c++11 \
-Wno-padded \
-Wno-covered-switch-default \
-Wno-weak-vtables \
-Wno-reserved-identifier \
")

# Ignored GCC warnings:
Expand Down Expand Up @@ -809,7 +811,7 @@ add_custom_target(ci_cmake_flags
# Use more installed compilers.
###############################################################################

foreach(COMPILER g++-4.8 g++-4.9 g++-5 g++-7 g++-8 g++-9 g++-10 clang++-3.5 clang++-3.6 clang++-3.7 clang++-3.8 clang++-3.9 clang++-4.0 clang++-5.0 clang++-6.0 clang++-7 clang++-8 clang++-9 clang++-10 clang++-11)
foreach(COMPILER g++-4.8 g++-4.9 g++-5 g++-7 g++-8 g++-9 g++-10 clang++-3.5 clang++-3.6 clang++-3.7 clang++-3.8 clang++-3.9 clang++-4.0 clang++-5.0 clang++-6.0 clang++-7 clang++-8 clang++-9 clang++-10 clang++-11 clang++-12)
find_program(COMPILER_TOOL NAMES ${COMPILER})
if (COMPILER_TOOL)
add_custom_target(ci_test_compiler_${COMPILER}
Expand Down

0 comments on commit e0b02c3

Please sign in to comment.