-
Notifications
You must be signed in to change notification settings - Fork 372
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
ci: smoke-run simulator on CI #1277
Conversation
32f8445
to
9605e83
Compare
- run: zig/zig build simulator_run -Dsimulator-state-machine=accounting -Doptimize=ReleaseSafe -- ${{ github.sha }} | ||
- run: zig/zig build simulator_run -Dsimulator-state-machine=testing -Doptimize=ReleaseSafe -- ${{ github.sha }} |
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.
🤔 Should we use the PR number instead? That way you can't "fix" a failing seed by just force-pushing with a different commit message.
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 I like commit hash more, as it is more hermetic. It is a bit more fragile, but hopefully everyone is diligent enough to create a follow-up issue anyway!
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.
Hermetic in a sense that you only need commit hash for a repro: with PR number, you still need commit hash, but you also need PR, which also is a tie to GitHub
.github/workflows/linux.yml
Outdated
# It would be a good idea to also _run_ a single iteration, | ||
# but that currently has some false failures :-) | ||
# TODO: Make so we have a single zig build simulator that does both | ||
# Run simulator once, using commit hash as a random, but also deterministic seed. |
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.
Nit: once (per state machine)
Normally, a seed is specified as a base-10 integer. However, as a special case, we allow using a Git hash (a hex string 40 character long). This is used by our CI, which passes current commit hash as a seed --- that way, we run simulator on CI, we run it with different, "random" seeds, but the the failures remain reproducible just from the commit hash!
9605e83
to
c7ce5a9
Compare
Normally, a seed is specified as a base-10 integer. However, as a special case, we allow using a Git hash (a hex string 40 character long). This is used by our CI, which passes current commit hash as a seed --- that way, we run simulator on CI, we run it with different, "random" seeds, but the the failures remain reproducible just from the commit hash!