-
Notifications
You must be signed in to change notification settings - Fork 369
Ci: test crates with the intended targets #669
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
| # Check all RISC-V targets: | ||
| - name: check (esp32c3) | ||
| run: cd esp-hal-smartled/ && cargo +nightly check --features=esp32c3 | ||
| run: cd esp-hal-smartled/ && cargo +nightly check --features=esp32c3 --target=riscv32imc-unknown-none-elf |
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 does the target matter here? cargo check does not perform code generation, it should not make any difference should it?
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.
See below
| with: | ||
| toolchain: stable | ||
| components: clippy | ||
| toolchain: nightly |
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.
We were specifically running clippy from the stable release channel so that our lints don't just start failing overnight for no reason. Lints in the nightly version of clippy are also not guaranteed to be stabilized, so I don't see much point adhering to those rules.
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 don't think the crates will pass check with stable. Previously, clippy ran with the host machine as target, so std was available, but now (with cd-ing into the folder instead of --manifest-path cargo will pick up the .cargo/config.toml, set the correct target and there stable will fail as build-std is not stable.
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 guess we could run clippy with the +esp toolchain so that it can pick up the unstable stuff while only checking the stable lints?
591b827 to
5212d7d
Compare
Thank you!
Thank you for your contribution.
Please make sure that your submission includes the following:
Must
errorsorwarnings.cargo fmtwas run.CHANGELOG.mdin the proper section.Nice to have
This PR is taken from #666 and changes CI to check crates with the intended target. This is not extremely important but prevents weird cases where Xtensa/RISC-V asm is checked as x86 and produces warnings. This PR also ensures that the correct rustflags are set where necessary (i.e. checking S2 vs atomics).