Re-vendor the canonical files from sneak/prompts at 0653579 (closes #221)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
REPO_POLICIES.md, script/cibuild, script/docker, script/lint and script/test are their copies at that commit. In every Dockerfile stage the system package install and the Go module download now come before ARG CACHEBUST, so check builds keep those layers until the base image, the install line, go.mod or go.sum change. golangci-lint run also mounts golangci-lint's cache. The test phase and the build stage install their packages with apt-get and apk directly, as REPO_POLICIES.md now has them do, instead of through script/bootstrap --cgo. The test phase installs no recommended packages and names libheif's AVIF encoder, libheif-plugin-aomenc, which the tests use. Model: opus-5-5
This commit is contained in:
@@ -102,8 +102,8 @@ it uses libvips through CGO. pixad does not start unless libvips has its JPEG XL
|
||||
support, which on Alpine is the `vips-jxl` package and which the nix and brew
|
||||
packages of libvips include, as do the apt ones from Debian 12 and Ubuntu 24.04
|
||||
on. Building pixa also needs the development files of libvips and libheif,
|
||||
`pkg-config` and a C compiler. `script/bootstrap --cgo` installs all of these,
|
||||
as the `Dockerfile` does where it compiles pixa. Plain `script/bootstrap`, which
|
||||
`pkg-config` and a C compiler. `script/bootstrap --cgo` installs all of these;
|
||||
the `Dockerfile` installs its own packages. Plain `script/bootstrap`, which
|
||||
`script/setup` and `script/cibuild` run, installs git, make and Go, and Node,
|
||||
Yarn and the prettier pinned in `yarn.lock` for formatting the markdown, but
|
||||
none of the C libraries: the checks compile pixa in Docker. Docker itself must
|
||||
@@ -831,19 +831,24 @@ provide:
|
||||
`script/precommit`
|
||||
|
||||
Every `docker build` in these scripts passes a new value of the `CACHEBUST`
|
||||
build argument, which every stage of the `Dockerfile` declares first, so every
|
||||
`RUN` step, the lint and test phases included, runs on every build instead of
|
||||
coming from the build cache. Go's build cache is kept from build to build: the
|
||||
steps that compile mount it, so a package whose inputs are unchanged is not
|
||||
compiled again, and both `go test` runs pass `-count=1` so that no stored test
|
||||
result is replayed. The `test` phase runs on the Debian Go image, with Debian's
|
||||
libvips and libheif; the image pixa ships is built and runs on Alpine.
|
||||
`script/check`, `script/cibuild`, `script/docker`, `script/lint`, `script/test`,
|
||||
`script/setup` and `script/install-precommit` are the standard copies from
|
||||
`sneak/prompts`, kept identical to them. `script/fmt` and `script/fmt-check` are
|
||||
the standard copies with pixa's `gofmt` step kept before prettier. prettier
|
||||
formats the markdown only, not the HTML templates, as it cannot parse a Go
|
||||
template action inside a tag.
|
||||
build argument, which every stage of the `Dockerfile` declares, so every `RUN`
|
||||
step after that line, the lint and test steps included, runs on every build
|
||||
instead of coming from the build cache. Above the line are the steps that
|
||||
install system packages and download the Go modules; Docker keeps their layers
|
||||
until the base image, the step itself, `go.mod` or `go.sum` changes. Go's build
|
||||
cache is kept from build to build: the steps that compile mount it, so a package
|
||||
whose inputs are unchanged is not compiled again, and both `go test` runs pass
|
||||
`-count=1` so that no stored test result is replayed. The lint step also mounts
|
||||
golangci-lint's cache, which reuses a package's findings only when its files,
|
||||
those of the packages it imports, `go.mod`, `.golangci.yml` and the
|
||||
golangci-lint version are all unchanged. The `test` phase runs on the Debian Go
|
||||
image, with Debian's libvips and libheif; the image pixa ships is built and runs
|
||||
on Alpine. `script/check`, `script/cibuild`, `script/docker`, `script/lint`,
|
||||
`script/test`, `script/setup` and `script/install-precommit` are the standard
|
||||
copies from `sneak/prompts`, kept identical to them. `script/fmt` and
|
||||
`script/fmt-check` are the standard copies with pixa's `gofmt` step kept before
|
||||
prettier. prettier formats the markdown only, not the HTML templates, as it
|
||||
cannot parse a Go template action inside a tag.
|
||||
|
||||
## Load Test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user