-
Notifications
You must be signed in to change notification settings - Fork 157
ci: improve test-frozen-abi script #440
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
Conversation
tao-stones
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good for metadata
joncinque
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! Just a small suggestion that might simplify the change
scripts/test-frozen-abi.sh
Outdated
| packages=$(./cargo nightly metadata --no-deps --format-version=1 | jq -r '.packages[] | select(.features | has("frozen-abi")) | .name') | ||
| for package in $packages; do | ||
| echo "::group::./cargo nightly test -p $package --features frozen-abi --lib -- test_abi_ --nocapture" | ||
| ./cargo nightly test -p "$package" --features frozen-abi --lib -- test_abi_ --nocapture | ||
| echo "::endgroup::" | ||
| done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to use cargo hack, we can simplify the change to simply:
./cargo nightly hack --features frozen-abi --ignore-unknown-features test --lib -- test_abi_ --nocapture
What do you think? We'll also need to install cargo-hack for this step in CI if we go this route
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure! let's do it: c086900
joncinque
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
Problem
I noticed that some crates' frozen-abi features can't be run individually. The reason is that our tests run them all together, which allows them to rely on tainted packages and hide potential errors. As you can see in https://github.com/anza-xyz/solana-sdk/actions/runs/19302341784/job/55200264398, it caught a missing
solana_short_vec/frozen-abiin the message.Summary of Changes
test frozen-abi crate by crate