Align repo orchestration with stake/token-2022 conventions#67
Open
lorisleiva wants to merge 1 commit into
Open
Align repo orchestration with stake/token-2022 conventions#67lorisleiva wants to merge 1 commit into
lorisleiva wants to merge 1 commit into
Conversation
This PR replaces the bespoke zx-based scripts and hand-written GitHub workflows with the converged `solana-program/*` conventions: a root `Makefile` for all repo tasks and thin wrappers around the reusable workflows in `solana-program/actions`. The JS client's newer stack (Oxlint / Oxfmt / Vitest / LiteSVM) is preserved as-is.
### What changed
- **Added** root `Makefile` with pattern targets (`format-check-%`, `clippy-%`, `build-sbf-%`, `test-%`, `test-js-%`, `lint-js-%`, `audit`, `spellcheck`, `generate-clients`, `publish-{js,rust}-%`, …). The `test-js-%` recipe deliberately omits validator start/stop because the JS client runs in-process via LiteSVM.
- **Replaced** `.github/workflows/main.yml` with a thin wrapper around `solana-program/actions/.github/workflows/main.yml@main`.
- **Replaced** `publish-js-client.yml` and `publish-rust-client.yml` with wrappers around the reusable `publish-js.yml` / `publish-rust.yml`.
- **Added** `scripts/cliff.toml` for git-cliff changelog generation in publish workflows.
- **Removed** `.github/actions/setup/` (now `solana-program/actions/setup-ubuntu@main`), all `scripts/{js,rust,ci}/*.mjs` orchestration scripts, and their helpers.
- **Slimmed** root `package.json` to only Codama + TypeScript; dropped `zx` and `@iarna/toml` from devDeps; regenerated `pnpm-lock.yaml`.
- **Updated** READMEs to reference the new `make` targets.
### Behavioural changes
These all align with the conventions used in `stake` and `token-2022`:
- **CI gains coverage:** `clients/rust` now runs through format / clippy / test on every push; new `build-doc-%` (with `RUSTDOCFLAGS="--cfg docsrs -D warnings"`) and `powerset-%` (cargo-hack feature powerset) gates run for every Rust package.
- **Clippy flags:** drops `-Zunstable-options` and `--no-deps`; same deny list (`warnings`, `clippy::arithmetic_side_effects`).
- **Published npm packages will carry provenance attestations** (`NPM_CONFIG_PROVENANCE=true` is baked into the reusable publish workflow).
- **`cargo semver-checks` now runs on `publish-rust`** against the previously published version. Since `clients/rust` is at `0.0.0` and never published, the first real publish may need `run-semver: false` (one-time).
- **`cargo release` now passes `--dependent-version fix`** (no-op for this repo — no cross-crate workspace deps).
- **Publish commit/tag annotations change** to `"Publish js@vX.Y.Z"` (tag names themselves — `js@vX.Y.Z`, `rust@vX.Y.Z` — are unchanged).
- **GitHub releases** now have a body generated from `git-cliff` instead of empty.
- **Publish-JS auth** switches from `ANZA_TEAM_PAT` + `SOLANA_PROGRAM_NPM_TOKEN` to a GitHub App (`vars.APP_ID` + `secrets.PRIVATE_KEY`); these need to be provisioned on the repo before the first publish under the new flow.
- **CI cosmetics:** the `program-builds` GitHub artifact is no longer uploaded for download (internal cache only); `RUST_LOG=error` is no longer set on program tests.
- **DX removals:** `pnpm solana:check`, `pnpm solana:link`, `pnpm template:upgrade` are gone with no replacement (developer convenience only — no CI impact).
### Local verification
Ran `make format-check-{program,clients-rust}`, `make clippy-clients-rust`, `make build-doc-{program,clients-rust}`, `make format-check-js-clients-js`, `make lint-js-clients-js`, `make generate-clients` (no diff produced), and `make test-js-clients-js` (all 73 tests pass).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces the bespoke zx-based scripts and hand-written GitHub workflows with the converged
solana-program/*conventions: a rootMakefilefor all repo tasks and thin wrappers around the reusable workflows insolana-program/actions. The JS client's newer stack (Oxlint / Oxfmt / Vitest / LiteSVM) is preserved as-is.What changed
Makefilewith pattern targets (format-check-%,clippy-%,build-sbf-%,test-%,test-js-%,lint-js-%,audit,spellcheck,generate-clients,publish-{js,rust}-%, …). Thetest-js-%recipe deliberately omits validator start/stop because the JS client runs in-process via LiteSVM..github/workflows/main.ymlwith a thin wrapper aroundsolana-program/actions/.github/workflows/main.yml@main.publish-js-client.ymlandpublish-rust-client.ymlwith wrappers around the reusablepublish-js.yml/publish-rust.yml.scripts/cliff.tomlfor git-cliff changelog generation in publish workflows..github/actions/setup/(nowsolana-program/actions/setup-ubuntu@main), allscripts/{js,rust,ci}/*.mjsorchestration scripts, and their helpers.package.jsonto only Codama + TypeScript; droppedzxand@iarna/tomlfrom devDeps; regeneratedpnpm-lock.yaml.maketargets.Behavioural changes
These all align with the conventions used in
stakeandtoken-2022:clients/rustnow runs through format / clippy / test on every push; newbuild-doc-%(withRUSTDOCFLAGS="--cfg docsrs -D warnings") andpowerset-%(cargo-hack feature powerset) gates run for every Rust package.-Zunstable-optionsand--no-deps; same deny list (warnings,clippy::arithmetic_side_effects).NPM_CONFIG_PROVENANCE=trueis baked into the reusable publish workflow).cargo semver-checksnow runs onpublish-rustagainst the previously published version. Sinceclients/rustis at0.0.0and never published, the first real publish may needrun-semver: false(one-time).cargo releasenow passes--dependent-version fix(no-op for this repo — no cross-crate workspace deps)."Publish js@vX.Y.Z"(tag names themselves —js@vX.Y.Z,rust@vX.Y.Z— are unchanged).git-cliffinstead of empty.ANZA_TEAM_PAT+SOLANA_PROGRAM_NPM_TOKENto a GitHub App (vars.APP_ID+secrets.PRIVATE_KEY); these need to be provisioned on the repo before the first publish under the new flow.program-buildsGitHub artifact is no longer uploaded for download (internal cache only);RUST_LOG=erroris no longer set on program tests.pnpm solana:check,pnpm solana:link,pnpm template:upgradeare gone with no replacement (developer convenience only — no CI impact).Local verification
Ran
make format-check-{program,clients-rust},make clippy-clients-rust,make build-doc-{program,clients-rust},make format-check-js-clients-js,make lint-js-clients-js,make generate-clients(no diff produced), andmake test-js-clients-js(all 73 tests pass).