A light deploy job, on a core whose gate does not depend on its machine
Build, test, deploy / site (push) Successful in 9m10s

The deploy server is a slow container with other work to do. Its job ran
core's tests, which failed there (no C compiler, no ICU, limits written
for a fast machine), so nothing was published.

- pixi run ci, which the deploy job runs, is the site's tests and core's
  mojo-status-strict at the pinned commit. Core's own tests and
  everything that builds Mojo are core's gate, on a runner of its own;
  pixi run core-test stays for moving the pointer.
- The workflow and docs/deploy.md describe the runner as it is: a new
  container for every job, not a host shell.
- core moves to b10a5c8: a pinned C compiler for the Mojo compiler to
  link with, a Dafny that starts without ICU, time limits at the
  machine's pace, and a prover whose time on the clock is the caller's
  (the Prove tab keeps its 3 seconds).
This commit is contained in:
alexm committed 2026-11-13 06:14:46 -05:00
1 parent e092cb029c
commit 3ebf2e2203
6 files changed
+36 -41

No files matched your search

+16 -13
View File
@@ -1,9 +1,12 @@
# Programming+ on Gitea Actions, with a runner that has no container image: the act_runner runs jobs directly on # Programming+ on Gitea Actions. The runner's label `quarto-deploy` names a container image (Node, git, rsync, curl,
# the droplet's shell ("host mode"). docs/deploy.md has the runner's setup, once. # Quarto, pixi) with the droplet's /srv/www bound in, and every job gets a new container: nothing is kept between
# jobs, and everything else the job needs comes from pixi.lock. docs/deploy.md says what the job needs of a runner.
# #
# Every push and pull request runs `pixi run ci`, the same task a developer runs, in the environment pixi.lock pins # Every push and pull request runs `pixi run ci` in the environment pixi.lock pins (Node, Python, pandoc, Mojo):
# (Node, Python, pandoc, Mojo): every test of the site (the Quarto ones fail, not skip, without pandoc), and core's # every test of the site (the Quarto ones fail, not skip, without pandoc), and core's mojo-status-strict at the
# tests and mojo-status-strict at the pinned commit. A push to main also checks the chain of pointers # pinned commit. The job is kept light on purpose: the runner is a server with other work. Core's own tests and
# everything that builds Mojo are core's gate, which runs on another runner (core's docs/ci.md); a developer runs
# `pixi run core-test` before moving the pointer. A push to main also checks the chain of pointers
# (`pixi run release-check`) and publishes the site to /srv/www/<slug> as an atomic release (scripts/deploy.sh). # (`pixi run release-check`) and publishes the site to /srv/www/<slug> as an atomic release (scripts/deploy.sh).
# #
# On GitHub Actions the build and test steps run with one change, `runs-on: ubuntu-latest`; the publish step needs # On GitHub Actions the build and test steps run with one change, `runs-on: ubuntu-latest`; the publish step needs
@@ -26,15 +29,15 @@ concurrency:
env: env:
# set by Gitea and GitHub Actions already; written here so the tests' "fail, not skip, under CI" never depends on it # set by Gitea and GitHub Actions already; written here so the tests' "fail, not skip, under CI" never depends on it
CI: "true" CI: "true"
# the pixi that reads pixi.lock; when the host has another version, this one is fetched into the cache below # the pixi that reads pixi.lock; when the runner has another version, this one is fetched into the cache below
PIXI_VERSION: "0.83.0" PIXI_VERSION: "0.83.0"
jobs: jobs:
site: site:
# a pull request runs only from a branch of this repository: on a host runner a fork's workflow would run its # a pull request runs only from a branch of this repository: a fork's workflow would run its own code in a
# own code on the droplet (docs/deploy.md in pplus-web). Drop this line for a runner that is a throwaway VM. # container that can write the droplet's web root (docs/deploy.md). Drop this line for a runner that cannot.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
# The host-mode label from the runner registration. Jobs run as the runner's user, in a fresh working directory. # The label from the runner registration: on this runner a container image, new for every job.
runs-on: quarto-deploy runs-on: quarto-deploy
timeout-minutes: 60 timeout-minutes: 60
steps: steps:
@@ -44,14 +47,14 @@ jobs:
with: with:
submodules: recursive submodules: recursive
# pixi: the host's when it is the pinned version, else the pinned release, fetched once into a cache directory # pixi: the image's when it is the pinned version, else the pinned release, fetched into a cache directory
# the runner's user owns (no sudo), checked by SHA-256 # (which lasts only where the runner keeps a home between jobs) and checked by SHA-256
- name: pixi, pinned - name: pixi, pinned
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
if command -v pixi >/dev/null && [ "$(pixi --version | cut -d' ' -f2)" = "$PIXI_VERSION" ]; then if command -v pixi >/dev/null && [ "$(pixi --version | cut -d' ' -f2)" = "$PIXI_VERSION" ]; then
echo "pixi $PIXI_VERSION is on the host: $(command -v pixi)"; exit 0 echo "pixi $PIXI_VERSION is on the PATH: $(command -v pixi)"; exit 0
fi fi
dir="${PPLUS_CI_CACHE:-$HOME/.cache/pplus-ci}/pixi-$PIXI_VERSION" dir="${PPLUS_CI_CACHE:-$HOME/.cache/pplus-ci}/pixi-$PIXI_VERSION"
if [ ! -x "$dir/pixi" ]; then if [ ! -x "$dir/pixi" ]; then
@@ -71,7 +74,7 @@ jobs:
- name: The pinned environment, exactly as pixi.lock has it - name: The pinned environment, exactly as pixi.lock has it
run: pixi install --locked run: pixi install --locked
# every test of the site; core's tests and mojo-status-strict at the pinned commit (pixi.toml) # every test of the site, and core's mojo-status-strict at the pinned commit (pixi.toml)
- name: pixi run ci - name: pixi run ci
run: pixi run ci run: pixi run ci
+3
View File
@@ -16,6 +16,9 @@ No version has been tagged yet. What programs mean is pplus-core's, and its chan
- Below 700px a workspace shows one part at a time; every page has a main landmark and a heading, and the contrast findings are fixed. - Below 700px a workspace shows one part at a time; every page has a main landmark and a heading, and the contrast findings are fixed.
- The Quarto extension's syntax definitions state their license as Apache-2.0 (they said MIT), and `THIRD_PARTY.md` says that the stylesheets and syntax definitions that came from the course are under this repository's copyright and license. - The Quarto extension's syntax definitions state their license as Apache-2.0 (they said MIT), and `THIRD_PARTY.md` says that the stylesheets and syntax definitions that came from the course are under this repository's copyright and license.
- The deploy job is light: it runs the site's tests and core's `mojo-status-strict` at the pinned commit, then publishes. It no longer runs core's own tests (15 to 22 minutes on the deploy server, where they also failed for want of a C compiler and for the server's speed, so the site was not published). Core's tests and everything that builds Mojo are core's gate, on a runner of its own; run `pixi run core-test` before moving the pointer. `docs/deploy.md` and the workflow describe the runner as it is, a new container for every job, not a host shell.
- The site runs on a pplus-core whose gate does not depend on the machine: a pinned C compiler for the Mojo compiler to link with, a Dafny that starts without ICU, and a prover whose time on the clock is the caller's (the Prove tab keeps its 3 seconds).
### Added ### Added
- `THIRD_PARTY.md`, with the copyright notice of every package bundled into the editor, and a test that holds it to the bundle, the copied stylesheets, the fonts and the locks. - `THIRD_PARTY.md`, with the copyright notice of every package bundled into the editor, and a test that holds it to the bundle, the copied stylesheets, the fonts and the locks.
+2 -2
View File
@@ -35,7 +35,7 @@ Every command is a pixi task (`pixi task list` shows them with their description
| **Build and test the site** | | | **Build and test the site** | |
| `install` | Install TypeScript, the only npm dependency | | `install` | Install TypeScript, the only npm dependency |
| `core-build` | Build pplus-core (`core/`) into `core/dist/`, which the site imports as `#core/` | | `core-build` | Build pplus-core (`core/`) into `core/dist/`, which the site imports as `#core/` |
| `core-test` | Run pplus-core's own tests | | `core-test` | Run pplus-core's own tests at the pinned commit, before moving the pointer (the deploy job does not run them) |
| `core-status` | Core's `mojo-status-strict` at the pinned commit: no Mojo program of ours fails (offline) | | `core-status` | Core's `mojo-status-strict` at the pinned commit: no Mojo program of ours fails (offline) |
| `build` | Build core, then compile `src/` to `dist/` | | `build` | Build core, then compile `src/` to `dist/` |
| `watch` | Rebuild `dist/` on every change | | `watch` | Rebuild `dist/` on every change |
@@ -49,7 +49,7 @@ Every command is a pixi task (`pixi task list` shows them with their description
| `quarto-engine <dir>` | Copy a built Programming+ and core into a site's `_extensions/pplus/engine`, for the rendered views ([quarto/README.md](quarto/README.md)) | | `quarto-engine <dir>` | Copy a built Programming+ and core into a site's `_extensions/pplus/engine`, for the rendered views ([quarto/README.md](quarto/README.md)) |
| `quarto-example` | Render the example site in `quarto/example`, every shortcode on real pages (needs Quarto) | | `quarto-example` | Render the example site in `quarto/example`, every shortcode on real pages (needs Quarto) |
| **Ship** ([docs/deploy.md](docs/deploy.md)) | | | **Ship** ([docs/deploy.md](docs/deploy.md)) | |
| `ci` | What CI runs: every test of the site, against the pinned core | | `ci` | What the deploy job runs before it publishes: every test of the site, and core's `mojo-status-strict` at the pinned commit |
| `release-check` | Is the chain web → core → library consistent: each pointer checked out, clean and on its pushed branch, generated files current, Mojo pinned alike | | `release-check` | Is the chain web → core → library consistent: each pointer checked out, clean and on its pushed branch, generated files current, Mojo pinned alike |
| `release-bump` | After a change in `core/library` or `core`: move the pointers bottom up, regenerate, run each gate, print what to push in order (`--commit` commits; nothing pushes) | | `release-bump` | After a change in `core/library` or `core`: move the pointers bottom up, regenerate, run each gate, print what to push in order (`--commit` commits; nothing pushes) |
| `site` | Test, then assemble `site/` | | `site` | Test, then assemble `site/` |
+1 -1
Submodule core updated: 401084bab3...b10a5c87a3.
+11 -22
View File
@@ -2,7 +2,7 @@
The site builds against pplus-core, the git submodule `core/`, at the commit this repository pins. A checkout needs it (`git clone --recurse-submodules`, or `git submodule update --init`); `npm run build` builds core first. To take a newer core: `git -C core pull` (or check out a tag), `pixi run test`, and commit the new `core` pointer with what it changes on this side. The site builds against pplus-core, the git submodule `core/`, at the commit this repository pins. A checkout needs it (`git clone --recurse-submodules`, or `git submodule update --init`); `npm run build` builds core first. To take a newer core: `git -C core pull` (or check out a tag), `pixi run test`, and commit the new `core` pointer with what it changes on this side.
`pixi run site` tests the app and assembles `site/`; `pixi run deploy [slug] [user@host]` does that and publishes it. CI (`.gitea/workflows/deploy.yml`) runs `pixi run ci` on every push and pull request, and on a push to `main` checks the chain of pointers (`pixi run release-check`), assembles and publishes. `pixi run site` tests the app and assembles `site/`; `pixi run deploy [slug] [user@host]` does that and publishes it. CI (`.gitea/workflows/deploy.yml`) runs `pixi run ci` (the site's tests and core's `mojo-status-strict`) on every push and pull request, and on a push to `main` checks the chain of pointers (`pixi run release-check`), assembles and publishes.
The site is seven things: `index.html`, `styles.css`, `fonts/` (IBM Plex, served by the site so a visit asks no font host for anything; `fonts/README.md` says where the files came from), `styles/` (the course's widget styles, which the Hardware area's machine views use), `dist/`, `core/` (pplus-core's built `core/dist/`, which `index.html`'s import map names as `#core/`), and the Quarto extension (`quarto/_extensions/pplus`, without an engine copy), which the With Quarto page loads (`pplus.css`, `pplus.js`) and links to file by file. `scripts/assemble.sh` copies them into `site/` with a `VERSION` file holding the commit, a `build.json` naming the three commits the site was built from (below), and the license and notices (`LICENSE.md`, `NOTICE.md`, `THIRD_PARTY.md`, which the footer links), then `scripts/assemble-page.mjs` adds two things to `site/index.html`: the commit as `<meta name="pplus-version">`, which the footer shows, and a `<link rel="modulepreload">` for every module the page's imports reach, after the import map, so a first visit asks for all of them at once instead of one level of imports at a time (`tests/load.test.mjs` holds the list to the import graph and the inline scripts to their hashes). And `scripts/deploy.sh <slug> [user@host]` publishes `site/` to `/srv/www/<slug>` as an atomic release: The site is seven things: `index.html`, `styles.css`, `fonts/` (IBM Plex, served by the site so a visit asks no font host for anything; `fonts/README.md` says where the files came from), `styles/` (the course's widget styles, which the Hardware area's machine views use), `dist/`, `core/` (pplus-core's built `core/dist/`, which `index.html`'s import map names as `#core/`), and the Quarto extension (`quarto/_extensions/pplus`, without an engine copy), which the With Quarto page loads (`pplus.css`, `pplus.js`) and links to file by file. `scripts/assemble.sh` copies them into `site/` with a `VERSION` file holding the commit, a `build.json` naming the three commits the site was built from (below), and the license and notices (`LICENSE.md`, `NOTICE.md`, `THIRD_PARTY.md`, which the footer links), then `scripts/assemble-page.mjs` adds two things to `site/index.html`: the commit as `<meta name="pplus-version">`, which the footer shows, and a `<link rel="modulepreload">` for every module the page's imports reach, after the import map, so a first visit asks for all of them at once instead of one level of imports at a time (`tests/load.test.mjs` holds the list to the import graph and the inline scripts to their hashes). And `scripts/deploy.sh <slug> [user@host]` publishes `site/` to `/srv/www/<slug>` as an atomic release:
@@ -15,32 +15,21 @@ The swap is one rename, so nobody sees a half-copied site, and a rollback is `ln
**Caddy**: [`Caddyfile`](Caddyfile) is the site block (root on the symlink, `file_server`, a missing path that looks like a page sent to `/` (the app's routes are after the `#`, and the page names its files relative to itself, so it cannot be served in place at a deeper path) while a missing file is a plain 404, and caching: `no-cache` on the page, the modules and the stylesheets, so the browser asks again on every load and gets a bodiless 304 while a file is unchanged; 30 days on the fonts, which change only when `fonts/` is replaced; `no-store` on `VERSION`; nothing is `immutable`, since no file name here changes with its content; the license and notices are served as plain text) and a snippet of security headers it imports: a Content-Security-Policy (everything from the site itself, the two inline scripts of `index.html` by their hashes, `connect-src` open only to godbolt.org for Compile & run, and `frame-ancestors` so course pages can embed views), `Referrer-Policy: no-referrer`, `X-Content-Type-Options: nosniff`, and a `Permissions-Policy` that turns off the camera, microphone, location, payments and USB. `tests/csp.test.mjs` fails when an inline script of `index.html` changes without its hash, or when the page names another origin; a new backend for Compile & run needs its origin in `connect-src`. The live shortcodes and `live="click"` put the app in an iframe, so a Quarto site on another origin needs that origin added to `frame-ancestors`; the rendered views need nothing from the host. Caddy issues the certificate itself; add the block to `/etc/caddy/Caddyfile` and `systemctl reload caddy`. The tests read the file as text; `pixi run caddy-check` serves an assembled `site/` with a real Caddy under it (localhost, plain HTTP) and holds the headers, the caching and both missing-path answers. Run it after changing the Caddyfile. **Caddy**: [`Caddyfile`](Caddyfile) is the site block (root on the symlink, `file_server`, a missing path that looks like a page sent to `/` (the app's routes are after the `#`, and the page names its files relative to itself, so it cannot be served in place at a deeper path) while a missing file is a plain 404, and caching: `no-cache` on the page, the modules and the stylesheets, so the browser asks again on every load and gets a bodiless 304 while a file is unchanged; 30 days on the fonts, which change only when `fonts/` is replaced; `no-store` on `VERSION`; nothing is `immutable`, since no file name here changes with its content; the license and notices are served as plain text) and a snippet of security headers it imports: a Content-Security-Policy (everything from the site itself, the two inline scripts of `index.html` by their hashes, `connect-src` open only to godbolt.org for Compile & run, and `frame-ancestors` so course pages can embed views), `Referrer-Policy: no-referrer`, `X-Content-Type-Options: nosniff`, and a `Permissions-Policy` that turns off the camera, microphone, location, payments and USB. `tests/csp.test.mjs` fails when an inline script of `index.html` changes without its hash, or when the page names another origin; a new backend for Compile & run needs its origin in `connect-src`. The live shortcodes and `live="click"` put the app in an iframe, so a Quarto site on another origin needs that origin added to `frame-ancestors`; the rendered views need nothing from the host. Caddy issues the certificate itself; add the block to `/etc/caddy/Caddyfile` and `systemctl reload caddy`. The tests read the file as text; `pixi run caddy-check` serves an assembled `site/` with a real Caddy under it (localhost, plain HTTP) and holds the headers, the caching and both missing-path answers. Run it after changing the Caddyfile.
**Gitea Actions without a container image** (`.gitea/workflows/deploy.yml`, and pplus-core's and pplus-library's `.gitea/workflows/`): the act_runner on the droplet runs jobs on the host shell instead of in docker. Once, on the droplet: **Gitea Actions** (`.gitea/workflows/deploy.yml`): the deploy job runs on the label `quarto-deploy`. On the droplet's runner that label is a container image (`infra/quarto-deploy` on the same Gitea: Node, git, rsync, curl, Quarto and a pixi) with the droplet's `/srv/www` bound into it. A job gets a new container and runs in it as root; nothing it writes outside `/srv/www` is there for the next job. The image is general on purpose, so everything else the job needs comes from `pixi.lock`:
```bash
# tools the jobs use: git and node for actions/checkout, curl, tar and sha256sum to fetch the pinned pixi,
# rsync for SSH deploys, a C compiler for the C references core's library-check builds
apt install -y git rsync curl tar coreutils build-essential
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && apt install -y nodejs # any node >= 20, for actions/checkout
# a user for the runner that owns the web root
useradd -m -s /bin/bash deploy
mkdir -p /srv/www && chown deploy:deploy /srv/www
# register the runner with a host-mode label (the :host suffix is the whole trick)
sudo -u deploy act_runner register --instance https://<your-gitea> --token <runner token> --labels "quarto-deploy:host" --no-interactive
# run it as a service (act_runner generate-config > config.yaml; systemd unit per the Gitea docs, User=deploy)
```
With that label, `runs-on: quarto-deploy` executes steps directly as `deploy`. Every job then does what a developer does:
1. `actions/checkout` with `submodules: recursive` (the job's token must be able to read pplus-core and pplus-library while they are private); 1. `actions/checkout` with `submodules: recursive` (the job's token must be able to read pplus-core and pplus-library while they are private);
2. **pixi**, at the version `PIXI_VERSION` names in the workflow: the host's when it is that version, else the release fetched once into `~deploy/.cache/pplus-ci/pixi-<version>/`, checked by SHA-256. Nothing needs installing for it; to have it on the host anyway, as `deploy`: `curl -fsSL https://pixi.sh/install.sh | PIXI_VERSION=v0.83.0 bash`; 2. **pixi**, at the version `PIXI_VERSION` names in the workflow: the image's when it is that version, else that release from GitHub, checked by SHA-256 (on this runner, every job);
3. `pixi install --locked`: Node, Python, pandoc and the Mojo compiler, exactly as `pixi.lock` has them (the package cache in `~deploy/.cache/rattler` keeps about 2 GB after the first run); 3. `pixi install --locked`: Node, Python, pandoc and the Mojo compiler, exactly as `pixi.lock` has them. With no cache between jobs the whole environment is downloaded each time;
4. `pixi run ci`: every test of the site (the Quarto ones run in pandoc and fail, not skip, if it is missing), and core's tests and `mojo-status-strict` at the pinned commit; 4. `pixi run ci`: every test of the site (the Quarto ones run in pandoc and fail, not skip, if it is missing), and core's `mojo-status-strict` at the pinned commit (offline, a second);
5. on `main`: `pixi run release-check`, `scripts/assemble.sh`, and `scripts/deploy.sh` into `/srv/www`. 5. on `main`: `pixi run release-check`, `scripts/assemble.sh`, and `scripts/deploy.sh` into `/srv/www`.
`SITE_SLUG` (repository variable) names the directory and defaults to the repository name; set it to `pplus`. `SITE_URL` turns on a smoke test that fetches `/VERSION` from the live site and fails the job if it is not the deployed commit. pplus-core's workflows (its `docs/ci.md`) use the same runner and also keep the pinned Dafny and the Mojo build answers in `~deploy/.cache/pplus-ci/core-tools`; the runner takes one job at a time (the default `capacity: 1`), which those caches assume. On GitHub Actions the build and test steps run unchanged with `runs-on: ubuntu-latest`; publishing needs the droplet. **The deploy job is light on purpose.** The droplet is a server with other work, and slow: the site's tests take 2.5 minutes there (half a minute on a workstation), and core's tests, which the job ran until November 2026, took 15 to 22. So the job holds the site to its own tests and to core's stored compiler answers, and nothing in it builds a Mojo program. Core's tests, `library-check`, `mojo-local` and the fuzzers are pplus-core's gate (`pixi run ci` there), which runs on a second runner with the label `heavy` (core's `docs/ci.md` has its setup) and on a developer's machine. Before moving the `core` pointer, run `pixi run core-test` here, or let `pixi run release-bump` run core's gate (below): the deploy job will not catch a core that fails its own tests.
**Once the repositories are public**, a pull request from a fork runs its own workflow file and code on this runner, as `deploy`, which can write `/srv/www`. Run pull requests only from branches of the repository itself (each workflow's job has an `if:` that does that), or require approval for fork runs in Gitea's repository settings where the version offers it, or give pull requests a separate runner that cannot write the web root. What the runner has to bring is small: git and Node (for `actions/checkout`), bash, curl, tar, `sha256sum`, and a `/srv/www` the job can write (or rsync and SSH to the machine that has it, below). The same workflow runs on a runner in host mode (a label registered as `quarto-deploy:host`: steps run on the machine's own shell as the runner's user, which then needs those tools and write access to `/srv/www`); there pixi's package cache and the fetched pixi in `~/.cache` last from job to job.
`SITE_SLUG` (repository variable) names the directory and defaults to the repository name; set it to `pplus`. `SITE_URL` turns on a smoke test that fetches `/VERSION` from the live site and fails the job if it is not the deployed commit. On GitHub Actions the build and test steps run unchanged with `runs-on: ubuntu-latest`; publishing needs the droplet.
**Once the repositories are public**, a pull request from a fork runs its own workflow file and code on this runner, in a container that can write `/srv/www`. Run pull requests only from branches of the repository itself (each workflow's job has an `if:` that does that), or require approval for fork runs in Gitea's repository settings where the version offers it, or give pull requests a separate runner that cannot write the web root.
If the runner ever moves off the droplet, `scripts/deploy.sh pplus deploy@droplet` rsyncs over SSH instead; give that runner a key whose public half is in `deploy`'s `authorized_keys`. If the runner ever moves off the droplet, `scripts/deploy.sh pplus deploy@droplet` rsyncs over SSH instead; give that runner a key whose public half is in `deploy`'s `authorized_keys`.
+3 -3
View File
@@ -6,7 +6,7 @@
# keeps the two in step. Without pixi, `npm install && npm test` builds core # keeps the two in step. Without pixi, `npm install && npm test` builds core
# (core/, the pplus-core submodule) and the site, and tests the site, with # (core/, the pplus-core submodule) and the site, and tests the site, with
# whatever node and python3 are on the PATH; everything else assumes the # whatever node and python3 are on the PATH; everything else assumes the
# pinned environment below, and CI runs `pixi run ci` in it. Core's own # pinned environment below, and the deploy job runs `pixi run ci` in it. Core's own
# commands are in core/pixi.toml: `pixi run --manifest-path core/pixi.toml <task>`. # commands are in core/pixi.toml: `pixi run --manifest-path core/pixi.toml <task>`.
[workspace] [workspace]
@@ -28,7 +28,7 @@ pandoc = ">=3.6,<4" # the Quarto extension's tests run its Lua filter in pandoc
# --- build and test the site ----------------------------------------------- # --- build and test the site -----------------------------------------------
install = { cmd = "npm install", inputs = ["package.json"], outputs = ["node_modules/.package-lock.json"], description = "Install TypeScript (the only npm dependency)" } install = { cmd = "npm install", inputs = ["package.json"], outputs = ["node_modules/.package-lock.json"], description = "Install TypeScript (the only npm dependency)" }
core-build = { cmd = "npx tsc -p core/tsconfig.json", depends-on = ["install"], description = "Build pplus-core (core/, a git submodule) into core/dist/ with the site's TypeScript; the site imports it as #core/" } core-build = { cmd = "npx tsc -p core/tsconfig.json", depends-on = ["install"], description = "Build pplus-core (core/, a git submodule) into core/dist/ with the site's TypeScript; the site imports it as #core/" }
core-test = { cmd = "node --test --test-concurrency=8 tests/*.test.mjs", cwd = "core", depends-on = ["core-build"], description = "Run pplus-core's own tests (its gate is core's pixi run ci)" } core-test = { cmd = "node --test --test-concurrency=8 tests/*.test.mjs", cwd = "core", depends-on = ["core-build"], description = "Run pplus-core's own tests at the pinned commit, before moving the pointer (the deploy job does not run them; core's gate, its pixi run ci, does)" }
core-status = { cmd = "python scripts/mojo/corpus.py status --strict", cwd = "core", description = "Core's mojo-status-strict at the pinned commit: no Mojo program of ours fails, from godbolt's stored answers (offline)" } core-status = { cmd = "python scripts/mojo/corpus.py status --strict", cwd = "core", description = "Core's mojo-status-strict at the pinned commit: no Mojo program of ours fails, from godbolt's stored answers (offline)" }
build = { cmd = "npx tsc -p tsconfig.json", depends-on = ["install", "core-build"], description = "Build core, then compile src/ to dist/" } build = { cmd = "npx tsc -p tsconfig.json", depends-on = ["install", "core-build"], description = "Build core, then compile src/ to dist/" }
watch = { cmd = "npx tsc -p tsconfig.json --watch", depends-on = ["install", "core-build"], description = "Rebuild dist/ on every change (core is built once first)" } watch = { cmd = "npx tsc -p tsconfig.json --watch", depends-on = ["install", "core-build"], description = "Rebuild dist/ on every change (core is built once first)" }
@@ -44,7 +44,7 @@ quarto-engine = { cmd = "node scripts/quarto-engine.mjs {{ dir }}", args = ["dir
quarto-example = { cmd = "quarto render quarto", depends-on = ["build"], description = "Render the example site in quarto/example with every shortcode (needs Quarto on the PATH)" } quarto-example = { cmd = "quarto render quarto", depends-on = ["build"], description = "Render the example site in quarto/example with every shortcode (needs Quarto on the PATH)" }
# --- ship ------------------------------------------------------------------ # --- ship ------------------------------------------------------------------
ci = { depends-on = ["test", "core-test", "core-status"], description = "What CI runs: every test of the site, and core's tests and mojo-status-strict at the pinned commit (docs/deploy.md)" } ci = { depends-on = ["test", "core-status"], description = "What the deploy job runs before it publishes: every test of the site, and core's mojo-status-strict at the pinned commit. Core's own tests are core's gate (docs/deploy.md)" }
release-check = { cmd = "node scripts/release.mjs check", depends-on = ["build"], description = "Is the chain web -> core -> library consistent: pointers checked out, clean and pushed to their branch, generated files current, Mojo pinned alike (docs/deploy.md); --offline asks no remote" } release-check = { cmd = "node scripts/release.mjs check", depends-on = ["build"], description = "Is the chain web -> core -> library consistent: pointers checked out, clean and pushed to their branch, generated files current, Mojo pinned alike (docs/deploy.md); --offline asks no remote" }
release-bump = { cmd = "node scripts/release.mjs bump", depends-on = ["build"], description = "After a change in core/library or core: move the pointers bottom up, regenerate, run each gate, print what to push in order; --commit makes the commits, nothing pushes (docs/deploy.md)" } release-bump = { cmd = "node scripts/release.mjs bump", depends-on = ["build"], description = "After a change in core/library or core: move the pointers bottom up, regenerate, run each gate, print what to push in order; --commit makes the commits, nothing pushes (docs/deploy.md)" }
site = { cmd = "scripts/assemble.sh", depends-on = ["test"], description = "Test, then assemble site/ for publishing" } site = { cmd = "scripts/assemble.sh", depends-on = ["test"], description = "Test, then assemble site/ for publishing" }