Skip to content

cache compiled ME for tests #30

cache compiled ME for tests

cache compiled ME for tests #30

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install MinkowskiEngine build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libopenblas-dev g++ cmake ninja-build
- name: Cache MinkowskiEngine
id: cache-minkowski
uses: actions/cache@v4
with:
path: |
${{ env.pythonLocation }}/lib/python*/site-packages/MinkowskiEngine*
${{ env.pythonLocation }}/lib/python*/site-packages/minkowski*
key: ${{ runner.os }}-minkowski-${{ matrix.python-version }}-02fc608-cpu-only
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[tests,spconv]"
- name: Build and install MinkowskiEngine
if: steps.cache-minkowski.outputs.cache-hit != 'true'
run: |
git clone https://github.com/NVIDIA/MinkowskiEngine.git
cd MinkowskiEngine
git checkout 02fc608
python setup.py install --blas=openblas --cpu_only
- name: Run tests with TorchScript enabled
run: |
pytest -v --cov=pytorch_sparse_utils --ignore=MinkowskiEngine/
env:
CUDA_VISIBLE_DEVICES: "" # CPU only for standard CI
- name: Run tests with TorchScript disabled
run: |
pytest -v --cov=pytorch_sparse_utils --cov-append --ignore=MinkowskiEngine/
env:
CUDA_VISIBLE_DEVICES: ""
PYTORCH_JIT: "0"
- name: Generate combined coverage reports
run: |
coverage xml
coverage html
coverage report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}