forked from onnx/onnx-tensorflow
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (63 loc) · 2.84 KB
/
test-backend.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
name: Backend test
on: [push, pull_request]
jobs:
unittest:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ startsWith(matrix.onnx-version, 'git+') }}
strategy:
matrix:
# Test current versions on all platforms
# - use oldest and latest supported python versions
# - use pinned versions for current onnx-tf release
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.8, 3.9]
onnx-version: ['onnx==1.10.2']
tensorflow-version: ['tensorflow==2.8.0 tensorflow-addons==0.16.1 tensorflow_probability==0.16.0']
include:
- # Test previous versions on Linux only (regression)
# - use pinned versions for previous onnx-tf release
os: ubuntu-latest
python-version: 3.8
onnx-version: 'onnx==1.10.2'
tensorflow-version: 'tensorflow==2.8.0 tensorflow-addons==0.16.1 tensorflow_probability==0.16.0'
- # Test development versions on Linux only
# - latest development versions
# - allow failure via GitHub branch protection rule
os: ubuntu-latest
python-version: 3.9
onnx-version: 'onnx==1.11.0'
tensorflow-version: 'tensorflow==2.8.0 tensorflow-addons==0.16.1 tensorflow_probability==0.16.0'
steps:
- name: Checkout ONNX-TF
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies, ONNX ${{ matrix.onnx-version }}
if: ${{ matrix.onnx-version == 'development' }}
run: |
pip install pytest tabulate ${{ matrix.tensorflow-version }}
ONNX_TF_PATH=$(pwd)
#build onnx
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
tmp_dir=$(mktemp -d)
git clone https://github.com/onnx/onnx.git $tmp_dir
cd $tmp_dir
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
docker run --rm -v $(pwd):/github/workspace --workdir /github/workspace --entrypoint bash \
quay.io/pypa/manylinux2010_x86_64 .github/workflows/manylinux/entrypoint.sh ${{ matrix.python-version }} manylinux2010_x86_64 pull_request
#install onnx
pip install dist/*manylinux2010_x86_64.whl
cd $ONNX_TF_PATH
pip install -e .
- name: Install dependencies, ONNX ${{ matrix.onnx-version }}
if: ${{ startsWith(matrix.onnx-version, 'onnx==') }}
run: |
pip install pytest tabulate ${{ matrix.tensorflow-version }}
pip install ${{ matrix.onnx-version }}
pip install -e .
- name: Run Backend tests
run: |
python -m unittest discover test -v