From 648cf4134c92ef284886a71dde78709e7ebab511 Mon Sep 17 00:00:00 2001 From: Saqib Khan <11544614+saqibkh@users.noreply.github.com> Date: Tue, 29 Sep 2026 14:31:01 -0500 Subject: [PATCH] CI: run cust's tests on a simulated GPU The Linux jobs exclude cust from cargo test because its tests need an NVIDIA GPU. PantheonSim simulates one on the runner's CPU; this job runs cust's unit and doc tests there. --- .github/workflows/ci_linux.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index be6aaf11..388abe3f 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -264,3 +264,27 @@ jobs: run: shopt -s globstar && rustfmt --check tests/compiletests/ui/**/*.rs - name: Compiletest run: cargo run -p compiletests --release --no-default-features -- --target-arch compute_61,compute_75,compute_90 + + # cust's tests need a GPU, so the jobs above exclude them. PantheonSim + # simulates one on the runner's CPU and they run there. It checks results, + # not performance. + test-cust-simulated-gpu: + name: Test cust / simulated GPU + # Reads the repository only; the simulator's action uses no token or secrets. + permissions: + contents: read + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up CUDA and a simulated GPU + uses: pantheongpu/setup-pantheonsim@06648b8c0cb091584196678593215db2e16bd7eb # v0.1.2 + with: + gpu: nvidia/t4 + cuda-toolkit: '12.8' + - name: Install libclang for bindgen + run: sudo apt-get install -y libclang-dev + - name: Test cust + env: + CUDA_PATH: /usr/local/cuda-12.8 + run: cargo test -p cust