[Release] 0.1.80 (#237) #563
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 | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| test: | |
| runs-on: self-hosted | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip wheel setuptools | |
| pip install . | |
| pip install pytest pytest-xdist onnxruntime timm torchvision coverage onnxconverter_common --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu | |
| - name: Create coverage config | |
| run: | | |
| echo "[run]" > .coveragerc | |
| echo "omit = onnxslim/third_party/*, onnxslim/misc/*, config.py, config-3.py, onnxslim/tests/test_benchmark.py, onnxslim/tests/conftest.py" >> .coveragerc | |
| # - name: yolo test | |
| # if: matrix.python-version <= '3.11' | |
| # run: | | |
| # pip install ultralytics | |
| # coverage run --parallel-mode -m pytest tests/test_yolo.py -sv | |
| # Add --parallel-mode to each test | |
| - name: Run all tests | |
| run: | | |
| coverage run --parallel-mode -m pytest tests/test_onnxslim.py | |
| coverage run --parallel-mode -m pytest tests/test_modelzoo.py | |
| coverage run --parallel-mode -m pytest tests/test_pattern_matcher.py | |
| coverage run --parallel-mode -m pytest tests/test_pattern_generator.py | |
| coverage run --parallel-mode -m pytest tests/test_dead_node_elimination.py | |
| coverage run --parallel-mode -m pytest tests/test_subexpression_elimination.py | |
| coverage run --parallel-mode -m pytest tests/test_elimination_patterns.py | |
| coverage run --parallel-mode -m pytest tests/test_fusion_patterns.py | |
| coverage run --parallel-mode -m pytest tests/test_cli_main.py | |
| coverage run --parallel-mode -m pytest tests/test_utils.py | |
| coverage run --parallel-mode -m pytest tests/test_symbolic_shape_inference.py | |
| coverage run --parallel-mode -m pytest tests/test_nvidia.py | |
| coverage run --parallel-mode -m pytest tests/test_shape_folding.py | |
| - name: Combine and Generate Coverage Report | |
| run: | | |
| coverage combine | |
| coverage xml -o coverage-ci.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |