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

[ci] Add "nightly" option to install-circt action #3452

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

seldridge
Copy link
Member

Add support for grabbing the latest nightly version of firtool to the
install-circt action. This requires passing the "github.token" so that
the GitHub API can be used. Note that the token is marked as "required",
however, it is only actually needed when using a nightly build.

@seldridge seldridge added the No Release Notes Exclude from release notes, consider using Internal instead label Aug 3, 2023
@seldridge seldridge requested a review from jackkoenig August 3, 2023 03:40
Add support for grabbing the latest nightly version of `firtool` to the
install-circt action.  This requires passing the "github.token" so that
the GitHub API can be used.  Note that the token is marked as "required",
however, it is only actually needed when using a nightly build.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@seldridge seldridge force-pushed the dev/seldridge/install-circt-nigthly branch from a136e2c to 4f2bfb2 Compare August 3, 2023 21:55
Comment on lines +8 to +11
github-token:
description: 'The GitHub token used to download CIRCT nightly'
required: true
default: ${{ github.token }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing it's required that this be threaded through and you can't just always use ${{ github.token }}? If so, what's the point of the default? If it need not be threaded through then maybe don't bother passing it at every call site?

Copy link
Member Author

Choose a reason for hiding this comment

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

Empirically, it had to be threaded through. Supporting evidence is that you see this with other actions. E.g., the docs mention passing the token to the labeler action (https://docs.github.com/en/actions/security-guides/automatic-token-authentication#example-1-passing-the-github_token-as-an-input) and they seem to do it with the default (https://github.com/actions/labeler/blob/main/action.yml#L6-L8). I cargo-culted this from there.

If this isn't an error, then it may be so that you can test the action in isolation (where you have a github.token). However, I couldn't get this to just grab the token from the other action without passing it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think if it's required, there's no point in having a default right?

Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

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

LGTM although see the question/suggestion on the github-token argument.

@seldridge seldridge enabled auto-merge (squash) August 3, 2023 22:19
@seldridge seldridge merged commit 5fc03cd into main Aug 3, 2023
@seldridge seldridge deleted the dev/seldridge/install-circt-nigthly branch August 3, 2023 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Release Notes Exclude from release notes, consider using Internal instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants