-
Notifications
You must be signed in to change notification settings - Fork 4.6k
ci: test-checks.sh all sbf code & use nightly only #30602
Conversation
ci/test-checks.sh
Outdated
@@ -64,7 +69,8 @@ if [[ $CI_BASE_BRANCH = "$EDGE_CHANNEL" ]]; then | |||
exit "$check_status" | |||
fi | |||
|
|||
# Ensure nightly and --benches | |||
# Ensure nightly; there's some test code, which is enabled only under |
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.
here
ci/test-checks.sh
Outdated
@@ -56,7 +56,10 @@ export RUSTFLAGS="-D warnings -A incomplete_features" | |||
|
|||
# Only force up-to-date lock files on edge | |||
if [[ $CI_BASE_BRANCH = "$EDGE_CHANNEL" ]]; then | |||
if _ scripts/cargo-for-all-lock-files.sh check --locked --all-targets; then |
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.
failed like below:
https://buildkite.com/solana-labs/solana/builds/91305#0186b473-a055-49f4-b758-3495864a9f1b/124-714
Checking solana-cargo-build-bpf v1.16.0 (/solana/sdk/cargo-build-bpf)
error[E0554]: `#![feature]` may not be used on the stable release channel
--> sdk/benches/slot_hashes.rs:1:12
|
1 | #![feature(test)]
| ^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> sdk/benches/slot_history.rs:1:12
|
1 | #![feature(test)]
| ^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> sdk/benches/accounts.rs:1:12
|
1 | #![feature(test)]
| ^^^^
hmm, I've hit by this #15080 https://buildkite.com/solana-labs/solana/builds/91313#0186b5a6-896f-41a9-89bf-2a905aff28ac/1247-1274:
|
sounds like it needs |
programs/sbf/Cargo.toml
Outdated
default = [ | ||
"sbf_c", | ||
"sbf_rust", | ||
] |
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.
why not? :) Otherwise, we have to leak these impl-detail features to ./ci/test-checks.sh
by starting manually unrolling cargo-for-all-lock-files.sh
.
sdk/sbf/c/sbf.mk
Outdated
ifeq (,$(wildcard $(subst .so,-keypair.json,$1))) | ||
$(_@)solana-keygen new --no-passphrase --silent -o $(subst .so,-keypair.json,$1) | ||
endif |
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.
seems we've reached to a consensus to remove this entirely: https://discord.com/channels/428295358100013066/560503042458517505/1082437459423543437
#![allow(clippy::clone_on_copy)] | ||
#![allow(clippy::needless_range_loop)] | ||
#![allow(clippy::redundant_clone)] | ||
#![allow(clippy::needless_borrow)] | ||
#![allow(clippy::cmp_owned)] | ||
#![allow(clippy::needless_collect)] | ||
#![allow(clippy::match_like_matches_macro)] | ||
#![allow(clippy::unnecessary_cast)] | ||
#![allow(clippy::uninlined_format_args)] |
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.
all the fun excises are left to vm guys..... xD
programs/sbf/build.rs
Outdated
if env::var("CI_TEST_CHECKS_FORCE_HOST_COMPILE").is_ok() { | ||
println!("cargo:warning=(not a warning) Compiling with host toolchain for CI..."); | ||
return; | ||
} | ||
|
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.
@alessandrod this is a bit aggressive, but i think it's better not to use cargo-build-sbf
altogether here.
- Faster build (no need to wget/tar, etc; also build cache reuse..)
- Avoid broken
clippy
withprograms/sbf/build.rs
- nicer output in general.
- don't pull in externally-controlled dep (i think latest
solana-sbf-tools
is implicitly used?)
potential downsides:
- version mismatch between monorepo rust vs
solana-sbf-tools
=> shouldn't cause too much trouble because casually monorepo is newer - potential risk of super hard-to-debug bugs due to this special cased
build.rs
behavior => possible, so I'm addingcargo:warning=...
here for this bailout codepath.
if this makes sense, I'll finish up this pr in this direction (squash commits, toss review to @yihau, etc).
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.
hope this is what you wanted (faster ./test-checksh.sh
): a car, not faster horse. lol
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.
haha this looks good to me, although not sure if it impacts how @dmakarov tests his changes
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.
I think we might want to compile these programs with platform-tools (previously known as sbf-tools and bpf-tools) to prevent accidental updating to a broken toolchain.
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.
as discussed at discord, we've reached conclution this is ok given that this is new additional fail-first test step: https://discord.com/channels/428295358100013066/560503042458517505/1082870294504538244
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.
🪖
422f0b9
to
3a208ed
Compare
Codecov Report
@@ Coverage Diff @@
## master #30602 +/- ##
=========================================
- Coverage 81.7% 81.6% -0.1%
=========================================
Files 723 723
Lines 201620 201620
=========================================
- Hits 164728 164710 -18
- Misses 36892 36910 +18 |
ac7b881
to
733a63c
Compare
733a63c
to
0683101
Compare
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.
🪖
Problem
When overloaded with rather hard rustc bump (#10585), I've sneaked some piggybacked changes to ci. specifically at 78dc87dEDIT: scope changed to: make some ci jobs fasterEDIT2: sbf code isn't
cargo {check/clippy}
-ed.Summary of Changes
Document the intention properly.EDIT2: use host toolchain for
cargo {check/clippy}
-ing sbf code.