Skip to content
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

Check all option combinations in CI #26

Merged
merged 6 commits into from
Oct 31, 2024

Conversation

SergioGasquez
Copy link
Member

@SergioGasquez SergioGasquez commented Oct 29, 2024

  • Adds a --all-combinations flag to the check command
  • Modified the workflow to use that flag when running scheduled, and when running it manually we should be able to select if we want the flag or not
    • I couldnt test this, yet

CI test run: https://github.com/SergioGasquez/esp-generate/actions/runs/11570938398

@SergioGasquez SergioGasquez linked an issue Oct 29, 2024 that may be closed by this pull request
let result = result
.into_iter()
.filter(|opts| {
!opts.contains(&"wifi".to_string()) || !opts.contains(&"ble".to_string())
Copy link
Member

Choose a reason for hiding this comment

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

What's the purpose of this filter?

Copy link
Member Author

@SergioGasquez SergioGasquez Oct 29, 2024

Choose a reason for hiding this comment

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

Currently, when using ble and wifi, we throw an error: https://github.com/esp-rs/esp-generate/blob/main/src/main.rs#L408.

We should decide if we want to close the issue, and keep it like this. Or add support to allow using both options at the same time.

Copy link
Member

Choose a reason for hiding this comment

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

We can fix this later, but we should definitely fix it as they aren't really mutually exclusive.

Probably worth fixing after lands: esp-rs/esp-hal#2301 as it should simplify initializing things

Copy link
Member

Choose a reason for hiding this comment

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

We can fix this later, but we should definitely fix it as they aren't really mutually exclusive.

FYI, the TUI does not allow selecting both, this was a temporary fix to resolve #19. See this comment.

Copy link
Collaborator

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

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

Thanks

For the future I have two ideas

  • define the options somewhere else so the xtask and main could use the same source of truth since currently we need to duplicate options (and also the xtask doesn't take those optional things into account currently)
  • maybe we could have a way to allow generating into an existing directly (but only in CI with some magic ENV-var or something) and just remove the generated files between check runs and speed up checking by not having cargo check check a dependency if the features etc. didn change? (Not sure how feasible that is)

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

Thanks!

@jessebraham jessebraham added this pull request to the merge queue Oct 31, 2024
Merged via the queue into esp-rs:main with commit 719d794 Oct 31, 2024
8 checks passed
@SergioGasquez SergioGasquez deleted the feat/ci-combination branch October 31, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check all options combinations in CI
4 participants