Skip to content

Commit

Permalink
build deb workflow (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
wozeparrot authored May 10, 2024
1 parent d6b75a3 commit 335206a
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
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

0 comments on commit 335206a

Please sign in to comment.