-
Notifications
You must be signed in to change notification settings - Fork 6
75 lines (70 loc) · 2.4 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Test
on:
push:
branches: [ main ]
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
source: ["conda-forge"]
# os: ["ubuntu-latest"]
# source: ["source"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: continuous_integration/environment.yml
channels: conda-forge,nodefaults
channel-priority: strict
activate-environment: suitesparse-graphblas
auto-activate-base: false
- name: GraphBLAS (from conda-forge)
if: (contains(matrix.source, 'conda-forge'))
run: |
conda install graphblas=$(cat GB_VERSION.txt)
- name: GraphBLAS (from source)
if: (contains(matrix.source, 'source'))
run: |
# From release (does not work with beta versions)
GRAPHBLAS_PREFIX=${CONDA_PREFIX} bash suitesparse.sh refs/tags/$(cat GB_VERSION.txt).0
# From tag
# curl -L https://github.com/DrTimothyAldenDavis/GraphBLAS/archive/refs/tags/v$(cat GB_VERSION.txt).tar.gz | tar xzf -
# pushd GraphBLAS-$(cat GB_VERSION.txt)/build
# From branch
# curl -L https://github.com/DrTimothyAldenDavis/GraphBLAS/tarball/$(cat GB_VERSION.txt) | tar xzf -
# pushd DrTim*/build
# echo ${CONDA_PREFIX}
# cmake -DJITINIT=2 -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release ..
# cat Makefile
# make all JOBS=16
# make install
# popd
- name: Build
run: |
pip install -e . --no-deps
- name: Test
env:
CYTHON_COVERAGE: true
run: |
pytest -s -k test_print_jit_config
coverage run --branch -m pytest
coverage run -a --branch suitesparse_graphblas/tests/test_initialize.py
- name: create_headers.py check
if: (! contains(matrix.os, 'windows'))
run: |
coverage run -a --branch suitesparse_graphblas/create_headers.py
git diff --exit-code # error if anything changed