Skip to content

Add CI for soroban-examples and OZ contracts#2424

Merged
leighmcculloch merged 14 commits intomainfrom
more-tests
Mar 5, 2026
Merged

Add CI for soroban-examples and OZ contracts#2424
leighmcculloch merged 14 commits intomainfrom
more-tests

Conversation

@leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Mar 4, 2026

What

Add two GitHub Actions workflows that build real-world contracts from stellar/soroban-examples and OpenZeppelin/stellar-contracts using the CLI built from source. Each workflow builds all cdylib contracts with stellar contract build, verifies each Wasm exposes at least one contract function via stellar contract info interface.

Why

The CLI has little coverage for stellar contract build or stellar contract upload against real-world contracts, leaving regressions in those paths undetected until after release.

This test is limited in that it doesn't check much about the contract, but does check that the build process works, doesn't error, and that the resulting contracts still have expected custom sections which are components that the stellar-cli does touch.

This testing approach of testing against soroban-examples and openzeppelin/stellar-contracts is used today in the stellar/rs-soroban-sdk.

Close #2423

@leighmcculloch leighmcculloch requested a review from mootz12 March 4, 2026 01:58
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Mar 4, 2026
@leighmcculloch leighmcculloch marked this pull request as ready for review March 4, 2026 02:40
@leighmcculloch leighmcculloch requested review from Copilot and fnando March 4, 2026 02:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new GitHub Actions coverage to exercise stellar contract build (and partially contract info interface) against real-world Soroban contracts from external repos, improving regression detection for CLI contract workflows.

Changes:

  • Introduces a workflow to build + validate interfaces for contracts in stellar/soroban-examples.
  • Introduces a workflow to build + validate interfaces for cdylib contracts in OpenZeppelin/stellar-contracts.
  • Builds the CLI from source in CI and shares it between jobs via artifacts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
.github/workflows/test-with-soroban-examples.yml New CI workflow to build selected soroban-examples contracts with stellar contract build and validate non-empty interface output.
.github/workflows/test-with-openzeppelin-contracts.yml New CI workflow to build selected OpenZeppelin contracts with stellar contract build and validate non-empty interface output.

@leighmcculloch leighmcculloch enabled auto-merge (squash) March 4, 2026 02:49
@willemneal
Copy link
Contributor

It would also be good to test if the generated clients compile.

@leighmcculloch
Copy link
Member Author

After #2426 merges, we should update this PR to run the spec-verify command on the built wasms. It will error rather than simply warn.

@leighmcculloch
Copy link
Member Author

It would also be good to test if the generated clients compile.

If the client generator was staying in then cli long term yeah. The client generator will be deleted from the cli as part of its migration into the js sdk.

Maybe this test could still use the js sdk to generate, but that'd be testing a circular dependency and would fail for reasons outside this repos control each time something new was added to the spec.

The test at least uses the contract info interface command that confirms the spec is decodable.

@willemneal
Copy link
Contributor

willemneal commented Mar 4, 2026

I meant import contract generator. Which I see now would tested by info

@leighmcculloch
Copy link
Member Author

I meant import contract generator. Which I see now would tested by info

That's the same output as the stellar contract info interface command.

Please let me know if I'm misunderstanding.

@leighmcculloch
Copy link
Member Author

leighmcculloch commented Mar 5, 2026

Screenshot 2026-03-05 at 2 09 57 pm

Fyi that some of the OpenZeppelin builds ☝🏻 are expected to fail, as this is capturing the status quo today that specs don't get shaken well. And is what stellar/rs-soroban-sdk#1672 #2353 are setting out to improve.

@leighmcculloch leighmcculloch disabled auto-merge March 5, 2026 04:21
@leighmcculloch
Copy link
Member Author

Fyi the soroban-examples privacy-pools/contract failure is going to be fixed by:

@leighmcculloch leighmcculloch enabled auto-merge (squash) March 5, 2026 05:12
@leighmcculloch leighmcculloch disabled auto-merge March 5, 2026 05:19
@leighmcculloch leighmcculloch merged commit 4e81348 into main Mar 5, 2026
101 of 115 checks passed
@leighmcculloch leighmcculloch deleted the more-tests branch March 5, 2026 05:27
@github-project-automation github-project-automation bot moved this from Backlog (Not Ready) to Done in DevX Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add CI workflows for testing soroban-examples and OZ contracts with stellar contract build/upload

4 participants