-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.77 KB
/
weekly_mac_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
53
54
55
# Weekly ci workflow for model zoo.
# Runs model checker for all models
name: Weekly CI with latest onnx.checker
# Triggers the workflow on push or pull request events but only for the main branch
on:
schedule:
# run weekly on Sunday 23:59
- cron: '59 23 * * SUN'
pull_request:
branches: [main, rel-*]
workflow_dispatch:
jobs:
build:
if: github.event_name != 'pull_request' || contains( github.event.pull_request.labels.*.name, 'test ONNX Model Zoo')
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
name: Checkout repo
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
shell: bash
run: |
set -e
python -m pip install -q --upgrade pip
python -m pip install -q -r requirements-release.txt
- name: Build, install and test ONNX
shell: bash
run: |
# Install protobuf from source
export NUM_CORES=`sysctl -n hw.logicalcpu`
source workflow_scripts/protobuf/build_protobuf_unix.sh $NUM_CORES $(pwd)/protobuf/protobuf_install
# Build ONNX
export CC=clang
export CXX=clang++
export ONNX_ML=1
python setup.py --quiet install
- name: Test all models with onnx.checker and onnx.shape_inference
run: |
cd ..
git clone https://github.com/onnx/models.git
cd models
python ../onnx/workflow_scripts/test_model_zoo.py