-
Notifications
You must be signed in to change notification settings - Fork 8
145 lines (114 loc) · 3.48 KB
/
test.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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
branches:
- main
schedule:
# At minute 0 past hour 6. (see https://crontab.guru)
- cron: '00 06 * * *'
concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
# queued and in-progress runs for the same PR (presubmit) or commit
# (postsubmit).
group: ci-build-test-${{ github.event.number || github.sha }}
cancel-in-progress: true
env:
SYSTEM_VERSION_COMPAT: 0
PIP_FIND_LINKS: "https://github.com/llvm/eudsl/releases/expanded_assets/latest https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest"
jobs:
test-mlir-bindings:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-13, macos-14, windows-2022, ubuntu-22.04-arm ]
py_version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
exclude:
- os: macos-13
py_version: "3.9"
- os: macos-14
py_version: "3.9"
name: "${{ matrix.os }}-${{ matrix.py_version }}"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_version }}
allow-prereleases: true
- name: Install and configure
shell: bash
run: |
pip install .[test,mlir] -v
- name: Test
shell: bash
run: |
if [ ${{ matrix.os }} == 'windows-2022' ]; then
pytest -s tests
else
pytest --capture=tee-sys tests
fi
- name: Test mwe
shell: bash
run: |
python examples/mwe.py
test-other-host-bindings:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-13, macos-14, windows-2022 ]
py_version: [ "3.10", "3.11" ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_version }}
allow-prereleases: true
- name: Install and configure
shell: bash
run: |
pip install .[test,mlir] -v
HOST_MLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir pip install .[test,jax] -v
- name: Test
shell: bash
run: |
if [ ${{ matrix.os }} == 'windows-2022' ]; then
pytest -s tests/test_other_hosts.py
else
pytest --capture=tee-sys tests/test_other_hosts.py
fi
test-jupyter:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04 ]
py_version: [ "3.10" ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_version }}
allow-prereleases: true
- name: Run notebook
shell: bash
run: |
pip install jupyter
pip install -q mlir-python-bindings
pip install -q .
sed -i.bak 's/OUTPUT_TIMEOUT = 10/OUTPUT_TIMEOUT = 100/g' \
$(python -c 'import site; print(site.getsitepackages()[0])')/jupyter_client/runapp.py
jupyter execute examples/mlir_python_extras.ipynb
jupyter execute examples/vectorization_e2e.ipynb