diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcb3c8d..ce6a7f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,19 +25,17 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Build loader_example - run: | - g++ -std=c++11 -o loader_example loader_example.cc + - name: Configure + run: cmake -B build -DTINYGLTF_BUILD_LOADER_EXAMPLE=ON + + - name: Build + run: cmake --build build - name: Run loader_example - run: | - ./loader_example models/Cube/Cube.gltf + run: ./build/loader_example models/Cube/Cube.gltf - - name: Build and run unit tests - run: | - cd tests - g++ -I../ -std=c++11 -g -O0 -o tester tester.cc - ./tester + - name: Run tests + run: ctest --test-dir build --output-on-failure # Linux x64 - Clang 21 linux-clang-x64: @@ -75,19 +73,17 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Build loader_example - run: | - g++ -std=c++11 -o loader_example loader_example.cc + - name: Configure + run: cmake -B build -DTINYGLTF_BUILD_LOADER_EXAMPLE=ON + + - name: Build + run: cmake --build build - name: Run loader_example - run: | - ./loader_example models/Cube/Cube.gltf + run: ./build/loader_example models/Cube/Cube.gltf - - name: Build and run unit tests - run: | - cd tests - g++ -I../ -std=c++11 -g -O0 -o tester tester.cc - ./tester + - name: Run tests + run: ctest --test-dir build --output-on-failure # macOS ARM64 Apple Silicon macos-arm64: @@ -97,19 +93,17 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Build loader_example - run: | - clang++ -std=c++11 -o loader_example loader_example.cc + - name: Configure + run: cmake -B build -DTINYGLTF_BUILD_LOADER_EXAMPLE=ON + + - name: Build + run: cmake --build build - name: Run loader_example - run: | - ./loader_example models/Cube/Cube.gltf + run: ./build/loader_example models/Cube/Cube.gltf - - name: Build and run unit tests - run: | - cd tests - clang++ -I../ -std=c++11 -g -O0 -o tester tester.cc - ./tester + - name: Run tests + run: ctest --test-dir build --output-on-failure # Windows x64 - MSVC windows-msvc-x64: