-
Notifications
You must be signed in to change notification settings - Fork 52
123 lines (99 loc) · 2.94 KB
/
tests.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Tests
on:
push:
branches: [main]
pull_request:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
build-docs:
if: github.repository == 'CentML/hidet' || github.repository == 'hidet-org/hidet'
runs-on: arc-runner-set
container:
image: nvidia/cuda:11.8.0-devel-ubuntu20.04
options: --gpus all
steps:
- name: Install dependencies via apt
run: |
apt update && DEBIAN_FRONTEND=noninteractive apt install -y ccache git graphviz
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.x'
- name: Setup Hidet
uses: ./.github/actions/setup-hidet
- name: List installed packages
run: |
pip list
- name: Install docs dependencies
run: |
pip install -r docs/requirements.txt
- name: Build docs
run: |
cd docs; make clean; make html
list-test-dirs:
if: github.repository == 'CentML/hidet' || github.repository == 'hidet-org/hidet'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout Hidet
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- id: set-matrix
run: |
python .github/scripts/set_test_matrix.py
run-test:
needs: list-test-dirs
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.list-test-dirs.outputs.matrix) }}
runs-on: arc-runner-set
container:
image: nvidia/cuda:11.8.0-devel-ubuntu20.04
steps:
- name: Install dependencies via apt
run: |
apt update && DEBIAN_FRONTEND=noninteractive apt install -y ccache git graphviz
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.19.x'
- name: Setup Hidet
uses: ./.github/actions/setup-hidet
- name: List installed packages
run: |
pip list
# Run tests
- name: Run tests
run: |
rm -rf ~/.config/hidet
python -m pytest -v --durations=20 --clear-cache ${{ matrix.path }}
final-status-indicator:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Pass All Functional Tests
needs: [run-test]
steps:
- run: exit 1
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}