Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4395fd5
Fix coding error.
MarkCallow May 2, 2026
15514af
Try array of os to exclude and include.
MarkCallow May 2, 2026
5c5a878
Add MinGW to matrix.
MarkCallow May 2, 2026
298f203
Fix some syntax errors.
MarkCallow May 2, 2026
686e987
Fix another syntax error.
MarkCallow May 2, 2026
6b53f6a
Explicitly add toolset types. Clean up if: syntax.
MarkCallow May 2, 2026
d685b26
Try a fix for mysterious syntax error.
MarkCallow May 2, 2026
994a09f
Try alternate fix for mysterious syntax error.
MarkCallow May 2, 2026
f65fcca
Revert to previous syntax error fix.
MarkCallow May 2, 2026
a3eb3e9
Enable the build commands.
MarkCallow May 2, 2026
b199637
Fix error in standard options.
MarkCallow May 2, 2026
7e55741
Checkout the CTS submodule.
MarkCallow May 2, 2026
95827aa
Fix config for Windows builds.
MarkCallow May 2, 2026
e86ec6f
Add output for debugging.
MarkCallow May 2, 2026
251d083
Fix shell error in debug printout.
MarkCallow May 2, 2026
d8f955e
Add some debug to zstd_errors.h.
MarkCallow May 2, 2026
69422e4
Turn off warning as error for debugging.
MarkCallow May 2, 2026
8c91e8d
More #warning messages for debug.
MarkCallow May 2, 2026
1a835c0
Make compiler dump include file paths when compiling texture2.c.
MarkCallow May 3, 2026
0dc1ddf
Make file path dumping compiler specific.
MarkCallow May 3, 2026
ab95579
Cat the zstd_errors.h that IS being included.
MarkCallow May 3, 2026
dad6f11
Update to zstd version from basis_universal 2.0.
MarkCallow May 3, 2026
e370409
Add debug prints around astcenc architecture selection.
MarkCallow May 3, 2026
e4b0f57
Remove previous debug prints. Set override for ISA on x86_64.
MarkCallow May 3, 2026
9507fed
Switch to fail-fast: false to keep workflow running.
MarkCallow May 4, 2026
42e2be9
Add steps to check available compilers.
MarkCallow May 4, 2026
1452074
Remove extra paren. and change linux to ubuntu.
MarkCallow May 4, 2026
ec6df29
Fix the version numbers to check on Ubuntu.
MarkCallow May 4, 2026
6c15427
Add jobs for clang on Windows and Ubuntu and gcc on macOS.
MarkCallow May 4, 2026
ed72199
Exclude gcc on macos-15-intel.
MarkCallow May 4, 2026
cd395a4
Fix exclude part of matrix.
MarkCallow May 4, 2026
6f5a601
Uncomment the macOS includes.
MarkCallow May 4, 2026
1b52629
Use the new matrix in the build.
MarkCallow May 4, 2026
d10a6b3
Fix missing -D.
MarkCallow May 4, 2026
8472118
Add other matrix elements to macOS includes.
MarkCallow May 4, 2026
e437d3b
Remove the array markers from those last additions.
MarkCallow May 4, 2026
dbf7544
Use "clang++" for c++.
MarkCallow May 4, 2026
a822a32
Remove language printouts.
MarkCallow May 4, 2026
fce9f81
Improve comment that explains what the test does.
MarkCallow May 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 67 additions & 20 deletions .github/workflows/check-determinism.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,102 @@
name: Check Determinism of Encoder Results Across Plaforms and Compilers

# The purpose of this is to show whether the encoding results are
# deterministic across platforms and compilers. Do this by building
# and running the library and tools then running the CTS with an
# option set so it will expect an exact match and won't use ktxdiff.
# deterministic across platforms and compilers. It does this by building
# the library and tools then running the CTS with an option set that
# requires an exact match and won't use ktxdiff.
#
# The test is run across macOS, Ubuntu and Windows on both arm64 and x86_64
# processors using ktx and libktx compiled with clang and gcc. They are,
# in addition, compiled with AppleClang on macOS and with ClangCL and msvc
# on Windows.

on:
workflow_dispatch:

