Fix test #66
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: | |
| pull_request: | |
| jobs: | |
| lint: | |
| name: Lint (ruff) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| - name: Ruff format check | |
| run: ruff format --check . | |
| - name: Ruff lint | |
| run: ruff check . | |
| build-and-test: | |
| name: Build CPU .so + Tests (pytest) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system deps (OpenBLAS/LAPACKE) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake g++ libopenblas-dev liblapacke-dev | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| pip install numpy scipy scikit-learn pytest | |
| - name: Build CPU shared library | |
| run: | | |
| cmake -S . -B build -DDIMREDUCE4GPU_BUILD_CPU=ON -DDIMREDUCE4GPU_BUILD_CUDA=OFF -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build -j | |
| - name: Verify CPU shared library | |
| run: | | |
| bash ci/verify_cpu_so.sh dimreduce4gpu/lib/libdimreduce4cpu.so | |
| - name: Run tests | |
| run: pytest -q |