fix: token (#9) #4
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
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 | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: nvidia-kernel-source-550-open-0ubuntu1_amd64.deb | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |