Skip to content

[CIR][Github][CI] Add clangir upstream rebase workflow #1345

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

Merged
merged 1 commit into from
Feb 28, 2025
Merged

Conversation

xlauko
Copy link
Collaborator

@xlauko xlauko commented Feb 13, 2025

No description provided.

@xlauko
Copy link
Collaborator Author

xlauko commented Feb 13, 2025

@lanza I believe this does the job. To be secure at the moment it just creates rebased-main without push to main.

@xlauko
Copy link
Collaborator Author

xlauko commented Feb 13, 2025

It needs to be triggered manually at the moment. I think we can let it run every night then?

Before that, we need to setup WORKFLOW_TOKEN to have access to write to repo.

@lanza
Copy link
Member

lanza commented Feb 13, 2025

It needs to be triggered manually at the moment. I think we can let it run every night then?

Yea that makes sense IMO. I don't remember if we talked about this, but I don't think it should actualyl push every night. That would cause unnecessary churn on PRs where they are submitted on day X, we rebase on night X, and thus the PRs broken by the time they are reviewed on day X+1.

Before that, we need to setup WORKFLOW_TOKEN to have access to write to repo.

But I have no clue how to do either of these things, never really touched github actions. Do you need extra permissions to do this or something?

Only change I can think of for the diff would to add an optional -x or something that does the --exec 'ninja -C build check-clang-cir' functionality. Then the script can be used for performing manual rebases where we need human intervention.

@xlauko xlauko force-pushed the main branch 3 times, most recently from 67b84f2 to 40e59b1 Compare February 28, 2025 13:36
@xlauko xlauko marked this pull request as ready for review February 28, 2025 13:37
@xlauko
Copy link
Collaborator Author

xlauko commented Feb 28, 2025

Finally got back to this.

Tests are failing because I modified the generic LLVM workflow, which does not enable CLANGIR but still attempts to run its tests. This shouldn't be an issue when merged.

Currently, this needs to be triggered manually. It will create a branch named rebased-${{ github.ref_name }}, i.e., the branch on which this workflow is running (most likely main).

It's failing on rebase due to merge conflicts, so the next rebase needs to be done manually. However, you can use:

sh ./.github/workflows/rebase-clangir-onto-llvm-upstream.sh rebased-main --checked

to start the rebase locally. (Note. --checked option adds --exec 'ninja -C build check-clang-cir' to rebase command)

The WORKFLOW_TOKEN is still not set up—I assume I don't have enough permissions yet. Let me know if you need a step-by-step guide to set it up.

@lanza
Copy link
Member

lanza commented Feb 28, 2025

Currently, this needs to be triggered manually. It will create a branch named rebased-${{ github.ref_name }}, i.e., the branch on which this workflow is running (most likely main).

Okay I'll kick off a rebase over the next few days.

The WORKFLOW_TOKEN is still not set up—I assume I don't have enough permissions yet. Let me know if you need a step-by-step guide to set it up.

I guess there's a level of permissions only Tom Stellard can grant? So yea, I have no idea what to do for that :p

@xlauko
Copy link
Collaborator Author

xlauko commented Feb 28, 2025

Ok I will merge it then, and let us first see whether the script works locally for you :)

@xlauko xlauko merged commit eb6b63d into llvm:main Feb 28, 2025
7 of 10 checks passed
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.

2 participants