Skip to content

added pytest wanings 2 #330

added pytest wanings 2

added pytest wanings 2 #330

Workflow file for this run

name: build-linux
on:
push:
branches:
- main
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', 'pypy3.8', 'pypy3.9', 'pypy3.10']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install libsuitesparse-dev
# Without this, installing cuda give error: no much space left on device
- name: Clear Cache
run: rm -rf /opt/hostedtoolcache
- name: Install CUDA
uses: Jimver/cuda-toolkit@v0.2.11
id: cuda-toolkit
with:
cuda: '12.1.0'
- name: Install package and dependencies (CPython)
if: (matrix.python-version == '3.9')
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade .[extra] -vvv
env:
USE_LONG_INT: 0
USE_UNSIGNED_LONG_INT: 0
USE_CBLAS: 0
USE_CUDA: 1
CUDA_DYNAMIC_LOADING: 1
# For python 3.10 and 3.11, do not install extras (sparsesuite)
- name: Install package and dependencies (CPython)
if: (!contains(matrix.python-version, 'pypy')) && (matrix.python-version != '3.9')
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade . -vvv
env:
USE_LONG_INT: 0
USE_UNSIGNED_LONG_INT: 0
USE_CBLAS: 0
USE_CUDA: 1
CUDA_DYNAMIC_LOADING: 1
# This does not install plot packages (matplotlib) when
# using pypy, since on pypy37, the kiwisolver (a dependency of
# matlotlib) has no wheel candidate.
- name: Install package and dependencies (PyPy)
if: contains(matrix.python-version, 'pypy')
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade .[extra] -vvv
env:
USE_CUDA: 1
CUDA_DYNAMIC_LOADING: 1
# Despite the package is built on both cpython and pypy, here we
# only test it on cpython, not on pypy, since many other required
# dependencies (like matplotlib, etc) need to be compiled on pypy.
- name: Test
if: (!contains(matrix.python-version, 'pypy'))
run: |
python -m pip install --upgrade pytest
python -m pip install --upgrade pytest-cov
mv imate imate-DoNotImport
pytest
- name: Coverage
run: |
python -m pip install codecov
codecov