Bump actions/checkout from 5.0.1 to 6.0.0 (#259) #904
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| permissions: | |
| contents: read | |
| on: | |
| schedule: | |
| # Run weekly on Mondays 00:00 | |
| - cron: '00 00 * * MON' | |
| push: | |
| branches: | |
| - main | |
| - 'gh/**/base' # ghstack base branches | |
| tags: | |
| - v* | |
| pull_request: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| merge_group: | |
| 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: | |
| - py313 | |
| - py312-onnx-weekly | |
| - py310 | |
| include: | |
| # Test the max and min supported versions of Python | |
| - name: py313 | |
| python-version: "3.13" | |
| nox-tag: test build | |
| - name: py312-onnx-weekly | |
| python-version: "3.12" | |
| nox-tag: test-onnx-weekly | |
| - name: py310 | |
| python-version: "3.10" | |
| nox-tag: test | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install nox | |
| run: uv pip install --system nox | |
| - name: Pull Test Data | |
| run: git lfs pull | |
| - name: Run tests | |
| env: | |
| NOX_DEFAULT_VENV_BACKEND: uv | |
| run: nox -t ${{ matrix.nox-tag }} --forcecolor -- --cov=src/onnx_ir --cov-report=xml --cov-append --cov-branch -n=auto --junitxml junit.xml | |
| - name: Upload coverage to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| build_docs: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install dependencies | |
| run: | | |
| uv pip install --system -r requirements-dev.txt | |
| - name: Versions | |
| run: | | |
| uv pip list | grep numpy | |
| uv pip list | grep onnx | |
| uv pip list | grep torch | |
| - name: Install package | |
| run: uv pip install --system . | |
| - name: Build documentation | |
| run: python -m sphinx docs dist/html | |
| build: | |
| name: Build | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| persist-credentials: false | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install Python build dependencies | |
| run: | | |
| uv pip install --system build wheel | |
| - name: Build wheels | |
| run: | | |
| python -m build | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v5 | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| with: | |
| name: dist | |
| path: dist | |
| release: | |
| name: Release | |
| environment: release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| needs: [test, build] | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Publish package | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| attestations: true |