yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Sam EstepFix error in IR stable names Git diff CI script (#7954)e9a309678

master
927 B29 linesraw
1#!/usr/bin/env bash
2set -e
3
4# The github action runners don't have libreadline and we don't need it
5make -C external/lua MYCFLAGS="-DLUA_USE_POSIX" MYLIBS=""
6external/lua/lua -v
7
8# Run the check
9if ! ./external/lua/lua extras/check-ir-stable-names.lua check; then
10  echo "Check failed. Running update..."
11  ./external/lua/lua extras/check-ir-stable-names.lua update
12
13  echo -e "\n=== Diff of changes made ==="
14  git diff --color=always source/slang/slang-ir-insts-stable-names.lua || true
15
16  # Also create a summary for GitHub Actions
17  if [ -n "$GITHUB_STEP_SUMMARY" ]; then
18    {
19      echo "## IR Stable Names Table Update Required"
20      echo "The following changes need to be made to \`source/slang/slang-ir-insts-stable-names.lua\`:"
21      echo '```diff'
22      git diff source/slang/slang-ir-insts-stable-names.lua
23      echo '```'
24    } >>"$GITHUB_STEP_SUMMARY"
25  fi
26
27  # Fail the job since the check failed
28  exit 1
29fi