yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
78ff51b7
main
1name : Continuous Integration 2 3on : 4workflow_dispatch : 5pull_request : 6branches : 7- main 8 9permissions : read-all 10 11jobs : 12linux : 13needs : linux-shared # fastest job to do sanity check 14runs-on : ubuntu-22.04 15strategy : 16fail-fast : false 17matrix : 18compiler : [{ cc : clang , cxx : clang++ }, { cc : gcc , cxx : g++ }] 19cmake_build_type : [ Debug , Release ] 20steps : 21- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 22- name : Setup ccache 23uses : hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 24with : 25key : ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}} 26- run : ./update_glslang_sources.py 27- name : Configure 28run : cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON 29env : 30CC : ${{matrix.compiler.cc}} 31CXX : ${{matrix.compiler.cxx}} 32CMAKE_GENERATOR : Ninja 33CMAKE_C_COMPILER_LAUNCHER : ccache 34CMAKE_CXX_COMPILER_LAUNCHER : ccache 35- name : Build 36run : cmake --build build 37- name : Install 38run : cmake --install build --prefix build/install 39- name : Test find_package support 40run : | 41cmake -S Test/find_package -B build/find_package && \ 42cmake --build build/find_package 43- name : Test 44run : ctest --output-on-failure --test-dir build 45- name : Check known validation failure list 46run : grep -l 'Validation failed' Test/baseResults/* | sort -fd | diff -u Test/baseResults/validation_fails.txt - 47 48linux-shared : 49runs-on : ubuntu-22.04 50strategy : 51fail-fast : false 52matrix : 53compiler : [{ cc : clang , cxx : clang++ }, { cc : gcc , cxx : g++ }] 54cmake_build_type : [ Release ] 55steps : 56- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 57- name : Setup ccache 58uses : hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 59with : 60key : ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}} 61- run : ./update_glslang_sources.py 62- name : Configure 63run : cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON 64env : 65CC : ${{matrix.compiler.cc}} 66CXX : ${{matrix.compiler.cxx}} 67CMAKE_GENERATOR : Ninja 68CMAKE_C_COMPILER_LAUNCHER : ccache 69CMAKE_CXX_COMPILER_LAUNCHER : ccache 70- name : Build 71run : cmake --build build 72- name : Install 73run : cmake --install build --prefix build/install 74- name : Test find_package support 75run : | 76cmake -S Test/find_package -B build/find_package && \ 77cmake --build build/find_package 78- name : Test 79run : ctest --output-on-failure --test-dir build 80 81linux-asan : 82needs : linux-shared # fastest job to do sanity check 83runs-on : ubuntu-22.04 84strategy : 85fail-fast : false 86matrix : 87compiler : [{ cc : gcc , cxx : g++ }] 88cmake_build_type : [ Debug ] 89flags : [ '-fsanitize=address' , '-fsanitize=thread' , '-fsanitize=undefined' ] 90steps : 91- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 92- name : Setup ccache 93uses : hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 94with : 95key : ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}}-${{matrix.flags}} 96# This is to combat a bug when using 6.6 linux kernels with thread/address sanitizer 97# https://github.com/google/sanitizers/issues/1716 98- run : sudo sysctl vm.mmap_rnd_bits=28 99- run : ./update_glslang_sources.py 100- name : Configure 101run : cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -D GLSLANG_TESTS=ON 102env : 103CC : ${{matrix.compiler.cc}} 104CXX : ${{matrix.compiler.cxx}} 105CMAKE_GENERATOR : Ninja 106CMAKE_C_COMPILER_LAUNCHER : ccache 107CMAKE_CXX_COMPILER_LAUNCHER : ccache 108CFLAGS : ${{matrix.flags}} 109CXXFLAGS : ${{matrix.flags}} 110LDFLAGS : ${{matrix.flags}} 111- name : Build 112run : cmake --build build 113- name : Install 114run : cmake --install build --prefix build/install 115- name : Test 116env : 117UBSAN_OPTIONS : 'halt_on_error=1:print_stacktrace=1' 118run : ctest --output-on-failure --test-dir build 119 120# Ensure we can compile/run on an older distro, with older tools (cmake, python, etc) 121linux_min : 122needs : linux-shared # fastest job to do sanity check 123name : Linux Backcompat 124runs-on : ubuntu-22.04 125steps : 126- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 127- uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 128with : 129python-version : '3.7' 130- uses : lukka/get-cmake@a89e43e22a96abafcd7a62db652a65ecd33052c9 # v4.4.4 131with : 132cmakeVersion : 3.22.1 133- name : Setup ccache 134uses : hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 135with : 136key : linux_backcompat 137- run : ./update_glslang_sources.py 138- name : Configure 139run : cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D GLSLANG_TESTS=ON 140env : 141CMAKE_C_COMPILER_LAUNCHER : ccache 142CMAKE_CXX_COMPILER_LAUNCHER : ccache 143- name : Build 144run : cmake --build build 145- name : Install 146run : cmake --install build --prefix build/install 147- name : Test find_package support 148run : | 149cmake -S Test/find_package -B build/find_package && \ 150cmake --build build/find_package 151- name : Test 152run : ctest --output-on-failure --test-dir build 153 154macos : 155# iOS is 10x expensive to run on GitHub machines, so only run if we know something else passed as well 156needs : windows-shared 157runs-on : ${{matrix.os}} 158strategy : 159fail-fast : false 160matrix : 161os : [ macos-latest ] 162compiler : [{ cc : clang , cxx : clang++ }] 163cmake_build_type : [ Debug , Release ] 164steps : 165- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 166- run : ./update_glslang_sources.py 167- run : | 168cmake -S . -B build \ 169-D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} \ 170-G Ninja \ 171-D BUILD_WERROR=ON \ 172-D GLSLANG_TESTS=ON \ 173-D "CMAKE_OSX_ARCHITECTURES=arm64;x86_64" 174env : 175CC : ${{matrix.compiler.cc}} 176CXX : ${{matrix.compiler.cxx}} 177MACOSX_DEPLOYMENT_TARGET : 11.0 178- run : cmake --build build 179- run : cmake --install build --prefix build/install 180- name : Test find_package support 181run : | 182cmake -S Test/find_package -B build/find_package && \ 183cmake --build build/find_package 184- run : ctest --output-on-failure --test-dir build 185 186macos-shared : 187# iOS is 10x expensive to run on GitHub machines, so only run if we know something else passed as well 188needs : windows-shared 189runs-on : ${{matrix.os}} 190strategy : 191fail-fast : false 192matrix : 193os : [ macos-latest ] 194compiler : [{ cc : clang , cxx : clang++ }] 195cmake_build_type : [ Release ] 196steps : 197- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 198- run : ./update_glslang_sources.py 199- run : | 200cmake -S . -B build \ 201-D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} \ 202-G Ninja \ 203-D BUILD_WERROR=ON \ 204-D GLSLANG_TESTS=ON \ 205-DBUILD_SHARED_LIBS=ON \ 206-D "CMAKE_OSX_ARCHITECTURES=arm64;x86_64" 207env : 208CC : ${{matrix.compiler.cc}} 209CXX : ${{matrix.compiler.cxx}} 210MACOSX_DEPLOYMENT_TARGET : 11.0 211- run : cmake --build build 212- run : cmake --install build --prefix build/install 213- name : Test find_package support 214run : | 215cmake -S Test/find_package -B build/find_package && \ 216cmake --build build/find_package 217- run : ctest --output-on-failure --test-dir build 218 219windows : 220needs : linux-shared # fastest job to do sanity check 221runs-on : ${{matrix.os.genus}} 222permissions : 223contents : write 224strategy : 225fail-fast : false 226matrix : 227os : [{ genus : windows-2022 , family : windows }] 228cmake_build_type : [ Debug , Release ] 229steps : 230- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 231- run : python update_glslang_sources.py 232- name : Build 233run : | 234cmake -S. -Bbuild -G "Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install" -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON 235cmake --build build --config ${{matrix.cmake_build_type}} --target install 236- name : Test find_package support 237run : | 238cmake -S Test/find_package -B build/find_package 239cmake --build build/find_package 240- name : Test 241run : ctest -C ${{matrix.cmake_build_type}} --output-on-failure --test-dir build 242 243windows-shared : 244needs : linux-shared # fastest job to do sanity check 245runs-on : ${{matrix.os.genus}} 246permissions : 247contents : write 248strategy : 249fail-fast : false 250matrix : 251os : [{ genus : windows-2022 , family : windows }] 252cmake_build_type : [ Debug , Release ] 253steps : 254- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 255- run : python update_glslang_sources.py 256- name : Build 257run : | 258cmake -S. -Bbuild -G "Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install" -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON 259cmake --build build --config ${{matrix.cmake_build_type}} --target install 260- name : Test find_package support 261run : | 262cmake -S Test/find_package -B build/find_package 263cmake --build build/find_package 264- name : Test 265run : ctest -C ${{matrix.cmake_build_type}} --output-on-failure --test-dir build 266 267iOS : 268# iOS is 10x expensive to run on GitHub machines, so only run if we know something else passed as well 269needs : windows-shared 270runs-on : macos-latest 271steps : 272- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 273- name : Setup ccache 274uses : hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 275with : 276key : IOS 277- run : ./update_glslang_sources.py 278# NOTE: The MacOS SDK ships universal binaries. CI should reflect this. 279- name : Configure Universal Binary for iOS 280run : | 281cmake -S . -B build \ 282-D CMAKE_BUILD_TYPE=Debug \ 283-D CMAKE_SYSTEM_NAME=iOS \ 284"-D CMAKE_OSX_ARCHITECTURES=arm64;x86_64" \ 285-G Ninja 286env : 287CMAKE_C_COMPILER_LAUNCHER : ccache 288CMAKE_CXX_COMPILER_LAUNCHER : ccache 289- run : cmake --build build 290- run : cmake --install build --prefix /tmp 291 292android : 293needs : linux-shared # fastest job to do sanity check 294runs-on : ubuntu-22.04 295strategy : 296matrix : 297# Android NDK currently offers 2 different toolchains. 298# Test both to ensure we are compatible with either approach. 299LEGACY : [ ON , OFF ] 300steps : 301- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 302- name : Setup ccache 303uses : hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 304with : 305key : android-${{ matrix.LEGACY }} 306- run : ./update_glslang_sources.py 307- name : Configure for Android 308run : | 309cmake -S . -B build/ --toolchain $ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \ 310-D CMAKE_BUILD_TYPE=Release \ 311-D ANDROID_ABI=armeabi-v7a \ 312-D ANDROID_USE_LEGACY_TOOLCHAIN_FILE=${{ matrix.LEGACY }} \ 313-G Ninja 314env : 315CMAKE_C_COMPILER_LAUNCHER : ccache 316CMAKE_CXX_COMPILER_LAUNCHER : ccache 317- run : cmake --build build/ 318- run : cmake --install build/ --prefix /tmp 319 320emscripten : 321needs : linux-shared # fastest job to do sanity check 322runs-on : ubuntu-22.04 323steps : 324- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 325- name : Setup ccache 326uses : hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24 327with : 328key : ubuntu-emscripten 329- uses : emscripten-core/setup-emsdk@4528d102f7230f0e7b276855c01ea1159be0e984 # v16 330- name : Update Glslang Sources 331run : ./update_glslang_sources.py 332- name : Configure 333run : emcmake cmake -GNinja -Bbuild/web -DCMAKE_BUILD_TYPE=Release -DENABLE_GLSLANG_JS=ON -DENABLE_OPT=OFF 334env : 335CMAKE_GENERATOR : Ninja 336CMAKE_C_COMPILER_LAUNCHER : ccache 337CMAKE_CXX_COMPILER_LAUNCHER : ccache 338- name : Build 339run : cmake --build build/web