diff --git a/.github/workflows/check_amalgamation.yml b/.github/workflows/check_amalgamation.yml index e7aee7043..ba66ad120 100644 --- a/.github/workflows/check_amalgamation.yml +++ b/.github/workflows/check_amalgamation.yml @@ -92,7 +92,17 @@ jobs: $(find $SOURCE_DIRS -type f \( -name '*.hpp' -o -name '*.cpp' -o -name '*.cu' \) -not -path 'tests/thirdparty/*' -not -path 'tests/abi/include/nlohmann/*' | sort) - name: Regenerate nlohmann_json.natvis - run: python3 $NATVIS_TOOL_DIR/generate_natvis.py $MAIN_DIR + run: | + cd $MAIN_DIR + # Pass --version explicitly so this step also works with the tool + # copy from develop before this repository's own generate_natvis.py + # learns to derive the version itself: the older script requires + # --version, and the newer one accepts it as an explicit override. + ABI_MACROS=include/nlohmann/detail/abi_macros.hpp + VERSION_MAJOR=$(grep -m1 'define NLOHMANN_JSON_VERSION_MAJOR' $ABI_MACROS | grep -o '[0-9]\+') + VERSION_MINOR=$(grep -m1 'define NLOHMANN_JSON_VERSION_MINOR' $ABI_MACROS | grep -o '[0-9]\+') + VERSION_PATCH=$(grep -m1 'define NLOHMANN_JSON_VERSION_PATCH' $ABI_MACROS | grep -o '[0-9]\+') + python3 $NATVIS_TOOL_DIR/generate_natvis.py --version "$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH" $MAIN_DIR - name: Build patch and check for differences id: diff