feat/init-ci #5

Open
clement wants to merge 13 commits from feat/init-ci into main
Owner
No description provided.
Document CI setup in README (EN + FR)
Some checks failed
ci / lint (pull_request) Has been cancelled
ci / test-rust (pull_request) Has been cancelled
ci / test-web (pull_request) Has been cancelled
10843df4a1
clement force-pushed feat/init-ci from 10843df4a1
Some checks failed
ci / lint (pull_request) Has been cancelled
ci / test-rust (pull_request) Has been cancelled
ci / test-web (pull_request) Has been cancelled
to a4b7db054a
Some checks failed
ci / lint (pull_request) Failing after 1m55s
ci / test-rust (pull_request) Failing after 5s
ci / test-web (pull_request) Failing after 1m3s
2026-08-08 10:15:09 +02:00
Compare
ci: drive workflow via devbox for a single toolchain source of truth
Some checks failed
ci / lint (pull_request) Failing after 1m13s
ci / test-rust (pull_request) Failing after 9s
ci / test-web (pull_request) Failing after 4s
11b81ca304
- Replace the bespoke rust:1.95-bookworm container + inline curl/apt
  installs of node/bun/taplo with jetify-com/devbox-install-action, so
  Rust / Bun / taplo / go-task versions come straight from devbox.json.
  Local dev and CI now share the exact same toolchain.
- Each job runs `devbox run -- task <lint|test:rust|test:web>` — the
  same commands developers run locally.
- Keep the cargo registry / target / bun store caches; add the built-in
  Nix store cache via `enable-cache: true` on the install action.
