-
Notifications
You must be signed in to change notification settings - Fork 43
NVIDIA: SAUCE: ci: add workflow to rebase linux-nvidia-6.12 onto latest v6.12.x #205
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
Conversation
| - name: Find latest stable tag for branch | ||
| id: latest_tag | ||
| run: | | ||
| tag=$(git tag -l 'v6.12.*' --sort=-v:refname | head -1) |
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.
We can probably use the following to get the latest upstream tag in a more generic way without hard-coding v6.12:
version=$(echo ${{ github.ref_name }} | sed 's/^linux-nvidia-//')
tag=$(git describe --abbrev=0 --tags upstream/linux-${version}.y)
| echo "tag=$tag" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Fetch patch branch | ||
| run: git fetch origin linux-nvidia-6.12 |
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.
Same here:
git fetch origin ${{ github.ref_name }}
| - name: Find merge base between patch branch and updated LTS | ||
| id: merge_base | ||
| run: | | ||
| base=$(git merge-base origin/linux-nvidia-6.12 ${{ steps.latest_tag.outputs.tag }}) |
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.
Ditto:
base=$(git merge-base origin/${{ github.ref_name }} ${{ steps.latest_tag.outputs.tag }})
|
|
||
| - name: Push rebased patch branch | ||
| run: | | ||
| git push origin HEAD:linux-nvidia-6.12-${{ steps.latest_tag.outputs.tag }} |
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.
We can probably add --force here, so if we apply more "SAUCE" patches to our repo it'll update the rebased branch automatically. At the end these are just temporary branches automatically generated, so we shouldn't care about overwriting them.
And:
git push origin HEAD:{{ github.ref_name}}-${{ steps.latest_tag.outputs.tag }}
| @@ -0,0 +1,57 @@ | |||
| name: Update and Rebase linux-nvidia-6.12 | |||
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.
Maybe:
name: Update and Rebase ${{ github.ref_name }}
Or just:
name: Update and Rebase
So we can reuse the same github action across multiple kernels.
|
@ianm-nv this is your github action with the suggestions I mentioned: arighi@cf43c7c |
…st v6.12.x Add a GitHub Actions workflow that: -Set to run on an interval schedule, currently daily at 00:00 UTC. -Fetches and finds the latest linux-stable tag. -Computes the merge-base with origin/linux-nvidia-6.12 -Rebases linux-nvidia-6.12 branch onto that tag -For safety, push as a new branch linux-nvidia-6.12-<stable-tag> The push of the new branch should trigger our kernel build action If build succeeds we can then manual review and force push to linux-nvidia-6.12. Signed-off-by: Ian May <[email protected]>
de4af48 to
130f3f4
Compare
|
@arighi thanks for the review! I agree with your recommendations and I've updated the commit with those changes. |
arighi
left a comment
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.
LGTM!
We could also enable this action on push, so anytime we apply a "SAUCE" patch we also refresh the latest rebase, but we can do this in a separate PR.
nirmoy
left a comment
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.
LGTM
Add a GitHub Actions workflow that:
-Set to run on an interval schedule, currently daily at 00:00 UTC.
-Fetches and finds the latest linux-stable tag.
-Computes the merge-base with origin/linux-nvidia-6.12
-Rebases linux-nvidia-6.12 branch onto that tag
-For safety, push as a new branch linux-nvidia-6.12-
The push of the new branch should trigger our kernel build action.
If build succeeds we can then manual review and force push to linux-nvidia-6.12.