|
| 1 | +# Copyright 2015-2020 The Khronos Group Inc. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | +name: Check Determinism of Encoder Results Across Plaforms and Compilers |
| 4 | + |
| 5 | +# The purpose of this is to show whether the encoding results are |
| 6 | +# deterministic across platforms and compilers. Do this by building |
| 7 | +# and running the library and tools then running the CTS with an |
| 8 | +# option set so it will expect an exact match and won't use ktxdiff. |
| 9 | + |
| 10 | +on: |
| 11 | + workflow_dispatch: |
| 12 | + |
| 13 | +jobs: |
| 14 | + check-determinism: |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + os: [ macos-latest, macos-15-intel, ubuntu-latest, ubuntu-22.04-arm, windows-latest, windows-11-arm ] |
| 18 | + config: [ Release ] |
| 19 | + generator: [ 'Ninja Multi-Config' ] |
| 20 | + exclude: |
| 21 | + #- os: [ windows-latest, windows-11-arm ] |
| 22 | + - os: windows-latest |
| 23 | + generator: 'Ninja Multi-Config' |
| 24 | + include: |
| 25 | + # The NMC generator defaults to using GCC and GCC names dlls with |
| 26 | + # a "lib" prefix and the import files with both the prefix and a |
| 27 | + # ".dll.a" extension. I have neither the time nor energy to find out |
| 28 | + # how to change the behaviour. Use VS. |
| 29 | + #- os: [ windows-latest, windows-11-arm ] |
| 30 | + - os: windows-latest |
| 31 | + generator: 'Visual Studio 17 2022' |
| 32 | + config: Release |
| 33 | + static: OFF |
| 34 | + |
| 35 | + runs-on: ${{ matrix.os }} |
| 36 | + env: |
| 37 | + GIT_LFS_SKIP_SMUDGE: 1 |
| 38 | + BUILD_DIR: "build" |
| 39 | + WERROR: ON |
| 40 | + |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@v6 |
| 43 | + with: |
| 44 | + # Fetch all history to make sure tags are |
| 45 | + # included (used for version creation) |
| 46 | + fetch-depth: 0 |
| 47 | + |
| 48 | + - name: Configure KTX software |
| 49 | + run: echo 'cmake -B ${{ env.BUILD_DIR }} -G "${{ matrix.generator }}" -D KTX_WERROR=${{ env.WERROR }} -D LIBKTX_VERSION_READ_ONLY=OFF -D KTX_FEATURE_TOOLS=ON -D KTX_FEATURE_TOOLS_CTS=ON -D KTX_TOOLS_CTS_PRIMARY_PLATFORM=ON -D KTX_FEATURE_TESTS ${{ matrix.os }}' |
| 50 | + |
| 51 | + - name: Build KTX software |
| 52 | + run: echo 'cmake --build ${{ env.BUILD_DIR }} --config=${{ matrix.config }} --target=ktxtools' |
| 53 | + |
| 54 | + - name: Run KTX tools CTS |
| 55 | + continue-on-error: true |
| 56 | + run: echo 'ctest --output-on-failure --test-dir ${{ BUILD_DIR }} -C Release -R ktxToolsTest' |
| 57 | + |
0 commit comments