Skip to content

Pass folder path to store initializers as files #4101

Pass folder path to store initializers as files

Pass folder path to store initializers as files #4101

Workflow file for this run

name: CI
on:
schedule:
# Run weekly on Mondays and Wednesdays 00:00
- cron: '00 00 * * MON,WED'
push:
branches:
- main
- 'gh/**/base' # ghstack base branches
- rel-*
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
name:
- py310
- py39
- py38
- py310-torch-nightly
- py310-onnx-weekly
- py310-ort-nightly
include:
- name: py310
python-version: "3.10"
nox-tag: test build
- name: py39
python-version: "3.9"
nox-tag: test
- name: py38
python-version: "3.8"
nox-tag: test
- name: py310-torch-nightly
python-version: "3.10"
nox-tag: test-torch-nightly
- name: py310-onnx-weekly
python-version: "3.10"
nox-tag: test-onnx-weekly
- name: py310-ort-nightly
python-version: "3.10"
nox-tag: test-ort-nightly
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install nox
run: python -m pip install nox
- name: Run tests
run: nox -t ${{ matrix.nox-tag }} --forcecolor -- -v --cov=onnxscript --cov-report=xml --cov-append --cov-branch -n=auto
env:
CACHE_ORT_SESSIONS: "${{ matrix.os == 'windows-latest' && '0' || '1' }}"
CATCH_ORT_SEGFAULT: "${{ matrix.os == 'ubuntu-latest' && '1' || '0' }}"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
build_docs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
cache-dependency-path: "**/requirements-dev.txt"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements-dev.txt
- name: Versions
run: |
pip list | grep numpy
pip list | grep onnx
pip list | grep torch
- name: Install package
run: pip install .
- name: Build documentation
run: python -m sphinx docs dist/html
update_readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Update readme
run: |
python docs/update_readme.py
git diff --exit-code -- 'README.md'
if [ $? -ne 0 ]; then
echo "Update readme by running `python docs/update_readme.py`"
exit 1
fi