-
Notifications
You must be signed in to change notification settings - Fork 1.4k
52 lines (43 loc) · 1.7 KB
/
linux_ci.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
# Basic linux ci workflow for model zoo.
# Runs model checker for models updated in the PR
name: Linux CI
# Triggers the workflow on push or pull request events but only for the main branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
architecture: ['x64']
steps:
- uses: actions/checkout@v2
name: Checkout repo
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install onnx onnxruntime requests py-cpuinfo
# Print CPU info for debugging ONNX Runtime inference difference
python -m cpuinfo
- name: Test updated ONNX_HUB_MANIFEST.json
run: |
python -m pip install typepy BeautifulSoup4 markdown pandas
python workflow_scripts/generate_onnx_hub_manifest.py --target diff --drop
git diff --exit-code -- ONNX_HUB_MANIFEST.json || { echo 'Please use "python workflow_scripts/generate_onnx_hub_manifest.py --target diff" to update ONNX_HUB_MANIFEST.json.' ; exit 1; }
- name: Test new models by onnx
run: |
python workflow_scripts/test_models.py --target onnx --drop
- name: Test new models by onnxruntime
run: |
python workflow_scripts/test_models.py --target onnxruntime --drop