-
Notifications
You must be signed in to change notification settings - Fork 8
166 lines (131 loc) · 4.24 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
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 * * *'
jobs:
test-mlir-bindings:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-11, windows-2022 ]
py_version: [ "3.10", "3.11", "3.12" ]
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 -f https://makslevental.github.io/wheels
mlir-python-utils-generate-all-upstream-trampolines
- 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-11, 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: |
export PIP_FIND_LINKS=https://makslevental.github.io/wheels
HOST_MLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir pip install .[test,jax] -v
jaxlib-mlir-python-utils-generate-all-upstream-trampolines
- 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
sed -i.bak 's/OUTPUT_TIMEOUT = 10/OUTPUT_TIMEOUT = 100/g' \
$(python -c 'import site; print(site.getsitepackages()[0])')/jupyter_client/runapp.py
BRANCH=${{ github.ref_name }} jupyter run examples/mlir_python_utils.ipynb
mlir-bindings-aarch64:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04 ]
py_version: [ "3.10", "3.11", "3.12" ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install, configure, and test
uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu20.04
dockerRunArgs: --volume "${{ github.workspace }}:/workspace"
install: |
apt-get update -q -y
apt-get install -y wget build-essential
mkdir -p ~/miniconda3
wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O miniconda.sh
bash miniconda.sh -b -u -p /root/miniconda3
eval "$(/root/miniconda3/bin/conda shell.bash hook)"
conda init
run: |
eval "$(/root/miniconda3/bin/conda shell.bash hook)"
conda create -n env -q -y -c conda-forge/label/python_rc python=${{ matrix.py_version }}
conda activate env
cd /workspace
pip install -q .[test,mlir] -f https://makslevental.github.io/wheels
mlir-python-utils-generate-all-upstream-trampolines
pytest --capture=tee-sys tests
python examples/mwe.py