forked from GraphBLAS/python-suitesparse-graphblas
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (68 loc) · 2.31 KB
/
test.yml
File metadata and controls
73 lines (68 loc) · 2.31 KB
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
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.8", "3.9", "3.10", "3.11"]
graphblas-version: ["7.4.3"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: continuous_integration/environment.yml
channels: conda-forge
activate-environment: suitesparse-graphblas
- name: GraphBLAS (from conda-forge)
if: (contains(matrix.source, 'conda-forge'))
run: |
conda install -c conda-forge graphblas=${{ matrix.graphblas-version }} pytest pytest-randomly
- name: GraphBLAS (from source)
if: (contains(matrix.source, 'source'))
run: |
# This isn't working! Why not?
# sh suitesparse.sh refs/tags/${{ matrix.graphblas-version }}
# From tag
curl -L https://github.com/DrTimothyAldenDavis/GraphBLAS/archive/refs/tags/v${{ matrix.graphblas-version }}.tar.gz | tar xzf -
pushd GraphBLAS-${{ matrix.graphblas-version }}/build
# From branch
# curl -L https://github.com/DrTimothyAldenDavis/GraphBLAS/tarball/${{ matrix.graphblas-version }} | tar xzf -
# pushd DrTim*/build
echo ${CONDA_PREFIX}
cmake -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: |
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