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 ..