-
Notifications
You must be signed in to change notification settings - Fork 8k
Verify bundled sources using CI #20179
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
base: master
Are you sure you want to change the base?
Conversation
626ac97
to
c3094b6
Compare
c3094b6
to
c1085de
Compare
@iluuu1994 @dstogov @nielsdos can I have your review here? |
uses: actions/checkout@v5 | ||
with: | ||
repository: dstogov/ir | ||
ref: 5a81104e650ebd7ac24eb63d4dff67db723a5278 |
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.
Do you propose to change this file every time when IR is updated?
Is it possible to parse GIT commit? or introduce some special file in the IR directory instead?
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.
Yes. It can be replaced using simple regex or yq
utility possibly.
yq command:
yq 'with(.jobs[].steps[] | select(.with.repository == "dstogov/ir") | .with.ref = "xyz"; .)' verify-bundled-files.yml
rm -r .git .github/workflows bench examples tests tools README.md TODO ir.g ir_cpuinfo.c ir_emit_c.c ir_emit_llvm.c ir_load.c ir_load_llvm.c ir_main.c ir_mem2ssa.c | ||
git restore README | ||
git add . -N && git diff --cached -a --exit-code . && git diff -a --exit-code . |
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.
This comparison doesn't look robust. It's going to be broken every time when a new IR file is introduced.
Instead of using GIT tricks, the comparison could be implemented using rsync
or just md5sum
.
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.
It won't be broken when a new IR file is introduced. It will be broken when a new "not copied" file is introduced.
Currently there are several files not copied and these files are ignored manually.
initial PR of #19802
The new CI asserts all bundled files are up-to-date and the CI code also provides trusted documentation of how the bundled deps were added.
On push/PR the CI is run only if the bundled files were changed.