Skip to content

[Stellar] Add rust ci compilation #594

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

Open
wants to merge 69 commits into
base: master
Choose a base branch
from

Conversation

CoveMB
Copy link
Contributor

@CoveMB CoveMB commented Jul 4, 2025

Summary

Add compilation tests

Description

  • Add integration (compilation + test) tests for rust zip
  • Add integration (compilation + test) tests for scaffold project
  • Add compilation test for fungible and non-fungible using rust zip logic

@CoveMB CoveMB force-pushed the add-rust-ci-compilation branch from d9dbf4b to ed05184 Compare July 14, 2025 19:32
@CoveMB CoveMB force-pushed the add-rust-ci-compilation branch from 3052877 to 2e380ad Compare July 14, 2025 19:50
@CoveMB CoveMB force-pushed the add-rust-ci-compilation branch from 2e380ad to f6988bc Compare July 14, 2025 19:55
@CoveMB CoveMB changed the title Add rust ci compilation [Stellar] Add rust ci compilation Jul 15, 2025
# id: get-scaffold-sha
# run: |
# echo "sha=$(git ls-remote https://github.com/ahalabs/scaffold-stellar HEAD | cut -f1)" >> $GITHUB_OUTPUT
echo "sha=ebf79b8a57ad1b51a46162afd98ca05c648085fe" >> $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

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

was this a debug thing?

@ozgunozerk
Copy link
Contributor

ozgunozerk commented Jul 17, 2025

Didn't spend much time on it, thought asking it would be more efficient.

I saw rust-toolchain is installed for the CI, however, didn't notice any cargo commands in the CI.

Are they embedded into yarn test?
Or, is there another connection for this?

I think cargo tests happen here:

https://github.com/OpenZeppelin/contracts-wizard/pull/594/files#diff-0cbcc06988f70598f2ff46814e7b676c67306e4a368bbd356585a56faa0f9f37R41-R64

Just wanted to double check 👍

const asyncExec = promisify(exec);

export const runCargoTest = async (t: ExecutionContext, temporaryFolder: string) => {
const result = await asyncExec(`cd "${temporaryFolder}" && RUSTFLAGS="-D warnings" cargo test`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const result = await asyncExec(`cd "${temporaryFolder}" && RUSTFLAGS="-D warnings" cargo test`);
const result = await asyncExec(`cd "${temporaryFolder}" && cargo test`);

we can make the compilation test pass by ignoring the warnings for the moment and we work on getting rid of them in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants