Automate tag and release creation on merge to main #337
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: CPU tests | |
| on: | |
| push: | |
| branches: [main, pre-release] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: nvidia/cuda:12.8.1-cudnn-devel-ubuntu24.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up system dependencies | |
| run: | | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt-get update && apt-get install -y \ | |
| ffmpeg libsm6 libxext6 curl ssh wget git \ | |
| software-properties-common | |
| add-apt-repository ppa:deadsnakes/ppa -y | |
| apt-get update | |
| apt-get install -y python3.10 python3.10-dev python3.10-venv | |
| # Setup cusparselt | |
| wget https://developer.download.nvidia.com/compute/cusparselt/0.7.1/local_installers/cusparselt-local-repo-ubuntu2404-0.7.1_1.0-1_amd64.deb | |
| dpkg -i cusparselt-local-repo-ubuntu2404-0.7.1_1.0-1_amd64.deb | |
| cp /var/cusparselt-local-repo-ubuntu2404-0.7.1/cusparselt-*-keyring.gpg /usr/share/keyrings/ | |
| apt-get update | |
| apt-get install -y libcusparselt0 | |
| - name: Install Poetry and dependencies | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python3.10 - --version 2.1.2 | |
| export PATH="$HOME/.local/bin:$PATH" | |
| # Force cpu-only torch installation | |
| sed -i 's/cu128/cpu/g' pyproject.toml | |
| poetry lock | |
| poetry install --no-cache --with test -E onnx | |
| - name: Run Tests | |
| run: | | |
| export PATH="$HOME/.local/bin:$PATH" | |
| poetry run pytest -v --disable-pytest-warnings --strict-markers --mock-training --color=yes -m "not slow" |