Update ubuntu version in gha docs runner #1194
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: test_accuracy | |
| permissions: read-all | |
| on: | |
| pull_request: | |
| merge_group: | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| test_accuracy: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Create and start a virtual environment | |
| run: | | |
| python -m venv venv | |
| source venv/bin/activate | |
| - name: Install dependencies | |
| run: | | |
| source venv/bin/activate | |
| python -m pip install --upgrade pip | |
| pip install src/python/[tests,build] --extra-index-url https://download.pytorch.org/whl/cpu | |
| - name: Prepare test data | |
| run: | | |
| source venv/bin/activate | |
| python tests/python/accuracy/prepare_data.py -d data | |
| - name: Run Python Test | |
| run: | | |
| source venv/bin/activate | |
| pytest --data=./data tests/python/accuracy/test_accuracy.py | |
| - name: Install CPP dependencies | |
| run: | | |
| sudo bash src/cpp/install_dependencies.sh | |
| - name: Build CPP Test | |
| run: | | |
| mkdir build && cd build | |
| pip install nanobind==2.4.0 | |
| pip install typing_extensions==4.12.2 | |
| cmake ../tests/cpp/accuracy/ | |
| make -j | |
| - name: Run CPP Test | |
| run: | | |
| build/test_accuracy -d data -p tests/python/accuracy/public_scope.json |