Skip to content

Conversation

@ianm-nv
Copy link
Collaborator

@ianm-nv ianm-nv commented Sep 5, 2025

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.

- name: Find latest stable tag for branch
id: latest_tag
run: |
tag=$(git tag -l 'v6.12.*' --sort=-v:refname | head -1)
Copy link
Collaborator

@arighi arighi Sep 8, 2025

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
Copy link
Collaborator

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 }})
Copy link
Collaborator

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 }}
Copy link
Collaborator

@arighi arighi Sep 8, 2025

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
Copy link
Collaborator

@arighi arighi Sep 8, 2025

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.

@arighi
Copy link
Collaborator

arighi commented Sep 8, 2025

@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]>
@ianm-nv
Copy link
Collaborator Author

ianm-nv commented Sep 9, 2025

@arighi thanks for the review! I agree with your recommendations and I've updated the commit with those changes.

Copy link
Collaborator

@arighi arighi left a 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.

Copy link
Collaborator

@nirmoy nirmoy left a comment

Choose a reason for hiding this comment

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

LGTM

@ianm-nv ianm-nv merged commit 6190819 into NVIDIA:linux-nvidia-6.12 Sep 10, 2025
3 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.

3 participants