Skip to content

CI: Update repo to run CI on imported packages#56

Merged
joncinque merged 1 commit into
solana-program:mainfrom
joncinque:ci
Jan 10, 2025
Merged

CI: Update repo to run CI on imported packages#56
joncinque merged 1 commit into
solana-program:mainfrom
joncinque:ci

Conversation

@joncinque
Copy link
Copy Markdown
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
Copy Markdown
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 thread package.json
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
Copy Markdown
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
@joncinque joncinque deleted the ci branch January 10, 2025 12:48
joncinque added a commit to joncinque/token-group that referenced this pull request Feb 27, 2025
#### Problem

The repo has all the code from SPL, but was never updated to actually
work outside of SPL.

#### Summary of changes

Similar to solana-program/token-2022#56, with a
few extras:

* add scripts
* add package.json for the repo
* update JS client to run prettier
* change JS client to build to "dist" instead of "lib" for consistency
* use packages from crates.io
* update repo / homepage / authors in packages
* fix spellcheck errors
* add CI to exercise almost all scripts
joncinque added a commit to solana-program/token-group that referenced this pull request Mar 6, 2025
* CI: Bring repo up to date with CI

#### Problem

The repo has all the code from SPL, but was never updated to actually
work outside of SPL.

#### Summary of changes

Similar to solana-program/token-2022#56, with a
few extras:

* add scripts
* add package.json for the repo
* update JS client to run prettier
* change JS client to build to "dist" instead of "lib" for consistency
* use packages from crates.io
* update repo / homepage / authors in packages
* fix spellcheck errors
* add CI to exercise almost all scripts

* TEMP: Run CI on all branches for testing

* Disable semver job temporarily

* Update Solana deps

* Install more deps for program testing

* Test JS client without built program

* Revert all branches running CI

* Run everything in parallel

* Update package publish to a choice
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