Skip to content

use nvidia github runners #10

use nvidia github runners

use nvidia github runners #10

Workflow file for this run

name: Tests
on:
push:
branches:
- "pull-request/[0-9]+"
concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true
jobs:
check-changes:
if: github.repository == 'NVIDIA/tilus'
runs-on: ubuntu-latest
outputs:
should_run_tests: ${{ steps.changed-files.outputs.any_changed }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for changes in test-relevant directories
id: changed-files
uses: step-security/changed-files@v46
with:
files: |
tests/**
python/**
docs/**
examples/**
tests:
needs: check-changes
if: github.repository == 'NVIDIA/tilus' && needs.check-changes.outputs.should_run_tests == 'true'
continue-on-error: true
strategy:
matrix:
runner:
- linux-amd64-gpu-l4-latest-1
runs-on: ${{ matrix.runner }}
container:
image: nvidia/cuda:12.6.2-devel-ubuntu22.04
options: --gpus all
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup and Install Tilus
id: setup-and-install
uses: ./.github/actions/setup-environment
with:
python-version: '3.10'
- name: Run tests
run: pytest ./tests
- name: Run examples
run: |
bash .github/workflows/scripts/run-examples.sh
skip-tests:
needs: check-changes
if: github.repository == 'NVIDIA/tilus' && needs.check-changes.outputs.should_run_tests != 'true'
runs-on: ubuntu-latest
steps:
- name: Skip tests
run: |
echo "No changes detected in tests, python, docs, or examples directories. Skipping tests."