Skip to content
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: Update repo to run CI on imported packages #56

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

joncinque
Copy link
Contributor

Problem

The repo has imported many packages from SPL, but they aren't properly integrated, since they can't be built, CI isn't running, etc.

Summary of changes

It's a bit of a suite of changes, but they get the repo up and running with the program and everything! Here are the changes:

  • update to Solana v2.1 crates and rust toolchain
  • add new packages to Cargo workspace
  • update Rust packages to use crates.io versions where applicable
  • move program-2022-tests into clients/rust-legacy/tests
  • remove test-sbf feature on program-2022-tests
  • add [package.metadata.solana.program-id] for token-2022 and elgamal registry
  • update JS legacy tests to use validator started with start-validator.mjs
  • add concept of "fixture programs" to load programs from the test fixtures directory during JS legacy tests
  • make scripts language-specific instead of package-specific, to reuse the JS and rust scripts
  • remove Token-2022 as a downloaded program, opt for the built version
  • add package.json entries to run build / test / format / lint for the program / cli / rust-legacy / js-legacy / confidential transfer
  • execute the new steps in CI

Successful run at https://github.com/joncinque/token-2022/actions/runs/12691995000

#### Problem

The repo has imported many packages from SPL, but they aren't properly
integrated, since they can't be built, CI isn't running, etc.

#### Summary of changes

It's a bit of a suite of changes, but they get the repo up and running
with the program and everything! Here are the changes:

* update to Solana v2.1 crates and rust toolchain
* add new packages to Cargo workspace
* update Rust packages to use crates.io versions where applicable
* move program-2022-tests into clients/rust-legacy/tests
* remove `test-sbf` feature on program-2022-tests
* add `[package.metadata.solana.program-id]` for token-2022 and elgamal
  registry
* update JS legacy tests to use validator started with `start-validator.mjs`
* add concept of "fixture programs" to load programs from the test
  fixtures directory during JS legacy tests
* make scripts language-specific instead of package-specific, to reuse
  the JS and rust scripts
* remove Token-2022 as a downloaded program, opt for the built version
* add package.json entries to run build / test / format / lint for the
  program / cli / rust-legacy / js-legacy / confidential transfer
* execute the new steps in CI
Copy link
Member

@lorisleiva lorisleiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! I love seeing a repo structure being pushed to the limit. 💪

Comment on lines +37 to +43
"confidential-transfer:proof-extraction:format": "zx ./scripts/rust/format.mjs confidential-transfer/proof-extraction",
"confidential-transfer:proof-extraction:lint": "zx ./scripts/rust/lint.mjs confidential-transfer/proof-extraction",
"confidential-transfer:proof-generation:format": "zx ./scripts/rust/format.mjs confidential-transfer/proof-generation",
"confidential-transfer:proof-generation:lint": "zx ./scripts/rust/lint.mjs confidential-transfer/proof-generation",
"confidential-transfer:proof-tests:test": "zx ./scripts/rust/test.mjs confidential-transfer/proof-tests",
"confidential-transfer:proof-tests:format": "zx ./scripts/rust/format.mjs confidential-transfer/proof-tests",
"confidential-transfer:proof-tests:lint": "zx ./scripts/rust/lint.mjs confidential-transfer/proof-tests",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@joncinque joncinque merged commit 7644591 into solana-program:main Jan 10, 2025
19 checks passed
@joncinque joncinque deleted the ci branch January 10, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants