Skip to content

Check CUDA.

Check CUDA. #6

name: Build and run tests
on: [push]
jobs:
build:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: Jimver/cuda-toolkit@v0.2.16
id: cuda-toolkit
with:
cuda: '11.8.0'
- name: Check CUDA
if: matrix.os == 'ubuntu-latest'
run: 'ls /usr/local/cuda-11.8/lib64 && nvcc --version'
- name: Build wheels
run: 'pip wheel .'
- uses: actions/upload-artifact@v4
with:
path: ./*.whl
run:
name: Test on ${{ matrix.os }} with python ${{ matrix.python-version }}
needs: [build]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v2
with:
name: artifact
path: built_wheels
- name: Install packages
run: python -m pip install --no-index --find-links=./built_wheels torchoptix
- name: Test import
run: python -c "import torchoptix; help(torchoptix)"