-
Notifications
You must be signed in to change notification settings - Fork 17
Overhaul CI with Makefile #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ec5778e
5a7be3e
343ad38
38a661d
1928202
e3aaa61
9edb2c0
c2f176e
6340769
d397cf3
bbcabb4
072014a
9f544da
4dda2d7
e96682b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| include vars.env | ||
|
|
||
| nightly = +$(subst ",,${RUST_TOOLCHAIN_NIGHTLY}) | ||
|
|
||
| clippy-%: | ||
| cargo $(nightly) clippy --manifest-path $(subst -,/,$*)/Cargo.toml | ||
|
|
||
| format-%: | ||
| cargo $(nightly) fmt --check --manifest-path $(subst -,/,$*)/Cargo.toml | ||
|
|
||
| format-%-fix: | ||
| cargo $(nightly) fmt --manifest-path $(subst -,/,$*)/Cargo.toml | ||
|
|
||
| features-%: | ||
| cargo $(nightly) hack check --feature-powerset --all-targets --manifest-path $(subst -,/,$*)/Cargo.toml | ||
|
|
||
| publish-%: | ||
| ./scripts/publish-rust.sh $(subst -,/,$*) | ||
|
|
||
| build-wasm-interface: | ||
| wasm-pack build --target nodejs --dev ./interface --features bincode | ||
|
|
||
| lint-docs-%: | ||
| RUSTDOCFLAGS="--cfg docsrs -D warnings" cargo $(nightly) doc --all-features --no-deps --manifest-path $(subst -,/,$*)/Cargo.toml | ||
|
|
||
| lint-features-%: | ||
| cargo $(nightly) hack check --feature-powerset --all-targets --manifest-path $(subst -,/,$*)/Cargo.toml | ||
|
|
||
| test-%: | ||
| cargo $(nightly) test --manifest-path $(subst -,/,$*)/Cargo.toml | ||
|
|
||
| format-js: | ||
| cd ./clients/js && pnpm install && pnpm format | ||
|
|
||
| lint-js: | ||
| cd ./clients/js && pnpm install && pnpm lint | ||
|
|
||
| test-js: | ||
| ./scripts/restart-test-validator.sh | ||
| cd ./clients/js && pnpm install && pnpm build && pnpm test | ||
| ./scripts/stop-test-validator.sh |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,13 @@ | ||
| { | ||
| "private": true, | ||
| "scripts": { | ||
| "solana:check": "tsx ./scripts/helpers/check-solana-version.mts", | ||
| "solana:link": "tsx ./scripts/helpers/link-solana-version.mts", | ||
|
Comment on lines
-4
to
-5
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I might have missed it but I don't think these command have replacements. They seem to be just removed from the repo.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's correct, I felt like they weren't really necessary. If I'm wrong, we can add them back!
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I'm fine not having it back. It was just a useful thing to ensure your local Solana version matches the project requirements but tbh this is probably best as a user-based utility instead. |
||
| "generate": "pnpm generate:clients", | ||
| "generate:clients": "codama run --all", | ||
| "validator:start": "tsx ./scripts/helpers/start-validator.mts", | ||
| "validator:restart": "pnpm validator:start --restart", | ||
| "validator:stop": "tsx ./scripts/helpers/stop-validator.mts", | ||
| "js:format": "tsx ./scripts/js.mts format clients/js", | ||
| "js:lint": "tsx ./scripts/js.mts lint clients/js", | ||
| "js:publish": "tsx ./scripts/js.mts publish clients/js", | ||
| "js:test": "tsx ./scripts/js.mts test clients/js", | ||
| "rust:format": "tsx ./scripts/rust.mts format clients/rust", | ||
| "rust:lint": "tsx ./scripts/rust.mts lint clients/rust", | ||
| "rust:lint:clippy": "tsx ./scripts/rust.mts lint-clippy clients/rust", | ||
| "rust:lint:docs": "tsx ./scripts/rust.mts lint-docs clients/rust", | ||
| "rust:lint:features": "tsx ./scripts/rust.mts lint-features clients/rust", | ||
| "rust:publish": "tsx ./scripts/rust.mts publish clients/rust", | ||
| "rust:test": "tsx ./scripts/rust.mts test clients/rust", | ||
| "interface:format": "tsx ./scripts/rust.mts format interface", | ||
| "interface:lint": "tsx ./scripts/rust.mts lint interface", | ||
| "interface:lint:clippy": "tsx ./scripts/rust.mts lint-clippy interface", | ||
| "interface:lint:docs": "tsx ./scripts/rust.mts lint-docs interface", | ||
| "interface:lint:features": "tsx ./scripts/rust.mts lint-features interface", | ||
| "interface:publish": "tsx ./scripts/rust.mts publish interface", | ||
| "interface:test": "tsx ./scripts/rust.mts test interface", | ||
| "interface:wasm": "tsx ./scripts/rust.mts wasm interface", | ||
| "template:upgrade": "tsx ./scripts/helpers/upgrade-template.ts" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for this command which doesn't seem to be replaced. |
||
| "generate:clients": "codama run --all" | ||
| }, | ||
| "devDependencies": { | ||
| "@codama/renderers-js": "^1.2.7", | ||
| "@codama/renderers-rust": "^1.0.16", | ||
| "@iarna/toml": "^2.2.5", | ||
| "codama": "^1.2.8", | ||
| "tsx": "^4.19.2", | ||
| "typescript": "^5.5.2", | ||
| "zx": "^7.2.3" | ||
| "codama": "^1.2.8" | ||
| }, | ||
| "engines": { | ||
| "node": ">=v20.0.0" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.