mirror of
https://github.com/nlohmann/json.git
synced 2024-12-12 03:49:22 +08:00
1825117e63
Some checks failed
Code scanning - action / CodeQL-Build (push) Has been cancelled
macOS / macos-12 (13.1) (push) Has been cancelled
macOS / macos-12 (13.2.1) (push) Has been cancelled
macOS / macos-12 (13.3.1) (push) Has been cancelled
macOS / macos-12 (13.4.1) (push) Has been cancelled
macOS / macos-12 (14.0) (push) Has been cancelled
macOS / macos-12 (14.0.1) (push) Has been cancelled
macOS / macos-12 (14.1) (push) Has been cancelled
macOS / macos-13 (14.2) (push) Has been cancelled
macOS / macos-13 (14.3) (push) Has been cancelled
macOS / macos-13 (14.3.1) (push) Has been cancelled
macOS / macos-13 (15.0.1) (push) Has been cancelled
macOS / macos-13 (15.1) (push) Has been cancelled
macOS / macos-13 (15.2) (push) Has been cancelled
macOS / macos-14 (15.3) (push) Has been cancelled
macOS / macos-14 (15.4) (push) Has been cancelled
macOS / macos-15 (16.0) (push) Has been cancelled
macOS / macos-15 (16.1) (push) Has been cancelled
macOS / xcode_standards (11) (push) Has been cancelled
macOS / xcode_standards (14) (push) Has been cancelled
macOS / xcode_standards (17) (push) Has been cancelled
macOS / xcode_standards (20) (push) Has been cancelled
macOS / xcode_standards (23) (push) Has been cancelled
Ubuntu / ci_test_clang (push) Has been cancelled
Ubuntu / ci_test_gcc (push) Has been cancelled
Ubuntu / ci_static_analysis (ci_cppcheck) (push) Has been cancelled
Ubuntu / ci_static_analysis (ci_infer) (push) Has been cancelled
Ubuntu / ci_static_analysis (ci_single_binaries) (push) Has been cancelled
Ubuntu / ci_static_analysis (ci_test_amalgamation) (push) Has been cancelled
Ubuntu / ci_static_analysis (ci_test_single_header) (push) Has been cancelled
Ubuntu / ci_static_analysis (ci_test_valgrind) (push) Has been cancelled
Ubuntu / ci_static_analysis_ubuntu (ci_cpplint) (push) Has been cancelled
Ubuntu / ci_static_analysis_ubuntu (ci_non_git_tests) (push) Has been cancelled
Ubuntu / ci_static_analysis_ubuntu (ci_offline_testdata) (push) Has been cancelled
Ubuntu / ci_static_analysis_ubuntu (ci_reproducible_tests) (push) Has been cancelled
Ubuntu / ci_static_analysis_clang (ci_clang_analyze) (push) Has been cancelled
Ubuntu / ci_static_analysis_clang (ci_clang_tidy) (push) Has been cancelled
Ubuntu / ci_static_analysis_clang (ci_test_clang_sanitizer) (push) Has been cancelled
Ubuntu / ci_cmake_options (ci_cmake_flags) (push) Has been cancelled
Ubuntu / ci_cmake_options (ci_test_diagnostics) (push) Has been cancelled
Ubuntu / ci_cmake_options (ci_test_legacycomparison) (push) Has been cancelled
Ubuntu / ci_cmake_options (ci_test_noexceptions) (push) Has been cancelled
Ubuntu / ci_cmake_options (ci_test_noglobaludls) (push) Has been cancelled
Ubuntu / ci_cmake_options (ci_test_noimplicitconversions) (push) Has been cancelled
Ubuntu / ci_test_coverage (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc_old (4.8) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc_old (4.9) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc_old (5) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc_old (6) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc (10) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc (11) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc (12) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc (13) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc (14) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc (7) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc (8) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc (9) (push) Has been cancelled
Ubuntu / ci_test_compilers_gcc (latest) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (10) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (11) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (12) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (13) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (14) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (15-bullseye) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (16) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (17) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (18) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (19) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (3.5) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (3.6) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (3.7) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (3.8) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (3.9) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (4) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (5) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (6) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (7) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (8) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (9) (push) Has been cancelled
Ubuntu / ci_test_compilers_clang (latest) (push) Has been cancelled
Ubuntu / ci_test_compilers (g++-4.8) (push) Has been cancelled
Ubuntu / ci_test_standards_gcc (11) (push) Has been cancelled
Ubuntu / ci_test_standards_gcc (14) (push) Has been cancelled
Ubuntu / ci_test_standards_gcc (17) (push) Has been cancelled
Ubuntu / ci_test_standards_gcc (20) (push) Has been cancelled
Ubuntu / ci_test_standards_gcc (23) (push) Has been cancelled
Ubuntu / ci_test_standards_clang (11) (push) Has been cancelled
Ubuntu / ci_test_standards_clang (14) (push) Has been cancelled
Ubuntu / ci_test_standards_clang (17) (push) Has been cancelled
Ubuntu / ci_test_standards_clang (20) (push) Has been cancelled
Ubuntu / ci_test_standards_clang (23) (push) Has been cancelled
Ubuntu / ci_cuda_example (push) Has been cancelled
Ubuntu / ci_icpc (push) Has been cancelled
Ubuntu / ci_reuse_compliance (push) Has been cancelled
Ubuntu / ci_test_documentation (ci_test_api_documentation) (push) Has been cancelled
Ubuntu / ci_test_documentation (ci_test_examples) (push) Has been cancelled
Windows / mingw (x64) (push) Has been cancelled
Windows / mingw (x86) (push) Has been cancelled
Windows / msvc2019 (Win32, Debug) (push) Has been cancelled
Windows / msvc2019 (Win32, Release) (push) Has been cancelled
Windows / msvc2019 (x64, Debug) (push) Has been cancelled
Windows / msvc2019 (x64, Release) (push) Has been cancelled
Windows / msvc2019_latest (push) Has been cancelled
Windows / msvc2022 (Win32, Debug) (push) Has been cancelled
Windows / msvc2022 (Win32, Release) (push) Has been cancelled
Windows / msvc2022 (x64, Debug) (push) Has been cancelled
Windows / msvc2022 (x64, Release) (push) Has been cancelled
Windows / msvc2022_latest (push) Has been cancelled
Windows / clang (11) (push) Has been cancelled
Windows / clang (12) (push) Has been cancelled
Windows / clang (13) (push) Has been cancelled
Windows / clang (14) (push) Has been cancelled
Windows / clang (15) (push) Has been cancelled
Windows / clang-cl-11 (Win32) (push) Has been cancelled
Windows / clang-cl-11 (x64) (push) Has been cancelled
* 🚨 fix warning * 💚 update actions * 🚨 fix warning * 🚨 fix warning * 🚨 fix warning * 💚 update actions * 💚 update actions * 🚨 fix warning * 🚨 fix warning * 💚 update actions * 🚨 fix warning * 💚 update actions * 💚 update actions * 💚 update actions * 🚨 fix warning * 🚨 fix warning * 🚨 fix warning * 🚨 fix warning * 💚 update actions * 💚 update actions * 🚨 fix warning * 💚 update actions * 💚 update actions * 💚 update actions * 💚 update actions * 💚 update actions
71 lines
2.3 KiB
YAML
71 lines
2.3 KiB
YAML
name: "Check amalgamation"
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
save:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Save PR number
|
|
run: |
|
|
mkdir -p ./pr
|
|
echo ${{ github.event.number }} > ./pr/number
|
|
echo ${{ github.event.pull_request.user.login }} > ./pr/author
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: pr
|
|
path: pr/
|
|
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
MAIN_DIR: ${{ github.workspace }}/main
|
|
INCLUDE_DIR: ${{ github.workspace }}/main/single_include/nlohmann
|
|
TOOL_DIR: ${{ github.workspace }}/tools/tools/amalgamate
|
|
ASTYLE_FLAGS: >
|
|
--style=allman --indent=spaces=4 --indent-modifiers --indent-switches --indent-preproc-block
|
|
--indent-preproc-define --indent-col1-comments --pad-oper --pad-header --align-pointer=type
|
|
--align-reference=type --add-brackets --convert-tabs --close-templates --lineend=linux --preserve-date
|
|
--formatted
|
|
|
|
steps:
|
|
- name: Checkout pull request
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: main
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Checkout tools
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: tools
|
|
ref: develop
|
|
|
|
- name: Install astyle
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install astyle
|
|
|
|
- name: Check amalgamation
|
|
run: |
|
|
cd $MAIN_DIR
|
|
|
|
rm -fr $INCLUDE_DIR/json.hpp~ $INCLUDE_DIR/json_fwd.hpp~
|
|
cp $INCLUDE_DIR/json.hpp $INCLUDE_DIR/json.hpp~
|
|
cp $INCLUDE_DIR/json_fwd.hpp $INCLUDE_DIR/json_fwd.hpp~
|
|
|
|
python3 $TOOL_DIR/amalgamate.py -c $TOOL_DIR/config_json.json -s .
|
|
python3 $TOOL_DIR/amalgamate.py -c $TOOL_DIR/config_json_fwd.json -s .
|
|
echo "Format (1)"
|
|
astyle $ASTYLE_FLAGS --suffix=none --quiet $INCLUDE_DIR/json.hpp $INCLUDE_DIR/json_fwd.hpp
|
|
|
|
diff $INCLUDE_DIR/json.hpp~ $INCLUDE_DIR/json.hpp
|
|
diff $INCLUDE_DIR/json_fwd.hpp~ $INCLUDE_DIR/json_fwd.hpp
|
|
|
|
astyle $ASTYLE_FLAGS $(find docs/examples include tests -type f \( -name '*.hpp' -o -name '*.cpp' -o -name '*.cu' \) -not -path 'tests/thirdparty/*' -not -path 'tests/abi/include/nlohmann/*' | sort)
|
|
echo Check
|
|
find $MAIN_DIR -name '*.orig' -exec false {} \+
|