- llembas-cli.version pins the LLeMbas CLI; scripts/fetch-cli.sh fetches it and checks SHA256SUMS against the release key before anything is bundled. - llembas/packaging/package.sh stages /usr/lib/llembas-tty (our three binaries and the CLI beside them), links, shell integration, desktop entry, icons and licences, and makes the .deb and the tarball. - .github/workflows/llembas-tty.yml: hygiene, the layer's tests, a release build, a headless smoke test of what was built, the packages, and on a v* tag the GitHub Release. WezTerm's workflow files are untouched; llembas/ci/disable-upstream-workflows.sh switches them off on our repository. - The window icon is the LLeMbas mark. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
121 lines
5.4 KiB
YAML
121 lines
5.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:
|
|
branches: [main, dev]
|
|
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: 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
|
|
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 bundled LLeMbas CLI, verified
|
|
run: scripts/fetch-cli.sh
|
|
- name: Build (release)
|
|
run: cargo 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: cargo 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 -x /usr/lib/llembas-tty/lembas
|
|
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/*
|