Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ permissions:
contents: read

# To minimize supply-chain exposure this workflow uses only GitHub's own
# first-party actions; every toolchain and tool is installed from rustup,
# crates.io, or the checked-in sources.
# first-party actions; every toolchain and tool is installed from rustup, the
# tool's official distribution, or the checked-in sources.
#
# Every job runs a command the README's Development section lists, so a
# contributor can reproduce any job from the README.
# Every job runs one of the repository's checks, and this file is where that
# list lives, so a contributor can reproduce any job from here.
jobs:
fmt:
name: Rustfmt (nightly-2026-11-05)
Expand Down Expand Up @@ -61,19 +61,18 @@ jobs:
- uses: actions/checkout@v4
- name: Install the pinned toolchain
run: rustup toolchain install
# nextest comes from crates.io at a pinned version, into its own root so the
# cache holds nothing but nextest and its dependencies.
- name: Cache cargo-nextest
uses: actions/cache@v4
with:
path: ~/.local/cargo-nextest
key: ${{ runner.os }}-cargo-nextest-0.9.151
- name: Install cargo-nextest from crates.io
# The official nextest distribution, at a pinned version: a prebuilt binary,
# so the job needs no compiler for it. The host intermittently answers 504,
# so a failed download builds the same pinned version from crates.io instead
# of failing the job.
- name: Install cargo-nextest from the official distribution
run: |
if [ ! -x "$HOME/.local/cargo-nextest/bin/cargo-nextest" ]; then
cargo install --locked cargo-nextest --version 0.9.151 --root "$HOME/.local/cargo-nextest"
set -o pipefail
if ! curl -LsSf --retry 3 --retry-delay 2 --retry-all-errors \
https://get.nexte.st/0.9.151/linux | tar zxf - -C "${CARGO_HOME:-$HOME/.cargo}/bin"; then
echo "the official distribution did not answer; building 0.9.151 from crates.io" >&2
cargo install --locked cargo-nextest --version 0.9.151
fi
echo "$HOME/.local/cargo-nextest/bin" >> "$GITHUB_PATH"
# The suite covers `cgp-tests` for behavior and expansion snapshots and
# `cgp-macro-tests` for the macro internals. Post-codegen compile failures
# are UI fixtures in `cargo-cgp`, not tests here.
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ update this block to match.
- Treat [CHANGELOG.md](CHANGELOG.md) as the record of which macro forms are current and which are
removed.
- Add a `///` to every public item that lacks one, and keep inline docs brief.
- Run the repository's checks before committing; the commands are in [README.md](README.md).
- Run the repository's checks before committing; [`.github/workflows/tests.yml`](.github/workflows/tests.yml) lists them, and CI runs the same commands.
- Put a post-codegen compile failure in a `cargo-cgp` UI fixture, not in this repository, and update the
matching fixture when a construct change alters a diagnostic.

Expand Down
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,31 +242,6 @@ Contributions, questions, and bug reports are welcome. Open an
[contribute page](https://contextgeneric.dev/docs/contribute) to get oriented first. Unless stated
otherwise, contributions are made under the terms of the Apache-2.0 license below.

### Development

Run the checks from the repository root. The toolchain is pinned in `rust-toolchain.toml`, and most
crates are `#![no_std]`, so keep new code `no_std`-compatible.

```sh
cargo +nightly-2026-11-05 fmt --all
cargo clippy --all-features --all-targets -- -D warnings
cargo clippy --no-default-features --all-targets -- -D warnings
cargo nextest run --all-features --no-fail-fast --workspace
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --workspace --all-features
cargo +1.89 check --workspace --all-features
rustup target add x86_64-unknown-none
cargo check -p cgp-no-std-tests --target x86_64-unknown-none
cargo check -p cgp-no-std-tests --target x86_64-unknown-none --features alloc
```

The first command needs the `nightly-2026-11-05` toolchain, because `.rustfmt.toml` sets unstable
options; CI installs that exact channel. The last five check the docs, the declared minimum Rust
version, and both `no_std` paths, and CI runs each of them.

The suite covers `cgp-tests` for behavior and expansion snapshots and `cgp-macro-tests` for the macro
internals. Post-codegen compile failures are UI fixtures in
[`cargo-cgp`](https://github.com/contextgeneric/cargo-cgp).

## License

Licensed under the [Apache License, Version 2.0](LICENSE).
Loading