Skip to content

Commit 335206a

Browse files
authored
build deb workflow (#7)
1 parent d6b75a3 commit 335206a

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build-deb:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Install dependencies
12+
run: sudo apt-get install -y build-essential dpkg-dev
13+
- name: Download source deb
14+
run: |
15+
branch=$(echo $GITHUB_REF | cut -d'/' -f3)
16+
branch=${branch/-p2p/}
17+
# download source deb
18+
curl -o source.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/nvidia-kernel-source-550-open_${branch}-0ubuntu1_amd64.deb
19+
- name: Extract source deb
20+
run: dpkg-deb -R source.deb source-deb
21+
- name: Build kernel module
22+
run: |
23+
make modules -j$(nproc)
24+
- name: Replace kernel module
25+
run: |
26+
branch=$(echo $GITHUB_REF | cut -d'/' -f3)
27+
branch=${branch/-p2p/}
28+
cp kernel-open/nvidia/nv-kernel.o_binary source-deb/usr/src/nvidia-${branch}/nvidia/nv-kernel.o_binary
29+
cp kernel-open/nvidia-modeset/nv-modeset-kernel.o_binary source-deb/usr/src/nvidia-${branch}/nvidia-modeset/nv-modeset-kernel.o_binary
30+
- name: Repack deb
31+
run: dpkg-deb -b source-deb nvidia-kernel-source-550-open-0ubuntu1_amd64.deb
32+
- name: Upload deb
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: nvidia-kernel-source-550-open-0ubuntu1_amd64.deb
36+
path: nvidia-kernel-source-550-open-0ubuntu1_amd64.deb
37+

0 commit comments

Comments
 (0)