Files
tinygltf/.github/workflows/c-cpp.yml
Syoyo Fujita 76a3b70751 Update build, tests, CI and docs to tinygltf v3 C only
- CMakeLists.txt: build v3 C testers, install v3 C files only
- tests/Makefile and Makefile: build/run v3 C testers
- test_runner.py: verify v3 C tester output, drop v1 ground truth
- CI: build and test v3 C only (GCC/Clang/MSVC/Meson/sanitizers)
- README: v3 C mainline, legacy moved to attic/
2026-07-31 21:42:31 +09:00

72 lines
1.7 KiB
YAML

name: C/C++ CI
on: [push, pull_request]
jobs:
# compile with mingw gcc cross
build-mingw-cross:
runs-on: ubuntu-latest
name: Build v3 C tests with MinGW gcc cross
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Build
run: |
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y mingw-w64
cd tests
x86_64-w64-mingw32-gcc -I../ -std=c11 -DTINYGLTF3_ENABLE_FS -o tester_v3_c.exe tester_v3_c.c ../tiny_gltf_v3.c
# Windows(x64) + Visual Studio 2022 build
build-windows-msvc:
runs-on: windows-latest
name: Build v3 C tests on Windows(x64, MSVC)
# Use system installed cmake
# https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Configure
run: |
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 -DTINYGLTF3_BUILD_TESTS=ON ..
cd ..
- name: Build
run: cmake --build build --config Release
- name: Run tests
run: ctest --test-dir build -C Release --output-on-failure
build-linux:
runs-on: ubuntu-latest
name: Build v3 C tests with gcc
steps:
- uses: actions/checkout@v5
- name: build
run: |
cd tests
cc -I../ -std=c11 -g -O0 -DTINYGLTF3_ENABLE_FS -o tester_v3_c tester_v3_c.c ../tiny_gltf_v3.c
- name: test
run: |
./tests/tester_v3_c models/Cube/Cube.gltf
- name: tests
run: |
cd tests
make all
./tester_v3_c
./tester_v3_c_v1port
./tester_v3_json_c
./tester_v3_freestanding
cd ..