- Base image drops to node:22-bookworm across all jobs (needed only to
  execute Forgejo's JS actions — checkout, cache, upload-artifact).
- README + README.fr rewritten to document the devbox-driven pipeline.
ci: use full github URL for devbox-install-action
Some checks failed
ci / test-web (pull_request) Failing after 45s
ci / lint (pull_request) Failing after 9m17s
ci / test-rust (pull_request) Has been cancelled
4f1ae8273f
Forgejo Runner resolves bare `uses: owner/repo` through the mirror at
data.forgejo.org, which only carries the standard `actions/*` bundle.
`jetify-com/devbox-install-action` isn't mirrored, so the runner fails
with `data.forgejo.org/jetify-com/devbox-install-action not found`.

Prefixing the ref with `https://github.com/...` bypasses the proxy and
pulls the action straight from GitHub, matching the syntax Forgejo
documents for third-party actions.
ci: disable devbox Nix cache, workaround runner backend timeout
Some checks failed
ci / lint (pull_request) Failing after 9m19s
ci / test-rust (pull_request) Failing after 9m18s
ci / test-web (pull_request) Failing after 9m16s
8502f76122
The Forgejo Runner cache backend at 10.30.0.4:43657 is not reachable
from job containers on the current runner setup, and the devbox-install
action's cleanup path invokes `gh` (absent from node:22-bookworm), so
the ETIMEDOUT on save/restore crashes the whole action with exit 127.

Set `enable-cache: "false"` on the 3 install-devbox steps. The Nix
store re-downloads on each run (~1-2 min per job), but the cargo
registry / target / bun store caches — the ones that actually matter
for wall-clock — still go through actions/cache and work fine.

Reachability of the runner cache backend is a separate infra fix.
ci: point devbox-install-action to Forgejo-compat fork
Some checks failed
ci / lint (pull_request) Failing after 5s
ci / test-rust (pull_request) Failing after 4s
ci / test-web (pull_request) Failing after 3s
0d610362b7
Reference the local fork (clement/devbox-install-action@fix/forgejo-compat)
instead of the upstream action. The fork carries three patches that make
it work inside a Forgejo Runner container:

- CLI cache steps removed (actions/cache backend unreachable, ~9 min of
  ETIMEDOUT stalls avoided per job)
- Diagnostic `gh cache list` guarded on `command -v gh` (image lacks it)
- `sudo` conditional in the tar workaround steps (root container without
  sudo)

Also set `installer-init-system: "none"` so nix-installer skips the
systemd daemon setup that would fail in a plain container.
ci: retarget devbox-install-action to github-actions/ fork
Some checks failed
ci / test-rust (pull_request) Failing after 1m5s
ci / test-web (pull_request) Failing after 1m3s
ci / lint (pull_request) Failing after 15m57s
9f431a8239
The mutable fork lives at github-actions/devbox-install-action after the
mirror/fork swap on the Forgejo instance (github-actions-clones/ now
holds the read-only mirror). Update the three `uses:` refs accordingly.
ci: preempt bun-baseline install when runner CPU lacks AVX2
Some checks failed
ci / lint (pull_request) Failing after 16m33s
ci / test-rust (pull_request) Failing after 9m36s
ci / test-web (pull_request) Failing after 9m14s
4912d23c88
The bun binary that nixpkgs (and thus devbox) provides is the "modern"
build that requires AVX2 CPU instructions. Older runner CPUs SIGILL on
first invocation (exit 132), which surfaces as `bun install` failing
right after `Packages installed!`.

Add a step before every devbox install that checks /proc/cpuinfo for
AVX2. If the flag is missing, install bun via its official curl
installer (bun-v1.3.13, matching devbox.json) — the installer detects
the CPU and pulls the baseline variant automatically — and prepend
its bin dir to $GITHUB_PATH so it shadows the devbox binary in later
steps. When AVX2 is present, the devbox-provided bun is left alone.

Same step is added to lint, test-rust, and test-web (each of them
invokes bun through the shared Taskfile targets).
The workflow's bun-baseline preempt step installs bun via bun.com's
official installer into ~/.bun/bin and appends that dir to
$GITHUB_PATH, so subsequent runner steps see the baseline binary. But
`devbox run -- task ...` enters a Nix shell that PREPENDS the nix
store bins to PATH — devbox's modern bun wins the resolution, and
SIGILLs on CPUs lacking AVX2.

Set a top-level `env: PATH: "$HOME/.bun/bin:$PATH"` in the Taskfile so
every bun invocation inside a task looks in ~/.bun/bin first. When the
dir doesn't exist (regular local dev with only devbox), shell PATH
lookup silently skips it and falls back to devbox's bun.

Same mechanism now works for anyone on an older CPU running the tasks
locally — install bun via `curl -fsSL bun.com/install | bash` and it
overrides devbox's binary without any config change.
feat: enable cache
Some checks failed
ci / lint (pull_request) Failing after 15m17s
ci / test-rust (pull_request) Successful in 37m39s
ci / test-web (pull_request) Has been cancelled
004246ae8f
The previous `env: PATH: "$HOME/.bun/bin:$PATH"` was ineffective: Task
treats string env values as literals — no shell $var expansion — so
child processes received a PATH containing the literal string
"$HOME/.bun/bin:$PATH", which is not a valid directory list. Devbox's
nix-shell PATH remained the effective one, and the modern-build bun
from nixpkgs kept running (SIGILL on CPUs without AVX2 → exit 132).

Switch to Task's `sh:` mode for the env value so the shell resolves
$HOME and $PATH before Task exports them. `~/.bun/bin` now precedes
devbox's nix bins for every task command that invokes bun.
ci: switch to Forgejo's cache action fork
Some checks failed
ci / lint (pull_request) Failing after 15m49s
ci / test-rust (pull_request) Successful in 33m19s
ci / test-web (pull_request) Failing after 8m14s
8093e68d6d
actions/cache@v4 from data.forgejo.org is a straight mirror of the
upstream GitHub action. It gates every restore/save on a "GHES version
>= 3.5" probe that Forgejo cannot satisfy — the server has no such
header — so every cache step emits a warning and no-ops, leaving cargo
target + registry + bun store all cold on every run.

code.forgejo.org/actions/cache is Forgejo's maintained fork with that
check removed. It reads ACTIONS_CACHE_URL directly and talks to the
runner's cache backend — which is now reachable since
cache.external_server was set to http://172.17.0.1:43657 on the runner
side.

Also refresh the devbox-install-action comment: the previous rationale
cited the (now-fixed) 10.30.0.4:43657 unreachability. The real reason
to keep the nix store cache off is size — 6.8 GiB unpacked would
saturate the runner cache quota fast for negligible benefit vs cargo +
bun.
ci: resolve bun via a sh: var and target the fork's main branch
Some checks failed
ci / lint (pull_request) Successful in 15m36s
ci / test-rust (pull_request) Successful in 33m25s
ci / test-web (pull_request) Failing after 8m39s
c144024e83
Two independent fixes on top of the previous attempt:

- **Taskfile — inline bun resolution.** The earlier `env: PATH: {sh:
  ...}` at the top level did not survive the `devbox run -- task` chain
  (previous run kept SIGILLing at exit 132 on `bun install`). Devbox
  enters a Nix shell that prepends its own store bins to PATH, and
  Task's env-level override is either dropped or overridden by that
  shell. Replace the PATH trick with a `vars.BUN` computed via `sh:`
  that resolves once — `$HOME/.bun/bin/bun` if the baseline is
  installed, plain `bun` otherwise — then inject `{{.BUN}}` at every
  bun call site. This forces the absolute path into the argv passed to
  sh -c, so devbox's PATH can no longer win.

- **Cache action — target `@main`.** `code.forgejo.org/actions/cache@v4`
  still emitted the GHES-version warning on the last run, meaning that
  tag mirrors upstream unmodified. `@main` is where the Forgejo team's
  patches actually land — pointing there gets us the ACTIONS_CACHE_URL
  passthrough that skips the GHES probe.
Some checks failed
ci / lint (pull_request) Successful in 15m36s
ci / test-rust (pull_request) Successful in 33m25s
ci / test-web (pull_request) Failing after 8m39s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/init-ci:feat/init-ci
git switch feat/init-ci

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/init-ci
git switch feat/init-ci
git rebase main
git switch main
git merge --ff-only feat/init-ci
git switch feat/init-ci
git rebase main
git switch main
git merge --no-ff feat/init-ci
git switch main
git merge --squash feat/init-ci
git switch main
git merge --ff-only feat/init-ci
git switch main
git merge feat/init-ci
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
clement/GearTrack!5
No description provided.