Use Nanobind && Numpy >=2 (#112) #521
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: Full Test & Upload coverage | |
| on: [push, pull_request] | |
| jobs: | |
| run_pytest_upload_coverage: | |
| runs-on: ubuntu-latest | |
| env: | |
| OS: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodule: recursive | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Build irspack (ubuntu) | |
| run: | | |
| pip install --upgrade pip setuptools wheel | |
| sudo apt-get install lcov | |
| FLAGS="-fprofile-arcs -ftest-coverage" | |
| export CFLAGS="$FLAGS" | |
| export CXXFLAGS="$FLAGS" | |
| pip install -e . --verbose | |
| - name: Run pytest | |
| run: | | |
| pip install setuptools wheel pytest pytest-mock pytest-cov | |
| pip install numpy scipy | |
| pip install jaxlib jax dm-haiku optax || echo "JAX installation failed, skipping MultVAE tests" | |
| pip install lightfm || echo "LightFM installation failed, skipping BPR tests" | |
| pytest --cov=./src/irspack tests/ | |
| - name: Generate coverage (ubuntu) | |
| run: | | |
| coverage xml | |
| lcov -d `pwd` -c -o coverage.info --ignore-errors empty || echo "No C++ coverage data found" | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| verbose: true |