forked from NVIDIA/open-gpu-kernel-modules
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6b75a3
commit 335206a
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build-deb: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: sudo apt-get install -y build-essential dpkg-dev | ||
- name: Download source deb | ||
run: | | ||
branch=$(echo $GITHUB_REF | cut -d'/' -f3) | ||
branch=${branch/-p2p/} | ||
# download source deb | ||
curl -o source.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/nvidia-kernel-source-550-open_${branch}-0ubuntu1_amd64.deb | ||
- name: Extract source deb | ||
run: dpkg-deb -R source.deb source-deb | ||
- name: Build kernel module | ||
run: | | ||
make modules -j$(nproc) | ||
- name: Replace kernel module | ||
run: | | ||
branch=$(echo $GITHUB_REF | cut -d'/' -f3) | ||
branch=${branch/-p2p/} | ||
cp kernel-open/nvidia/nv-kernel.o_binary source-deb/usr/src/nvidia-${branch}/nvidia/nv-kernel.o_binary | ||
cp kernel-open/nvidia-modeset/nv-modeset-kernel.o_binary source-deb/usr/src/nvidia-${branch}/nvidia-modeset/nv-modeset-kernel.o_binary | ||
- name: Repack deb | ||
run: dpkg-deb -b source-deb nvidia-kernel-source-550-open-0ubuntu1_amd64.deb | ||
- name: Upload deb | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nvidia-kernel-source-550-open-0ubuntu1_amd64.deb | ||
path: nvidia-kernel-source-550-open-0ubuntu1_amd64.deb | ||
|