From c1ecba06247e22b379546998217d6f165440bcf7 Mon Sep 17 00:00:00 2001 From: Harry Bayliss Date: Fri, 15 May 2026 19:38:13 +0100 Subject: [PATCH] Use mise to install zig + go in release CI; cut 0.0.4 `mlugg/setup-zig` was chasing mirrors for ~4 minutes on every run (see v0.0.1 / v0.0.2 logs) and `actions/setup-go` was spending another ~4 minutes downloading Go before patterm started building. mise already manages the project's zig pin; adding `go = "1.26.3"` to `.mise.toml` (matching go.mod) lets `jdx/mise-action@v2` install both with one cached step. Subsequent runs reuse the mise cache instead of re-resolving mirror URLs and re-downloading toolchains. Also adds an `actions/cache@v4` step for `~/.cache/go-build` and `~/go/pkg/mod` keyed on `go.sum` so `go build` itself doesn't re-pull modules every tag push. --- .gitea/workflows/release.yml | 13 +++++++++---- .mise.toml | 4 +++- CHANGELOG.md | 18 ++++++++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 3a783cc..5e73b70 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -11,14 +11,19 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: jdx/mise-action@v2 with: - go-version-file: go.mod cache: true - - uses: mlugg/setup-zig@v2 + - name: Cache Go modules + uses: actions/cache@v4 with: - version: 0.15.2 + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- - name: Build libghostty-vt run: make deps diff --git a/.mise.toml b/.mise.toml index 998f68d..1747575 100644 --- a/.mise.toml +++ b/.mise.toml @@ -3,6 +3,8 @@ # libghostty-vt is built from a pinned upstream Ghostty commit; that # commit's build.zig.zon pins minimum_zig_version = 0.15.2. We match # it here so contributors don't have to puzzle out the version from -# a deep upstream file. +# a deep upstream file. The go pin matches go.mod so CI and local +# builds use the same toolchain. [tools] zig = "0.15.2" +go = "1.26.3" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e85608..7dbdb7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,24 @@ loosely follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.0.4] - 2026-05-15 + +### Changed +- Release workflow (`.gitea/workflows/release.yml`) now provisions + Zig and Go through `jdx/mise-action@v2`, reading the versions from + `.mise.toml` (zig 0.15.2, go 1.26.3). Both toolchains were + previously installed via `mlugg/setup-zig` and `actions/setup-go`, + whose mirror chase / GitHub fetch combined for ~8 minutes per run + before any patterm code compiled. mise pulls each tool once and + caches the install dir, so subsequent runs hit the cache instead of + re-downloading. `make deps` still resolves zig via `mise which zig` + with a PATH fallback; `go.mod` already pinned `go 1.26.3`, so the + new `go` entry in `.mise.toml` just keeps CI and local builds on + the same toolchain. +- A Go module/build cache step (`actions/cache@v4`, keyed on + `go.sum`) was added so `go build` doesn't re-download dependencies + on every tag push. + ## [0.0.3] - 2026-05-15 ### Added