KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
886 stars 232 forks source link

Handle problems caused by runner and Docker image updates #933

Closed MarkCallow closed 2 months ago

MarkCallow commented 3 months ago

An Emscripten Docker image update to Clang 20 and an update to the GitHub Actions Windows runner image broke our CI builds. This PR provides fixes or workarounds. While working on the Clang 20 issue it was noticed that the FP options for libktx were not being set as intended, except for the ASTC encoder. This PR also fixes that problem so the same FP options are used throughout libktx. Lastly it contains improvements to build_wasm_docker.sh made while debugging and fixing the FP settings issue.

clang 20 has a new "overriding option" warning which is raised if one float-point option modifies a setting made by another. We are setting -ffp-model=precise, which leaves contraction on, and -ffp-contract=off thus we get the warning. This usage is normal for cross-platform invariance thus the fix is to disable the spam warning.

The Windows runner image update broke the python build due to removal of a long deprecated package from the Python/PIP setuptools package and our use of the cffi package which has a dependency on setuptools including the deleted package. See https://github.com/python-cffi/cffi/issues/117. This PR works around the problem by creating a constraint.txt file which is passed to PIP and tells it to limit the setuptools package to a version that still contains the deleted package.