-
Notifications
You must be signed in to change notification settings - Fork 48
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
ci: Refactor scripts #60
Conversation
c2ad80e
to
6be0456
Compare
8bb36fb
to
20e4cfb
Compare
20e4cfb
to
4f7ad78
Compare
Just realised that the "filter" is not as precise as it should be. For example, when the main Update: The conditional filter was removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing show-stopping, mostly small questions -- looks great!
Cargo.toml
Outdated
@@ -17,5 +17,14 @@ repository = "https://github.com/anza-xyz/pinocchio" | |||
|
|||
[workspace.dependencies] | |||
five8_const = "0.1.3" | |||
pinocchio = { path = "sdk/pinocchio", version = ">= 0.6, <= 0.7" } | |||
pinocchio-pubkey = { path = "sdk/pubkey", version = "0.2.1" } | |||
pinocchio = { path = "sdk/pinocchio", version = ">= 0.6" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the version specified like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably me not using the workspace dependencies correctly. I was trying to avoid bumping dependencies on other packages unnecessarily. For example, if pinocchio-pubkey
can work with multiple versions of pinocchio
and pinocchio
has been bumped to 0.7
, I still want to specify that pinocchio-pubkey
works with anything from >= 0.6
.
But perhaps this is not the correct way to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, let's just keep them all at the same version for now, I think it'll make things simpler in the long run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple more comments, then this can go in!
Cargo.toml
Outdated
@@ -17,5 +17,14 @@ repository = "https://github.com/anza-xyz/pinocchio" | |||
|
|||
[workspace.dependencies] | |||
five8_const = "0.1.3" | |||
pinocchio = { path = "sdk/pinocchio", version = ">= 0.6, <= 0.7" } | |||
pinocchio-pubkey = { path = "sdk/pubkey", version = "0.2.1" } | |||
pinocchio = { path = "sdk/pinocchio", version = ">= 0.6" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, let's just keep them all at the same version for now, I think it'll make things simpler in the long run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Problem
CI currently has limited checks and the
publish.yml
workflow is limited to a couple of crates.Solution
Refactor the CI. This involved using a new set of supporting scripts, which can also be used from the command-line:
audit
: audit dependencies of the workspacebuild
: build a crate withbuild-sbf
(useful to detect issues with code under thetarget = solana
configurationclippy
: run clippydoc
: linting of doc sectionsformat
: runcargo fmt
hack
: linting of feature powersetlint
: executeclippy && doc && hack
in sequencesemver
: semantic versioning validationtest
: runcargo test
CI make use of these scripts to run:
audit
format
clippy
doc
hack
build
test
The
publish.yml
workflow was updated to work with any crate of the reposiroty and incorporatessemver-checks
based on the version level. If the version level selected for publishing violates semantic versioning, the publishing fails. For example, if the code to be published under apatch
version contains breaking changes, thesemver-check
will fail and the publish workflow will abort.Note
The code in main is currently failing the
doc
linting - #64 fixes these issues.