Skip to content

Fix user-pinned DMA for Thunderbolt-connected devices #709

Fix user-pinned DMA for Thunderbolt-connected devices

Fix user-pinned DMA for Thunderbolt-connected devices #709

Workflow file for this run

name: 'test'
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-nix:
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v18
- run: nix flake check
- run: ./contrib/packaging/nix/ci.sh
build-dkms:
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: |
sudo apt update
sudo apt install -y dkms
sudo dkms add .
sudo dkms install tenstorrent/$(tools/current-version)
build-make:
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: |
sudo apt update
sudo apt install -y make sparse
- run: |
make -j $(nproc)
- uses: actions/upload-artifact@v4
with:
name: driver-${{ matrix.os }}
path: tenstorrent.ko
- run: |
make C=2 -j $(nproc)
build-tests:
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: |
make -C test -j $(nproc)
build-debian:
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: |
sudo apt update
sudo apt install -y dpkg-dev
- run: ./tools/build_debs.sh
- name: Collect debian packages
run: |
mkdir -p debian-packages
mv *.deb debian-packages/
- uses: actions/upload-artifact@v4
with:
name: debian-packages-${{ matrix.os }}
path: debian-packages/*.deb
if-no-files-found: error
- run: dpkg -c debian-packages/*.deb
test-debian:
needs: build-debian
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Download Debian packages
uses: actions/download-artifact@v4
with:
name: debian-packages-${{ matrix.os }}
path: ./packages
- name: Install Debian package
run: |
sudo apt-get update
sudo apt-get install -y dkms linux-headers-$(uname -r)
sudo apt-get install -y ./packages/*.deb
- name: Verify kernel module installation
run: |
# Check if DKMS module is installed
dkms status tenstorrent || (echo "DKMS module not found" && exit 1)
# Check if the module files exist
if ! find /lib/modules/$(uname -r)/{updates,extra}/ -type f \( -name 'tenstorrent.ko' -o -name 'tenstorrent.ko.zst' \) | grep -q .; then
echo "Kernel module file not found"
exit 1
fi
# Try to load the module
sudo modprobe tenstorrent
# Check if module is in the dependency tree
sudo depmod -a
modinfo tenstorrent
- name: Verify udev rule installation
run: |
# Check if udev rule file exists
if [ ! -f /etc/udev/rules.d/50-tenstorrent.rules ]; then
echo "ERROR: udev rule file not found at /etc/udev/rules.d/50-tenstorrent.rules"
exit 1
fi
echo "✓ udev rule installed correctly"
- name: Verify package installation
run: |
dpkg -l | grep tenstorrent
dpkg -L tenstorrent-dkms