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

gha: verilator: Add '--locked' to sccache install #559

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

wkkuna
Copy link
Contributor

@wkkuna wkkuna commented Jul 24, 2024

Having run a workflow (first time in a while) in the fork repository I noticed the Install sccache step fail to compile gha-toolkit.

Link to failed workflow log: https://github.com/antmicro/caliptra-rtl/actions/runs/10059008558/job/27805130656

Adding --locked flag to cargo install ensures the crates used to build the sccache are exactly those that are specified by Cargo.lock.

The tool build log with --locked flag (note: this workflow may fail as I'm currently testing a new feature in the github flow): https://github.com/antmicro/caliptra-rtl/actions/runs/10072642584/job/27844989866#step:5:1

@calebofearth
Copy link
Collaborator

Cool! I had just updated the SCCACHE version to 0.8.1 to get around this in my other PR, which also solves the issue.
Any reason we want to leave this on 0.3.3?
Either way, the SCCACHE install is also performed in https://github.com/antmicro/caliptra-rtl/blob/wkuna/sccache-install-fix/.github/workflows/interactive-debugging.yml, can you update it there as well?

@wkkuna wkkuna force-pushed the wkuna/sccache-install-fix branch from 88c53e0 to 18f2654 Compare July 25, 2024 07:21
@wkkuna
Copy link
Contributor Author

wkkuna commented Jul 25, 2024

Thanks for a quick reply!
Sure thing, added it to interactive-debugging.yml as well.

Any reason we want to leave this on 0.3.3?

None that I know of.

Use exact crate versions specified by Cargo.lock.

Signed-off-by: Wiktoria Kuna <wkuna@antmicro.com>
@wkkuna wkkuna force-pushed the wkuna/sccache-install-fix branch from 18f2654 to 3f3473c Compare July 26, 2024 07:35
calebofearth
calebofearth previously approved these changes Jul 29, 2024
@calebofearth
Copy link
Collaborator

Ah, looks like there's another workflow issue. You'll need to add

     permissions:
      pages: write
      id-token: write

in pull_request.yml for the doc_gen job.
For reference, see: https://github.com/chipsalliance/caliptra-rtl/pull/558/files#diff-a0fe23534b616d51ce686d2a1bcd1a78bc75074aef1a2f6ee96c9469991e1a4c

Signed-off-by: Wiktoria Kuna <wkuna@antmicro.com>
calebofearth
calebofearth previously approved these changes Aug 2, 2024
@calebofearth
Copy link
Collaborator

@wkkuna Thanks for the updates.
Compile.yml Check is failing - I'm not sure why. Need to debug this.
Hash Check is failing - to fix that you'll need to run stamp_repo.sh and commit the changes to pr_hash and pr_timestamp. This is meant to be an automated step that reflects your branch passing an internal pipeline, but because you're only updating pipeline files it needs to be manual this time. I intend to update this so it's less burdensome in the future. This step needs to be the last commit in the PR, so we need to root-cause and fix the compile.yml check first.

@calebofearth
Copy link
Collaborator

@wkkuna Thanks for the updates. Compile.yml Check is failing - I'm not sure why. Need to debug this. Hash Check is failing - to fix that you'll need to run stamp_repo.sh and commit the changes to pr_hash and pr_timestamp. This is meant to be an automated step that reflects your branch passing an internal pipeline, but because you're only updating pipeline files it needs to be manual this time. I intend to update this so it's less burdensome in the future. This step needs to be the last commit in the PR, so we need to root-cause and fix the compile.yml check first.

Just had to rerun the job to get the compile.yml check to pass.
Can you run the stamp-repo script I mentioned? Then this PR should be g2g. Thanks!

@wkkuna
Copy link
Contributor Author

wkkuna commented Aug 5, 2024

@calebofearth Ran the script locally and committed new hashes.

calebofearth
calebofearth previously approved these changes Aug 5, 2024
@calebofearth
Copy link
Collaborator

@calebofearth Ran the script locally and committed new hashes.

Looks like the committed hash is incorrect. Do you have local file modifications where you checked out this branch?
I was able to clone your branch to my area and produce the expected hash, so either you have local edits to your branch or the script is behaving differently in your environment for some reason. Can you retry it with a pristine checkout?

The changes apply only to the github workflow flow,
simulate a pass from internal workflow.

Signed-off-by: Wiktoria Kuna <wkuna@antmicro.com>
@wkkuna
Copy link
Contributor Author

wkkuna commented Aug 6, 2024

Sorry, I didn't realize. Checked file_hash.sh locally, should be ok now.

@calebofearth calebofearth merged commit 5ca1be7 into chipsalliance:main Aug 7, 2024
56 checks passed
@kiryk kiryk deleted the wkuna/sccache-install-fix branch September 11, 2024 08:33
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.

4 participants