llembas-tty / linux (push) Failing after 38s
The ask key turns the row of the cursor into a line for a question to LLeMbas: a prefix naming the model and the mode, and a small line editor of the terminal's own (insert, delete, word motions, paste, earlier questions). Enter hands the line to the layer as its event; Escape or the key again leaves it. Nothing typed there reaches the shell, and nothing is written to the pane: it is an overlay over the pane, as the terminal's search and quick select are, drawing the pane's own lines with the one row replaced. - llembas/line: a crate of its own with no dependencies for what is decided about a line of text - the editor, the shell's input line as read from the screen's cells, the terminal's own command history, suggestions, and the parts of a command line for its colours - with its tests. The last four are used by what comes next. - wezterm-gui/src/llembas: the thin part between that and the terminal, and wezterm.llembas through which the Lua layer asks for it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
132 lines
6.4 KiB
YAML
132 lines
6.4 KiB
YAML
# LLeMbas TTY'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, and the packages (kept as a build artefact).
|
|
# 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-tty
|
|
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-tty-${{ 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
|
|
- 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-tty.sh llembas/shell/autocomplete.bash llembas/setup/llembas-tty-setup
|
|
zsh -n llembas/shell/autocomplete.zsh
|
|
zsh -n llembas/shell/llembas-tty.sh
|
|
yamllint -d '{extends: default, rules: {line-length: disable, document-start: disable, truthy: disable}}' .github/workflows/llembas-tty.yml
|
|
desktop-file-validate llembas/packaging/eu.llembas.tty.desktop
|
|
appstreamcli validate --no-net llembas/packaging/eu.llembas.tty.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-tty target/release/llembas-tty-gui target/release/llembas-tty-mux-server
|
|
target/release/llembas-tty --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: 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-tty_*.deb
|
|
llembas-tty --version
|
|
test ! -e /usr/lib/llembas-tty/lembas
|
|
llembas-tty-setup --dry-run
|
|
llembas/tests/smoke.sh /usr/lib/llembas-tty
|
|
sudo apt-get remove -y llembas-tty
|
|
- 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-tty $version"; sha256sum -- *; } > ../SHA256SUMS
|
|
mv ../SHA256SUMS .
|
|
cat SHA256SUMS
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: llembas-tty-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 TTY $version" --notes-file notes.md dist/*
|