Fix: Use WINAPI_FAMILY macro instead of WINDOWS_UWP #503
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI x64 | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- '.github/workflows/**' | |
- '**.cpp' | |
- '**.hpp' | |
- '**.txt' | |
pull_request: | |
branches: [ "main" ] | |
env: | |
BUILD_TYPE: Release | |
SAMPLE_MODELS_LOCATION: tests/gltf/glTF-Sample-Models | |
jobs: | |
build_windows: | |
strategy: | |
matrix: | |
cpp20: [NO, YES] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download cached sample models | |
uses: actions/cache@v4 | |
id: sample-models-cache | |
with: | |
path: ${{ github.workspace }}/${{ env.SAMPLE_MODELS_LOCATION }} | |
key: gltf-sample-models | |
- name: Clone glTF-Sample-Models | |
if: steps.sample-models-cache.outputs.cache-hit != 'true' | |
run: git clone https://github.com/KhronosGroup/glTF-Sample-Models ${{ github.workspace }}/${{ env.SAMPLE_MODELS_LOCATION }} | |
- name: Configure CMake | |
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DFASTGLTF_ENABLE_TESTS=ON -DFASTGLTF_COMPILE_AS_CPP20=${{ matrix.cpp20 }} | |
- name: Build (Windows) | |
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --target tests/fastgltf_tests --verbose | |
- name: Run tests | |
run: ${{ github.workspace }}\build\tests\Release\fastgltf_tests.exe -d yes --order lex ~[gltf-benchmark] | |
build_windows_deprecated_extensions: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download cached sample models | |
uses: actions/cache@v4 | |
id: sample-models-cache | |
with: | |
path: ${{ github.workspace }}/${{ env.SAMPLE_MODELS_LOCATION }} | |
key: gltf-sample-models | |
- name: Clone glTF-Sample-Models | |
if: steps.sample-models-cache.outputs.cache-hit != 'true' | |
run: git clone https://github.com/KhronosGroup/glTF-Sample-Models ${{ github.workspace }}/${{ env.SAMPLE_MODELS_LOCATION }} | |
- name: Configure CMake | |
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DFASTGLTF_ENABLE_TESTS=ON -DFASTGLTF_ENABLE_DEPRECATED_EXT=ON | |
- name: Build (Windows) | |
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --target tests/fastgltf_tests --verbose | |
- name: Run tests | |
run: ${{ github.workspace }}\build\tests\Release\fastgltf_tests.exe -d yes --order lex ~[gltf-benchmark] | |
build_linux: | |
strategy: | |
matrix: | |
c_compiler: [gcc-9, gcc-10, clang-13, clang-15] | |
os: [ubuntu-22.04] | |
cpp20: [NO, YES] | |
exclude: | |
# gcc 9 is too old to support C++20, and Clang 13/14 have an issue with the libstdc++ version on the runner images. | |
- c_compiler: gcc-9 | |
cpp20: YES | |
- c_compiler: clang-13 | |
cpp20: YES | |
include: | |
- cxx_compiler: g++-9 | |
c_compiler: gcc-9 | |
- cxx_compiler: g++-10 | |
c_compiler: gcc-10 | |
- cxx_compiler: clang++-13 | |
c_compiler: clang-13 | |
- cxx_compiler: clang++-15 | |
c_compiler: clang-15 | |
# Add to configurations to test with GCC 14 and Clang 18 on Ubuntu 24.04, | |
# since we try to avoid explicitly installing any compilers in the runners. | |
- os: ubuntu-24.04 | |
c_compiler: gcc-14 | |
cxx_compiler: g++-14 | |
- os: ubuntu-24.04 | |
c_compiler: clang-18 | |
cxx_compiler: clang++-18 | |
runs-on: ${{ matrix.os }} | |
env: | |
CC: ${{ matrix.c_compiler }} | |
CXX: ${{ matrix.cxx_compiler }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download cached sample models | |
uses: actions/cache@v4 | |
id: sample-models-cache | |
with: | |
path: ${{ github.workspace }}/${{ env.SAMPLE_MODELS_LOCATION }} | |
key: gltf-sample-models | |
- name: Clone glTF-Sample-Models | |
if: steps.sample-models-cache.outputs.cache-hit != 'true' | |
run: git clone https://github.com/KhronosGroup/glTF-Sample-Models ${{ github.workspace }}/${{ env.SAMPLE_MODELS_LOCATION }} | |
- name: Configure CMake | |
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DFASTGLTF_ENABLE_TESTS=ON -DFASTGLTF_COMPILE_AS_CPP20=${{ matrix.cpp20 }} | |
- name: Build | |
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --target fastgltf_tests --verbose | |
- name: Run tests | |
run: ${{ github.workspace }}/build/tests/fastgltf_tests -d yes --order lex ~[gltf-benchmark] | |
build_linux_deprecated_extensions: | |
strategy: | |
matrix: | |
c_compiler: [gcc-9, gcc-10, clang-13] | |
os: [ubuntu-22.04] | |
include: | |
- cxx_compiler: g++-9 | |
c_compiler: gcc-9 | |
- cxx_compiler: g++-10 | |
c_compiler: gcc-10 | |
- cxx_compiler: clang++-13 | |
c_compiler: clang-13 | |
- os: ubuntu-24.04 | |
c_compiler: gcc-14 | |
cxx_compiler: g++-14 | |
- os: ubuntu-24.04 | |
c_compiler: clang-18 | |
cxx_compiler: clang++-18 | |
runs-on: ${{ matrix.os }} | |
env: | |
CC: ${{ matrix.c_compiler }} | |
CXX: ${{ matrix.cxx_compiler }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download cached sample models | |
uses: actions/cache@v4 | |
id: sample-models-cache | |
with: | |
path: ${{ github.workspace }}/${{ env.SAMPLE_MODELS_LOCATION }} | |
key: gltf-sample-models | |
- name: Clone glTF-Sample-Models | |
if: steps.sample-models-cache.outputs.cache-hit != 'true' | |
run: git clone https://github.com/KhronosGroup/glTF-Sample-Models ${{ github.workspace }}/${{ env.SAMPLE_MODELS_LOCATION }} | |
- name: Configure CMake | |
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DFASTGLTF_ENABLE_TESTS=ON -DFASTGLTF_ENABLE_DEPRECATED_EXT=ON | |
- name: Build | |
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --target fastgltf_tests --verbose | |
- name: Run tests | |
run: ${{ github.workspace }}/build/tests/fastgltf_tests -d yes --order lex ~[gltf-benchmark] |