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

Run some checks on windows #2730

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

Run some checks on windows #2730

wants to merge 72 commits into from

Conversation

cptartur
Copy link
Member

Closes #2716

Introduced changes

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added relevant tests
  • Performed self-review of the code
  • Added changes to CHANGELOG.md

@cptartur cptartur marked this pull request as ready for review December 5, 2024 10:28
Copy link
Contributor

@ddoktorski ddoktorski left a comment

Choose a reason for hiding this comment

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

Should we also update the scheduled workflow? Perhaps it's worth considering running tests on Windows only there instead of on every CI.

.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
crates/forge-runner/src/lib.rs Show resolved Hide resolved
crates/sncast/src/state/state_file.rs Outdated Show resolved Hide resolved
scripts/install_devnet.ps1 Outdated Show resolved Hide resolved
"No such file or directory [..]"
"[..] file [..]"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we make this failure message dependent on platform (applies to other places)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I'd do the opposite. We should wrap these errors so we don't output OS errors directly to the user. And specifically, we shouldn't assert specific os errors in tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

But until we do so, maybe I can assert the os specific error here

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed all of them to be OS dependent except for one assert that asserted the path scripts/.

#[should_panic(expected: "No such file or directory (os error 2)")]
#[should_panic(expected: "file")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above

.github/workflows/ci.yml Show resolved Hide resolved
Comment on lines 3 to 5
env:
DEVNET_TAG: "v0.2.2"

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should use commit hash because it is immutable, unlike a tag which is mutable therefore could theoretically pose some risk.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This still needs to be changed 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated here as well

crates/sncast/src/state/state_file.rs Outdated Show resolved Hide resolved
Comment on lines 3 to 5
env:
DEVNET_TAG: "v0.2.2"

Copy link
Collaborator

Choose a reason for hiding this comment

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

This still needs to be changed 😅

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we really need all these comments?

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed

.github/workflows/ci.yml Outdated Show resolved Hide resolved
Co-authored-by: Franciszek Job <[email protected]>
Copy link
Contributor

@ddoktorski ddoktorski left a comment

Choose a reason for hiding this comment

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

I still think it would be better to test Windows only in the scheduled workflow. Testing it with every single change isn’t crucial and overall it will slow down our CI and make it harder to maintain.

.github/workflows/ci.yml Show resolved Hide resolved
@ddoktorski
Copy link
Contributor

Can we create an issue to investigate whether the cache action functions correctly, considering that the first CI run on a branch takes significantly longer than subsequent runs, and on Windows it is much longer than on Linux?

Example:
https://github.com/foundry-rs/starknet-foundry/actions/runs/12178894598/job/33969862907 <- first run does not find any cache
https://github.com/foundry-rs/starknet-foundry/actions/runs/12179972960/job/33973292419

@cptartur
Copy link
Member Author

Can we create an issue to investigate whether the cache action functions correctly, considering that the first CI run on a branch takes significantly longer than subsequent runs, and on Windows it is much longer than on Linux?

Example: https://github.com/foundry-rs/starknet-foundry/actions/runs/12178894598/job/33969862907 <- first run does not find any cache https://github.com/foundry-rs/starknet-foundry/actions/runs/12179972960/job/33973292419

@ddoktorski I'd just merge this and we'll see if te build times are problematic. And if so, we can disable these checks at any time.

Comment on lines +14 to +16
#[cfg(not(target_os = "windows"))]
mod fork_warning;
#[cfg(not(target_os = "windows"))]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any issue that addresses the removal of these?

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.

Run scheduled tests on windows machine
4 participants