Skip to content

Improve CI Execution Speed - #19

Open
seanpar203 wants to merge 4 commits into
cppalliance:masterfrom
seanpar203:312-improve-promptforge-ci-speed-execution
Open

Improve CI Execution Speed#19
seanpar203 wants to merge 4 commits into
cppalliance:masterfrom
seanpar203:312-improve-promptforge-ci-speed-execution

Conversation

@seanpar203

Copy link
Copy Markdown
Contributor

The goal of this PR is two fold:

  • Improve CI Speed once code is in a PR
  • Catch issues before they get committed/pushed using git pre-commit and pre-push hooks

Why CI will run faster with this PR

  • The heavier checks concurrently instead of serial
  • Fail fast mechanism if formatting is invalid
  • Use images with required packages to reduce installs and building
  • Cache NPM dependencies
  • Don't install documentation packages when doing sudo-apt install

Add `/plan-dist-manifest.json` to `.gitignore`. This keeps workspace status clean when `dist plan` runs locally.
Add executable `.githooks/pre-commit` and `.githooks/pre-push` scripts to validate changes locally before they reach CI. Document the `git config core.hooksPath .githooks` setup command in `README.md`.

- *Structural decisions*: hooks reside directly in `.githooks/` so developers can configure them without external tools.
- *Behavior facts*: `pre-commit` executes `cargo fmt --all --check` and `pre-push` validates headless gateway compilation with `cargo check -p gateway --no-default-features`, runs `cargo clippy`, and invokes `cargo deny check` when present.
Configure `cache: npm` and `cache-dependency-path` for `actions/setup-node@v4` across nightly and release workflow definitions. Pass `--no-install-recommends` during Linux package installation in `release-workshop.yml`.

- *Behavior facts*: `actions/setup-node@v4` caches `crates/*/ui/package-lock.json` dependencies in `.github/workflows/dist-ci/build-setup.yml`, `.github/workflows/nightly.yml`, and `.github/workflows/release-workshop.yml`.
@seanpar203 seanpar203 added the enhancement New feature or request label Sep 6, 2026
@seanpar203
seanpar203 force-pushed the 312-improve-promptforge-ci-speed-execution branch from a2af054 to 4a6da8f Compare September 6, 2026 21:51
Split the monolithic `check` job in `.github/workflows/ci.yml` into separate `fmt`, `clippy`, `test`, and `docs` jobs. Install `cargo-nextest` via `taiki-e/install-action@nextest` for multi-core test scheduling, install prebuilt `cargo-deny` and `cargo-audit` binaries in `supply-chain`, and install UI dependencies across compilation jobs.

- *Structural decisions*: `fmt`, `clippy`, `test`, and `docs` run as independent concurrent jobs on `ubuntu-latest`.
- *Behavior facts*: `cargo-nextest` runs workspace tests concurrently across process pools in `test`, `check-workshop`, and `msrv`, while `npm ci` stages both UI trees for crates requiring build-script UI artifacts.
@seanpar203
seanpar203 force-pushed the 312-improve-promptforge-ci-speed-execution branch from 4a6da8f to 8d0e95b Compare September 6, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant