Files
LLeMbas-TTY/.github/workflows/llembas-term.yml
T
HomerandClaude Fable 5.2 593df939b9
llembas-term / linux (push) Canceled after 0s
LLeMbas TTY is LLeMbas TERM: the names, what is carried over, three keys, and the keys LLeMbas IDE has too
The rename. Commands llembas-term, -gui, -mux-server, -setup; package llembas-term
(Replaces, Conflicts and Provides llembas-tty, so installing it removes the old one);
directories llembas-term; application id eu.llembas.term; the variables a pane sees
LLEMBAS_TERM…; the status record llembas-term-status=1, the input mark
llembas-term-input=1, the user variable llembas_term_status; the shell integration
llembas-term.sh; the workflow llembas-term.yml; every changed upstream block is marked
"LLeMbas TERM:". The terminal needs the engine's terminal contract 4 and says so in
words with an older CLI.

Carried over from the earlier name: the variables LLEMBAS_TTY… of a terminal that
started this one are dropped; a configuration file of the old name is read where it
is while there is none of the new, with a warning; command-history and
settings-chosen are copied once into a data directory that does not exist yet
(llembas-line::migrate); the set-up program prints the new line for an rc file that
has the old one.

Keys. Ctrl+Tab on the ask line switches the mode (the next tab anywhere else);
Ctrl+Shift+M and Ctrl+Alt+M open the lists of chat and autocomplete models, also
over the ask line, which then says the choice. In a pane where LLeMbas IDE says it
is in front (user variable llembas_ide=1) the chords both have are sent on to it as
the keyboard protocol's bytes and the terminal does nothing of its own; the
terminal's palette is also on Ctrl+Shift+Alt+P. The built-in configuration honours
the kitty keyboard protocol for a program that asks for it.

CI: the .deb is installed over the released llembas-tty 1.0.0-beta.5; keys are
pressed in a real window on Xvfb (not a gate).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 20:26:37 +00:00

164 lines
8.5 KiB
YAML

