Refactor _check_outputs
#482
Workflow file for this run
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: TorchScript tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| # Check all PR | |
| concurrency: | |
| group: torch-tests-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| tests: | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.os }} / Python ${{ matrix.python-version }} / Torch ${{ matrix.torch-version }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| python-version: "3.10" | |
| torch-version: "2.1" | |
| numpy-version-pin: "<2.0" | |
| - os: ubuntu-24.04 | |
| python-version: "3.10" | |
| torch-version: "2.9" | |
| - os: ubuntu-24.04 | |
| python-version: "3.13" | |
| torch-version: "2.9" | |
| - os: macos-15 | |
| python-version: "3.13" | |
| torch-version: "2.9" | |
| - os: windows-2022 | |
| python-version: "3.13" | |
| torch-version: "2.9" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Setup sccache | |
| uses: mozilla-actions/sccache-action@v0.0.9 | |
| with: | |
| version: "v0.10.0" | |
| - name: setup MSVC command prompt | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Setup sccache environnement variables | |
| run: | | |
| echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
| echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
| echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
| echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
| - name: install tests dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install tox coverage | |
| - name: run tests | |
| run: tox | |
| env: | |
| PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu | |
| METATOMIC_TESTS_TORCH_VERSION: ${{ matrix.torch-version }} | |
| METATOMIC_TESTS_NUMPY_VERSION_PIN: ${{ matrix.numpy-version-pin }} | |
| - name: combine Python coverage files | |
| shell: bash | |
| run: | | |
| coverage combine .tox/*/.coverage | |
| coverage xml | |
| - name: upload to codecov.io | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| files: coverage.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} |