Compare commits

..
3 Commits
Author SHA1 Message Date
John O'Keefe a8df8dcce7 chore: ignore Task cache directory
Task (used by wails3 via Taskfile.yml) stores incremental-build fingerprints under .task/checksum/. Purely local cache — hashes of sources/deps, machine-generated, recreated on next wails3 dev/build. Keep it out of git like node_modules/frontend/dist/build/bin (already ignored). No files were tracked; this just stops it showing as untracked on branches that have run wails3.
2026-09-13 18:01:01 -04:00
John O'Keefe 2bf8d3887e fix(ci): track frontend lockfile for reproducible installs
Release / release (push) Successful in 2m42s
The blanket package-lock.json gitignore rule meant the frontend lockfile was never committed, so every release installed whatever the registry handed it (silent transitive drift) and setup-node npm caching failed outright with unable to cache dependencies. Scope the ignore rule to the repo root (/package-lock.json; no root package.json exists) and commit the freshly updated frontend lockfile: all deps at max in-range versions (autoprefixer 10.5.6 -> 10.6.0), majors intentionally deferred to the v3 frontend refresh. Verified with a green vite build before committing.
2026-09-12 22:40:21 -04:00
John O'Keefe efe45f39e7 ci(release): cache npm, Go build cache, and Wails CLI
Release / release (push) Failing after 11s
Release runs were fully cold every time: ~13s npm install, ~39s full cgo/WebKit compile, and ~34s rebuilding the Wails CLI from source on each tag. Now that the runner cache backend is reachable again, persist all three across runs. Expected total drops from ~3.5 min toward ~2.5 min with apt as the remaining floor.

- Set up Node: cache npm keyed on frontend/package-lock.json, so the npm install inside wails build stops fetching cold
- New Cache Go build cache step: setup-go only persists modules (GOMODCACHE); this persists compiled packages (GOCACHE) with a go.sum-hashed key plus a version-prefix restore-key fallback, turning the WebKit compile incremental from the second run on
- Wails CLI: split install into cache (key wails-v2.15.0-Linux, bump with the version pin), conditional go install on miss, and an unconditional PATH step so cache hits still land on PATH

First run after this still compiles cold (it saves); the payoff shows from the second run on. Verify with the throwaway-tag loop and compare Build Linux binary times.
2026-09-12 22:26:12 -04:00
3 changed files with 2751 additions and 2 deletions
+30 -1
View File
@@ -80,10 +80,27 @@ jobs:
go-version: '1.25' go-version: '1.25'
cache-dependency-path: go.sum cache-dependency-path: go.sum
- name: Cache Go build cache
uses: actions/cache@v4
with:
# setup-go only caches modules (GOMODCACHE). This caches compiled
# packages (GOCACHE) so the cgo/WebKit compile goes incremental.
# restore-keys gives a close cache instead of a cold one when
# go.sum changes. First run after adding this still compiles cold
# (it saves); the payoff shows from the second run on.
path: ~/.cache/go-build
key: go-build-1.25-${{ runner.os }}-${{ hashFiles('go.sum') }}
restore-keys: |
go-build-1.25-${{ runner.os }}-
- name: Set up Node - name: Set up Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '20' node-version: '20'
# Caches npm's download cache keyed on the frontend lockfile, so
# the `npm install` inside `wails build` stops fetching cold.
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install Wails Linux build dependencies - name: Install Wails Linux build dependencies
run: | run: |
@@ -94,11 +111,23 @@ jobs:
libgtk-3-dev libwebkit2gtk-4.1-dev \ libgtk-3-dev libwebkit2gtk-4.1-dev \
jq jq
- name: Cache Wails CLI
uses: actions/cache@v4
id: wails-cli
with:
# The compiled CLI binary. Bump the key whenever the @version pin
# below changes, or the old CLI will be silently reused.
path: ~/go/bin/wails
key: wails-v2.15.0-${{ runner.os }}
- name: Install Wails CLI - name: Install Wails CLI
if: steps.wails-cli.outputs.cache-hit != 'true'
run: | run: |
set -euo pipefail set -euo pipefail
go install github.com/wailsapp/wails/v2/cmd/wails@v2.15.0 go install github.com/wailsapp/wails/v2/cmd/wails@v2.15.0
echo "${HOME}/go/bin" >> "${GITHUB_PATH}"
- name: Add Go bin to PATH
run: echo "${HOME}/go/bin" >> "${GITHUB_PATH}"
- name: Write environment.go from secrets - name: Write environment.go from secrets
env: env:
+4 -1
View File
@@ -23,10 +23,13 @@ go.work
# ---> Wails # ---> Wails
build/bin build/bin
.task/
node_modules node_modules
frontend/dist frontend/dist
package.json.md5 package.json.md5
package-lock.json # Root-level lockfile only: the frontend lockfile IS tracked so CI installs
# are reproducible and setup-node's npm cache has something to hash.
/package-lock.json
.idea .idea
.env .env
environment.go environment.go
+2717
View File
File diff suppressed because it is too large Load Diff