-
Notifications
You must be signed in to change notification settings - Fork 77
55 lines (43 loc) · 1.36 KB
/
test_push.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
name: Build and Test
on: [push, pull_request]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Checkout master and HEAD
run: |
git checkout ${{ github.event.pull_request.head.sha }}
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Other dependencies Package
run: |
pip install ninja
- name: Install TensorLyaerX
run: |
pip install git+https://github.com/dddg617/TensorLayerX.git@nightly
- name: Install PyTorch, torchvision and torchaudio
run: |
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121
- name: Install llvmlite
run: |
pip install llvmlite
- name: Install package
run: |
python setup.py install build_ext --inplace
- name: Run TF tests
run: |
TL_BACKEND=tensorflow pytest
- name: Run TH tests
run: |
TL_BACKEND=torch pytest