-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (52 loc) · 1.52 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
name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04 ]
arch: [ x86_64 ]
python_version: [ "3.11" ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Ccache for C++ compilation
uses: hendrikmuhs/ccache-action@621a41397ed83711c72862638d9ff6e63fca3041 # v1.2.3
with:
key: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.python_version }}
# LLVM needs serious cache size
max-size: 6G
- name: Install linker
run: |
sudo apt-get update
sudo apt-get install -y lld
- name: Install
env:
CMAKE_EXE_LINKER_FLAGS_INIT: "-fuse-ld=ld.lld"
CMAKE_STATIC_LINKER_FLAGS_INIT: "-fuse-ld=ld.lld"
CMAKE_SHARED_LINKER_FLAGS_INIT: "-fuse-ld=ld.lld"
CMAKE_MODULE_LINKER_FLAGS_INIT: "-fuse-ld=ld.lld"
run: |
pip install -r requirements.txt
pip install . -v
- name: Unit tests
run: |
PYTHONPATH=tests pytest tests/unit
- name: Test vs. torch-mlir test-suite
run: |
pip install -r tests/torch_mlir/torch-mlir-requirements.txt
PYTHONPATH=tests/torch_mlir python tests/torch_mlir/main.py