Move repo to work with a Makefile#667
Merged
joncinque merged 32 commits intosolana-program:mainfrom Aug 26, 2025
Merged
Conversation
#### Problem The program repos are getting a little out of hand, with many different methods of managing CI, scripts, etc etc. #### Summary of changes Token-2022 is the most complicated repo, with many different clients, multiple programs, and sub-libraries, so if we can get it to work here, it should be usable in all the other program repos. * Create a Makefile, similar to the system repo, to handle all jobs * Convert publish scripts to bash, similar to the system repo again * Remove js scripts that aren't related to Codama generation * Update the main CI and publish jobs to use Makefile commands * Use matrices in CI to simplify job construction The biggest issue is that Makefile targets can't contain slashes, so we need to have some mapping between something like `clients-rust-legacy` to `clients/rust-legacy`. Rather than specify that mapping by hand, I opted to assume that the first word in a target is a subdirectory. This means we have to change `confidential-transfer` to `confidential` in the repo.
Contributor
Author
|
Ok this should be ready to go! |
buffalojoec
reviewed
Aug 25, 2025
Contributor
Author
|
I forgot about another change that was needed during publish, which is only running the semver job on lib targets: 4835c9f |
buffalojoec
approved these changes
Aug 25, 2025
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.
Problem
The program repos are getting a little out of hand, with many different methods of managing CI, scripts, etc etc.
Summary of changes
Token-2022 is the most complicated repo, with many different clients, multiple programs, and sub-libraries, so if we can get it to work here, it should be usable in all the other program repos.
envin thestrategycontext)The biggest issue is that Makefile targets can't contain slashes, so we need to have some mapping between something like
clients-rust-legacytoclients/rust-legacy. Rather than specify that mapping by hand, I opted to assume that the first word in a target is a subdirectory. This means we have to changeconfidential-transfertoconfidentialin the repo.NOTE: Leaving this in draft, since I imagine it'll take some time to workFinally ready to take this out of draft! There are some goofy workarounds based on Make and GitHub Actions limitations, but I hope it'll be easy to apply to all the program repos by copying over the Makefile,scripts/directory, and workflow files.The only parts that will need to be customized by individual repos are the packages in the workflow files (
main.yml,publish-rust.yml, andpublish-js.yml) and the programs to add duringrestart-test-validator.sh.