diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40d391b..c3484cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -271,25 +271,19 @@ jobs: run: | git clone https://github.com/Tencent/rapidjson - - name: Build loader_example + - name: Configure run: | - g++ -DTINYGLTF_USE_RAPIDJSON -I./rapidjson/include/rapidjson -std=c++11 -o loader_example loader_example.cc + cmake -B build -DTINYGLTF_USE_RAPIDJSON=ON -DTINYGLTF_BUILD_LOADER_EXAMPLE=ON -DCMAKE_PREFIX_PATH=$PWD/rapidjson + + - name: Build + run: cmake --build build - name: Run loader_example run: | - ./loader_example models/Cube/Cube.gltf + ./build/loader_example models/Cube/Cube.gltf - - name: Build and run unit tests - run: | - cd tests - g++ -DTINYGLTF_USE_RAPIDJSON -I../rapidjson/include/rapidjson -I../ -std=c++11 -g -O0 -o tester tester.cc - ./tester - - - name: Build and run no-exception tests with RapidJSON - run: | - cd tests - g++ -DTINYGLTF_USE_RAPIDJSON -I../rapidjson/include/rapidjson -DTINYGLTF_NOEXCEPTION -I../ -std=c++11 -g -O0 -o tester_noexcept tester.cc - ./tester_noexcept + - name: Run tests + run: ctest --test-dir build --output-on-failure # Special Configuration: AddressSanitizer linux-asan: