~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

Releases build each target in a step of its own

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:release/per-target

What changes

release.yml builds the client one target a step, four steps in place of one, and publishes only the archives of the version it built. deploy/build-client.sh takes the targets to build after its out directory: with none, it empties the directory and builds all four as before (deploy/release.sh calls it so); with some, it builds only those, replacing their archives and leaving the others.

Why

0.12.0's release run, the first on ci.knotless.dev since releases moved there in d5fc02ed, was killed at 30 minutes in its build step, three targets done and the fourth compiling: ==> killed after 1800s. That runner's caches were cold, so each target compiled from nothing, some 13 minutes each, and the step's timeout: 60 can only shorten the runner's 30-minute --step-timeout on a push's run. 0.11.0's build already took 27.7 minutes. A target a step keeps each step near half the limit even cold, so a release published by the push that bumps the version does not depend on warm caches.

The publish glob names the version, target/client/knotless-<version>-*.tar.gz, since target/ is a cache and a passing run keeps what is under it; the first build step also clears target/client.

How it was checked

bash -n; an unknown target exits 2 naming it; with a stand-in cargo, building one target and then another leaves both archives, and building one again replaces only its own. The real build is left to the next release run.

Changeset: none

Shortcomings

The four steps still run one after another, so a cold release takes as long as before, some 55 minutes; only no single step outruns the limit.

Approved

This splits the release build into one step per target. deploy/build-client.sh now takes optional targets after the out directory. With none it empties the directory and builds all four, as before. With some it builds only those and replaces just their archives. I found nothing that must change.

  • Script: shift is safe with one argument. Unknown targets are rejected before any build starts. rustup target add covers only the targets asked for. The rm -rf of a target's own directory and archive makes a rebuild idempotent.
  • Workflow: the first step clears target/client, and the publish glob names the version, so stale archives in the cached target/ are not published. Each step keeps the ~/.done early exit.
  • Timeout: dropping timeout: 60 is harmless, since the body notes it could only shorten the runner's limit.
  • Checks: I did not read the runner results. The real build is untested, as the body says, and the next release run will show whether each step lands near 13 minutes.
Merged as 39fad98