Skip to content
Open
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
48 changes: 20 additions & 28 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $ uv run ty check
```

The check targets the minimum supported Python and includes the package,
tests, root fixtures, Sphinx configuration and extensions, and CI scripts.
tests, root fixtures, and Sphinx configuration and extensions.
CI also checks the matrix Python version with `--python-version`.

Test:
Expand Down Expand Up @@ -132,35 +132,27 @@ Include doctests in the watch loop:
$ uv run ptw . --now --doctest-modules
```

### Native tmux in CI

The test workflow builds the versions in its existing matrix. Stable
versions use the official release archives and SHA256 pins in
`.github/tmux-releases.toml`, including tmux 3.8. The selected release's
checksum is part of its cache identity. `master` resolves once to a commit and
fetches that exact commit. The build follows tmux's
[release and source-checkout instructions](https://github.com/tmux/tmux/blob/3.8/README#L23-L37).
Only the installed prefix is cached. Each build uses a fresh source tree
and up to four available processors.

Cache keys include the actual runner image and image version, architecture,
compiler and dependency versions, source identity, and build script.
Dependencies are installed before validation on hits and misses. Every
restored executable must match its recorded hash and version, start a
private daemon, and report the same connected version. A failed check
discards that job's prefix and rebuilds it.

The workflow saves a validated installation before library tests run.
GitHub caches are immutable: repairing an invalid exact hit fixes the
current job, but cannot overwrite that entry. A build-script change
invalidates its key for later jobs. Never add a broad restore-key fallback
for native binaries.

The CI scripts use the standard-library TOML reader, which Python 3.11
added. Run the cache regressions against an installed tmux:
### Native tmux in CI and local version testing

The test workflow installs each matrix `tmux` version with
[libtmux/setup-tmux](https://github.com/libtmux/setup-tmux) (`v0.1.0`),
using verified prebuilt binaries where published (`3.6a`–`3.8`,
excluding `3.7`) and cached static-`libevent` source builds for older
releases and `master`. Restored caches are validated before library tests
run.

For local testing against the same `tmux` version matrix alongside this
repository's `.tool-versions`, install
[libtmux/mise-tmux](https://github.com/libtmux/mise-tmux) (`v0.1.0`):

```console
$ mise plugins install tmux https://github.com/libtmux/mise-tmux
```

Run the suite against a specific release:

```console
$ uv run pytest .github/scripts/test_tmux_build.py --reruns=0
$ mise exec tmux@3.8 -- uv run pytest
```

## Debugging
Expand Down
180 changes: 0 additions & 180 deletions .github/scripts/test_tmux_build.py

This file was deleted.

Loading
Loading