run 25611531122 surfaced two failures:
- Stock Ubuntu clang errored on `-Wno-pre-c11-compat` (added in newer
clang). Add `-Wno-unknown-warning-option` so older clang silently
ignores warning flags it doesn't know.
- MSVC /W4 /WX failed on C4996 (fopen deprecation). Define
`_CRT_SECURE_NO_WARNINGS` for the v3 C MSVC build; the parser uses
fopen by design and v1 already takes the same approach.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Silence the deprecation warnings reported on
https://github.com/syoyo/tinygltf/actions/runs/25610558215 by upgrading
all `actions/checkout` usages from v1/v2/v3/v4 to v5 (Node 24 runtime)
and the CodeQL actions from v2 to v3.
msys2/setup-msys2 stays at v2 — it's the latest tag.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Escalate v3 C warning levels in CI to catch latent issues:
gcc/clang now run with -Werror, clang adds -Weverything (with a
small irreducible suppression list for -Wpadded, -Wunsafe-buffer-usage,
-Wcast-align, etc.), and a new MSVC job builds tester_v3_c with /W4 /WX.
Source fixes to clear the elevated warnings:
- tg3__arena_new_block: cast through void* to silence -Wcast-align.
- tg3__value_to_json: handle TG3_VALUE_BINARY explicitly and drop the
default label so -Wswitch-enum and -Wcovered-switch-default agree.
- Drop unused tg3__json_set_value_copy.
- tinygltf_json_c.h: enumerate all tg3json_value_type cases in
tg3json_value_free / tg3json_value_copy / tg3json__stringify_value_ex.
- tester_v3_c_v1port FAIL macro: split the format/newline prints so it
no longer relies on the GNU `, ##__VA_ARGS__` extension.
Verified: clang -Werror -Weverything builds clean, 13/13 internal
tests, 18/18 v1-port tests, and 134/134 cross-version regression all
pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ci.yml now runs the v3 C suites under three Linux toolchains:
- v3-c-tests (default cc / GCC, -Wall -Wextra)
- v3-c-tests-clang (stock Ubuntu clang)
- v3-c-tests-clang21 (clang 21 from apt.llvm.org, matching local dev)
The validator helper macros TG3__IDX_BAD / TG3__CHECK_REQ /
TG3__CHECK_OPT used the GNU `, ##__VA_ARGS__` extension, which clang
flags under -Wpedantic. Every call site already passes at least one
variadic argument, so plain __VA_ARGS__ (C11) suffices.
Local verification: clang-21 -Wall -Wextra builds tester_v3_c and
tester_v3_c_v1port with zero warnings introduced by the v3 changes
(only the pre-existing tg3__json_set_value_copy unused-function
notice remains, unrelated to this work). All suites pass under gcc
13.3 and clang 21.1 alike, plus the 134-model cross-version
verifier.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ci.yml: two new jobs.
- v3-c-tests builds tester_v3_c (security regressions) and
tester_v3_c_v1port (18 ported v1 unit tests) with the default
system cc (gcc on ubuntu-latest) and runs both.
- v3-c-tests-sanitizers rebuilds the same suites under clang with
-fsanitize=address,undefined and ASAN_OPTIONS=halt_on_error=1 plus
leak detection so memory-safety regressions break CI.
c-cpp.yml: add a v3_c_tests step to build-linux so the legacy gcc
workflow also exercises the v3 C parser end-to-end.
Both invoke the parser via parse_auto with TINYGLTF3_ENABLE_FS so the
external-file paths (and the new path-traversal/file-size guards)
are exercised end-to-end.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Convert manual g++/clang++ builds to CMake for consistency with
Windows builds:
- Linux x64 (GCC)
- Linux ARM64 (GCC)
- macOS ARM64 Apple Silicon (Clang)
All native builds now use:
- cmake -B build -DTINYGLTF_BUILD_LOADER_EXAMPLE=ON
- cmake --build build
- ctest --test-dir build --output-on-failure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Install Clang 21 from LLVM apt repository
- Use CMake with clang-21/clang++-21 compilers
- Run tests with ctest
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Convert RapidJSON backend job from manual g++ builds to CMake,
enabling ctest for running tests.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Run ctest after build for:
- Windows x64 MSVC
- Windows x86 MSVC
- Windows MinGW MSYS2
- Linux Header-Only Mode
Cross-compile builds (Windows ARM64, Linux→Windows MinGW) are excluded
since tests cannot run on the host.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
macOS Intel runners are being deprecated. Keep only the ARM64
Apple Silicon job for macOS coverage.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change macos-13 to macos-15-large for Intel x64 (macos-13 is retired)
- Remove Windows MSVC unit tests (they have path-related issues and
the existing c-cpp.yml workflow doesn't run tests on Windows either)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The `cl` compiler was not in PATH because the Visual Studio developer
environment needs to be set up before calling MSVC tools directly.
Added `ilammy/msvc-dev-cmd@v1` action to configure the environment.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>