Skip to content

Commit

Permalink
Add gpu tests on self-hosted runner
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Oct 29, 2023
1 parent 23dfe67 commit af167ab
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,34 @@ jobs:
- name: codecov
run: |
codecov
gpu:
name: Tests on Linux with Python 3.10
runs-on: ['self-hosted']
strategy:
fail-fast: false
timeout-minutes: 180
defaults:
run:
shell: bash -l {0}
env:
OMP_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
MKL_NUM_THREADS: 1
VECLIB_MAXIMUM_THREADS: 1
NUMEXPR_NUM_THREADS: 1
PYDEVD_DISABLE_FILE_VALIDATION: 1
steps:
- uses: holoviz-dev/holoviz_tasks/install@v0.1a17
with:
name: unit_test_suite
python-version: 3.10
channel-priority: strict
channels: pyviz/label/dev,numba,nvidia,rapidsai,conda-forge,nodefaults
envs: "-o tests -o gpu"
cache: true
conda-update: true
id: install
- name: doit test_unit_gpu
run: |
conda activate test-environment
doit test_unit_gpu
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
'scikit-image',
'spatialpandas',
],
'gpu': [
'cudf',
'cupy'
],
'examples': examples,
'examples_extra': examples + [
'networkx',
Expand Down
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[tox]
# python version test group extra envs extra commands
envlist = {py39,py310,py311}-{lint,unit,unit_nojit,unit_deploy,examples,all,examples_extra}-{default}-{dev,pkg}
envlist = {py39,py310,py311}-{lint,unit,unit_nojit,unit_gpu,unit_deploy,examples,all,examples_extra}-{default}-{dev,pkg}
build = wheel

[_lint]
Expand All @@ -19,6 +19,11 @@ description = Run unit tests
deps = .[tests]
commands = pytest datashader --cov=./datashader --cov-append

[_unit_gpu]
description = Run unit tests including GPU
deps = .[tests,gpu]
commands = pytest datashader

[_unit_deploy]
description = Run unit tests without coverage
deps = .[tests]
Expand Down

0 comments on commit af167ab

Please sign in to comment.