ci: fix YAML parse error — replace Python heredoc with shell grep
Neuron Soul CI / build (push) Failing after 47s

This commit is contained in:
2026-05-08 20:37:07 -05:00
parent 7db53ad0aa
commit 8906285692
+9 -20
View File
@@ -86,26 +86,15 @@ jobs:
- name: Generate ELP master declarations header
run: |
python3 - <<'PYEOF'
import os, re
dist = 'dist'
decls = set()
guard_pat = re.compile(r'^(el_val_t|void|int|char\*|const char\*)\s+\w+\s*\(')
for fn in sorted(os.listdir(dist)):
if not fn.endswith('.c'):
continue
with open(os.path.join(dist, fn)) as f:
for line in f:
line = line.rstrip()
if guard_pat.match(line) and line.endswith(';'):
decls.add(line)
header = ['/* Auto-generated C forward declarations for ELP cross-module calls */',
'#pragma once', '#include "el_runtime.h"', '']
header += sorted(decls)
with open(os.path.join(dist, 'elp-c-decls.h'), 'w') as f:
f.write('\n'.join(header) + '\n')
print(f"Generated elp-c-decls.h with {len(decls)} declarations")
PYEOF
{
printf '/* Auto-generated C forward declarations for ELP cross-module calls */\n'
printf '#pragma once\n'
printf '#include "el_runtime.h"\n'
printf '\n'
grep -h -E '^(el_val_t|void|int|char\*|const char\*)[[:space:]]+[a-zA-Z_][a-zA-Z0-9_]*[[:space:]]*\(' dist/*.c 2>/dev/null \
| grep ';$' | sort -u
} > dist/elp-c-decls.h
echo "Generated elp-c-decls.h with $(grep -c ';' dist/elp-c-decls.h 2>/dev/null || echo 0) declarations"
- name: Build neuron soul binary
run: |