-
Notifications
You must be signed in to change notification settings - Fork 22
57 lines (48 loc) · 1.28 KB
/
test_codegen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Test codegen.py in isolation of cuda.
name: test_codegen.py
on:
# Branch pushes to codegen related files
push:
branches:
- '**'
paths:
- ".github/workflows/test_codegen.yml"
- "swig/python/codegen/**"
- "tests/python/codegen/test_codegen.py"
# Allow manual invocation.
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
configure:
runs-on: ${{ matrix.cudacxx.os }}
strategy:
fail-fast: false
# Multiplicative build matrix
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
# Name the job based on matrix/env options
name: "test_codegen ${{matrix.python}}"
# Define job-wide env constants, and promote matrix elements to env constants for portable steps.
env:
PYTHON: ${{ matrix.python}}
steps:
- uses: actions/checkout@v3
- name: Select Python
if: ${{ env.PYTHON != ''}}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON }}
- name: Install python dependencies
if: ${{ env.PYTHON != ''}}
run: |
python3 -m pip install --upgrade pytest astpretty
- name: Run pytest on codegen.py
run: |
python3 -m pytest tests/python/codegen/test_codegen.py