Skip to content

Weekly CI with the latest ONNX and ONNX Model Zoo #15

Weekly CI with the latest ONNX and ONNX Model Zoo

Weekly CI with the latest ONNX and ONNX Model Zoo #15

Workflow file for this run

# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
# Weekly ci workflow for model zoo.
# Runs model checker/shape_inference/version_converter for all models
name: Weekly CI with the latest ONNX and ONNX Model Zoo
on:
schedule:
# run weekly on Sunday 23:59
- cron: '59 23 * * SUN'
pull_request:
branches: [main, rel-*]
workflow_dispatch:
permissions: # set top-level default permissions as security best practice
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
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@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
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@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
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
pip install -e . -v
- name: Test all models with onnx.checker, onnx.shape_inference, onnx.version_converter
run: |
python workflow_scripts/test_model_zoo.py