# macOS runners: clang 17, clang 18 available on $(brew --prefix llvm@18)/bin/clang & gcc-{13,14,15}
# Linux runners: clang 16, 17, 18 & gcc-{12,13,14}
# Windows runners:
jobs:
check-determinism:
strategy:
fail-fast: false
matrix:
os: [ macos-latest, macos-15-intel, ubuntu-latest, ubuntu-22.04-arm, windows-latest, windows-11-arm ]
os: [ macos-latest, macos-15-intel, ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm ]
compiler:
- [ clang, clang++ ]
- [ gcc, g++ ]
config: [ Release ]
generator: [ 'Ninja Multi-Config' ]
exclude:
#- os: [ windows-latest, windows-11-arm ]
- os: windows-latest
generator: 'Ninja Multi-Config'
- os: macos-latest
compiler: [ gcc, g++ ] # Here gcc is an alias for clang
- os: macos-15-intel
compiler: [ gcc, g++ ] # ditto
include:
# The NMC generator defaults to using GCC and GCC names dlls with
# a "lib" prefix and the import files with both the prefix and a
# ".dll.a" extension. I have neither the time nor energy to find out
# how to change the behaviour. Use VS.
#- os: [ windows-latest, windows-11-arm ]
- os: macos-latest
compiler: [ gcc-15, g++-15 ]
config: Release
generator: 'Ninja Multi-Config'
- os: macos-latest
compiler: [ $(brew --prefix llvm@18)/bin/clang, $(brew --prefix llvm@18)/bin/clang++ ]
config: Release
generator: 'Ninja Multi-Config'
- os: macos-15-intel
compiler: [ gcc-15, g++-15 ]
config: Release
generator: 'Ninja Multi-Config'
- os: macos-15-intel
compiler: [ $(brew --prefix llvm@18)/bin/clang, $(brew --prefix llvm@18)/bin/clang++ ]
config: Release
generator: 'Ninja Multi-Config'
- os: windows-latest
config: Release
generator: 'Visual Studio 17 2022'
toolset: v143
- os: windows-latest
config: Release
static: OFF
generator: 'Visual Studio 17 2022'
toolset: CLangCL
- os: windows-11-arm
config: Release
generator: 'Visual Studio 17 2022'
toolset: v143
- os: windows-11-arm
config: Release
generator: 'Visual Studio 17 2022'
toolset: CLangCL

runs-on: ${{ matrix.os }}
env:
GIT_LFS_SKIP_SMUDGE: 1
BUILD_DIR: "build"
WERROR: ON
BUILD_DIR: build
STANDARD_OPTIONS: '-D KTX_WERROR=OFF -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=ON'

steps:
- uses: actions/checkout@v6
with:
# Fetch all history to make sure tags are
# included (used for version creation)
fetch-depth: 0
# For the CTS submodule.
submodules: true

- name: Set macOS astcenc ISA override for x86_64
if: matrix.os == 'macos-15-intel'
run: echo ISA_OVERRIDE='-D ASTCENC_ISA_SSE41=ON' >> $GITHUB_ENV

- name: Configure KTX software build for all but Visual Studio
# Without the ${{ }}, this line generates a YAML syntax error. Do not understand why.
if: ${{ !startsWith(matrix.generator, 'Visual Studio') }}
run: cmake -B ${{ env.BUILD_DIR }} -G "${{ matrix.generator }}" -D CMAKE_C_COMPILER=${{ matrix.compiler[0] }} -D CMAKE_CXX_COMPILER=${{ matrix.compiler[1] }} ${{ env.STANDARD_OPTIONS }} ${{ env.ISA_OVERRIDE }}

- name: Configure KTX software
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 }}'
- name: Configure KTX software build for Visual Studio build
if: startsWith(matrix.generator, 'Visual Studio')
run: cmake -B ${{ env.BUILD_DIR }} -G "${{ matrix.generator }}" -T ${{ matrix.toolset }} ${{ env.STANDARD_OPTIONS }}

- name: Build KTX software
run: echo 'cmake --build ${{ env.BUILD_DIR }} --config=${{ matrix.config }} --target=ktxtools'
run: cmake --build ${{ env.BUILD_DIR }} --config=${{ matrix.config }} --target=ktxtools

- name: Run KTX tools CTS
continue-on-error: true
run: echo 'ctest --output-on-failure --test-dir ${{ BUILD_DIR }} -C Release -R ktxToolsTest'
run: ctest --output-on-failure --test-dir ${{ env.BUILD_DIR }} -C Release -R ktxToolsTest

Loading
Loading