forked from huggingface/optimum-graphcore
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.58 KB
/
test-general.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: tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: [3.8]
os: [ubuntu-20.04]
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Create and start a virtual environment
run: |
python -m venv general_venv --clear
source general_venv/bin/activate
- name: Install dependencies
run: |
source general_venv/bin/activate
pip install --upgrade pip
export SDK_PATH=/opt/gc/poplar_sdk-ubuntu_20_04-3.3*
pip install ${SDK_PATH}/poptorch-*.whl
pip install .[testing]
- name: Test with Pytest
env:
POPTORCH_WAIT_FOR_IPU: 1
run: |
source general_venv/bin/activate
export SDK_PATH=/opt/gc/poplar_sdk-ubuntu_20_04-3.3*
. ${SDK_PATH}/poplar-ubuntu_20_04*/enable.sh
. ${SDK_PATH}/popart-ubuntu_20_04*/enable.sh
pytest tests/ -v -n 16 --ignore=tests/pipelines/ --ignore=tests/test_examples_match_transformers.py
pytest tests/test_examples_match_transformers.py -v
- name: Upload PopTorch error log if present
if: always()
uses: actions/upload-artifact@v3
with:
name: poptorch_error
path: poptorch_error.log
if-no-files-found: ignore