Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/openwrt-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ jobs:
else
fail=1
fi
for script in ../../usr/share/pbr/*.uc; do
printf "compile-check %s ... " "${script##*/}"
if ucode -S -c -o /dev/null "$script" 2>&1; then
echo "ok"
else
fail=1
fi
done
exit $fail

- name: Run functional tests
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/ucode-syntax.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Compile every .uc file with the OLDEST ucode pbr must support. MANUAL ONLY.
#
# Newer ucode accepts everything older accepts, so a build that works on master
# says nothing about the routers people run. This gate is deliberately pointed
# at the old interpreter.
# A build that works on master says nothing about the routers people run, so
# this gate is deliberately pointed at the old interpreter. The opposite
# direction (code that only OLD ucode accepts, such as adjacent template
# literals since ucode fe9e2947) is caught by the lint step in
# openwrt-release.yml, which compiles against ucode master on every push.
#
# UCODE_REF is the ucode shipped by OpenWrt 25.12 (package version
# 2026.01.16~85922056). Bump it only when the oldest SUPPORTED OpenWrt release
Expand Down
9 changes: 5 additions & 4 deletions tests/check-ucode-syntax.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
#
# check-ucode-syntax.sh — compile every .uc file with a given ucode binary.
#
# Catches syntax that is too NEW for the oldest ucode pbr must support. Newer
# ucode accepts everything older accepts, so building against master proves
# nothing about the routers people actually run — point this at the OLDEST
# supported interpreter.
# Catches syntax that is too NEW for the oldest ucode pbr must support.
# Building against master proves nothing about the routers people actually
# run — point this at the OLDEST supported interpreter. Syntax that is too OLD
# for master (adjacent template literals since ucode fe9e2947) is caught by the
# lint step in .github/workflows/openwrt-release.yml instead.
#
# Usage: tests/check-ucode-syntax.sh [path-to-ucode] (default: ucode in PATH)
#
Expand Down
Loading