# LLeMbas TERM's own workflow: the one workflow in this repository that is ours. Every other
# file in this directory is WezTerm's, kept untouched so that merging upstream stays cheap; on
# our repository those are switched off in the Actions settings (llembas/README.md says how).
#
# On every push to main and dev, on a pull request, and by hand: the hygiene check, the LLeMbas
# layer's tests, a release build for Linux x86-64, the config crate's tests, a headless smoke
# test of what was built, the keys pressed in a real window on a display of its own, and the
# packages (kept as a build artefact), installed over the last package of the earlier name.
# On a signed tag vX.Y.Z or vX.Y.Z-beta.N: the same, and then the GitHub Release with the
# packages, SHA256SUMS and the tag message as its notes.
name: llembas-term
on:
push:
# round/**: a branch on which a round of work is built before it is merged into dev
branches: [main, dev, "round/**"]
tags: ["v*"]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: llembas-term-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
jobs:
linux:
runs-on: ubuntu-22.04
timeout-minutes: 120
permissions:
contents: write
env:
CARGO_INCREMENTAL: "0"
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v5
with:
# The whole history: the hygiene check reads what was added since the commit in
# UPSTREAM, and the build derives WezTerm's version from the newest commit.
fetch-depth: 0
# freetype, harfbuzz, libpng and zlib are built from deps/
submodules: recursive
- name: Nothing private in what this fork adds
run: scripts/hygiene.sh
- name: The tag names this version
if: startsWith(github.ref, 'refs/tags/v')
run: |
git fetch --force origin "refs/tags/$GITHUB_REF_NAME:refs/tags/$GITHUB_REF_NAME"
version="$(tr -d '[:space:]' < VERSION)"
[ "v$version" = "$GITHUB_REF_NAME" ] || { echo "VERSION says $version, the tag is $GITHUB_REF_NAME" >&2; exit 1; }
- name: Tools for the checks
run: |
sudo apt-get update
sudo apt-get install -y lua5.4 luajit zsh shellcheck yamllint desktop-file-utils appstream xvfb xdotool
- name: The LLeMbas layer's tests (Lua 5.4 and LuaJIT)
run: scripts/test-lua.sh --all
- name: The shell integration's status record (bash and zsh, each on a terminal of its own)
run: llembas/tests/shell-test.sh
- name: Shell scripts, the workflow, the desktop file
run: |
shellcheck scripts/*.sh llembas/packaging/*.sh llembas/tests/*.sh llembas/ci/*.sh \
llembas/shell/llembas-term.sh llembas/shell/autocomplete.bash llembas/setup/llembas-term-setup
zsh -n llembas/shell/autocomplete.zsh
zsh -n llembas/shell/llembas-term.sh
yamllint -d '{extends: default, rules: {line-length: disable, document-start: disable, truthy: disable}}' .github/workflows/llembas-term.yml
desktop-file-validate llembas/packaging/eu.llembas.term.desktop
appstreamcli validate --no-net llembas/packaging/eu.llembas.term.appdata.xml || true
- name: System libraries
run: env CI=yes ./get-deps
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
# Upstream's code is not held to "no warnings" here; the action's default would be.
rustflags: ""
- name: The set-up program (what it installs is checked against the release key)
run: llembas/tests/setup-test.sh
- name: Tests of the line logic (the ask line's editor, the input line, history, suggestions, colours)
# first of the Rust steps: it has no dependencies, so a mistake in it is known in a minute
run: llembas/ci/cargo-annotated.sh test --locked -p llembas-line
- name: Build (release)
# also when the line logic's tests failed: one run then says both what they found and
# whether the terminal compiles (the steps after this one still stop at a failure)
if: ${{ !cancelled() }}
# through the wrapper: a compiler error is then an annotation on the run as well
run: llembas/ci/cargo-annotated.sh build --release --locked -p wezterm -p wezterm-gui -p wezterm-mux-server
- name: The binaries carry our names
run: |
ls -l target/release/llembas-term target/release/llembas-term-gui target/release/llembas-term-mux-server
target/release/llembas-term --version
- name: Tests of the configuration crate (where the layer is built in)
run: llembas/ci/cargo-annotated.sh test --release --locked -p config
- name: Smoke test, headless
run: llembas/tests/smoke.sh target/release
- name: Keys pressed in a real window (Xvfb) reach LLeMbas IDE's pane told apart
# Not a gate: a runner without a software OpenGL cannot make the window at all, and
# says so (status 2). What it found is an annotation on the run either way.
continue-on-error: true
run: llembas/tests/keys-gui.sh target/release
- name: Package (.deb and tarball)
run: llembas/packaging/package.sh target dist
- name: The .deb installs, runs and is removed cleanly
run: |
sudo apt-get install -y ./dist/llembas-term_*.deb
llembas-term --version
test ! -e /usr/lib/llembas-term/lembas
llembas-term-setup --dry-run
llembas/tests/smoke.sh /usr/lib/llembas-term
sudo apt-get remove -y llembas-term
test ! -e /usr/bin/llembas-term
- name: The .deb takes the place of the package of the earlier name (llembas-tty 1.0.0-beta.5)
run: |
old=llembas-tty_1.0.0-beta.5_amd64.deb
mkdir -p upgrade
curl -fsSL --retry 3 -o "upgrade/$old" "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/download/v1.0.0-beta.5/$old"
sudo apt-get install -y "./upgrade/$old"
llembas-tty --version
sudo apt-get install -y ./dist/llembas-term_*.deb
# the old package is gone (at most its /etc/profile.d file is left, until purged) ...
state="$(dpkg-query -W -f='${db:Status-Abbrev}' llembas-tty 2>/dev/null || true)"
case "$state" in ii*) echo "::error title=upgrade::llembas-tty is still installed ($state)"; exit 1 ;; esac
for f in /usr/bin/llembas-tty /usr/bin/llembas-tty-gui /usr/bin/llembas-tty-mux-server /usr/bin/llembas-tty-setup /usr/lib/llembas-tty /usr/share/llembas-tty; do
if [ -e "$f" ]; then echo "::error title=upgrade::$f is still there after the upgrade"; exit 1; fi
done
# ... and the new one is whole and runs
dpkg-query -W -f='${db:Status-Abbrev} ${Package} ${Version}\n' llembas-term
llembas-term --version
llembas-term-mux-server --version
llembas-term-gui --version
llembas-term-setup --dry-run
llembas/tests/smoke.sh /usr/lib/llembas-term
sudo apt-get purge -y llembas-term
sudo dpkg --purge llembas-tty
test ! -e /etc/profile.d/llembas-tty.sh
test ! -e /etc/profile.d/llembas-term.sh
- name: SHA256SUMS
run: |
cd dist
version="$(tr -d '[:space:]' < ../VERSION)"
# Written beside the folder first: inside it, the glob would list SHA256SUMS itself.
{ echo "# llembas-term $version"; sha256sum -- *; } > ../SHA256SUMS
mv ../SHA256SUMS .
cat SHA256SUMS
- uses: actions/upload-artifact@v4
with:
name: llembas-term-linux-x86_64
path: dist/*
retention-days: 14
- name: Publish the GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ github.token }}
run: |
version="$(tr -d '[:space:]' < VERSION)"
git tag -l --format='%(contents)' "$GITHUB_REF_NAME" | sed '/-----BEGIN SSH SIGNATURE-----/,$d' > notes.md
# A version is released once: a fix is a new version, never the old one re-released.
if gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
echo "A release for $GITHUB_REF_NAME exists already. Release the fix as a new version." >&2
exit 1
fi
pre=()
case "$version" in *-*) pre=(--prerelease) ;; esac
gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --verify-tag "${pre[@]}" \
--title "LLeMbas TERM $version" --notes-file notes.md dist/*