From 890628569243ecb5b4971a245d5e7e6324e8b825 Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Fri, 8 May 2026 20:37:07 -0500 Subject: [PATCH] =?UTF-8?q?ci:=20fix=20YAML=20parse=20error=20=E2=80=94=20?= =?UTF-8?q?replace=20Python=20heredoc=20with=20shell=20grep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yaml | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index f362847..670aa5a 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -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: |