-
Notifications
You must be signed in to change notification settings - Fork 16
75 lines (72 loc) · 3.06 KB
/
debug.yml
File metadata and controls
75 lines (72 loc) · 3.06 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
74
75
# This file is outdated
name: Debug CI Jobs
on:
workflow_dispatch:
inputs:
debug_enabled:
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pyver: [3.10]
testopts:
- "--blocking"
# - "--non-blocking --record --runslow"
sourcetype:
- "wheel"
# - "source"
# - "upstream"
# - "conda-forge"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup conda env
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda create -n graphblas -c conda-forge python=${{ matrix.pyver }} pytest-runner coverage 'black>=20.8b1' flake8 coveralls
- name: Build extension module
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate graphblas
conda install -c conda-forge pandas numba scipy networkx cffi
if [[ ${{ matrix.sourcetype }} == "wheel" ]]; then
pip install suitesparse-graphblas
else
conda install -c conda-forge graphblas
fi
if [[ ${{ matrix.sourcetype }} == "source" ]]; then
pip install --no-binary=all suitesparse-graphblas
elif [[ ${{ matrix.sourcetype }} == "upstream" ]]; then
# I can't get pip install from git to work, so git clone instead.
# pip install git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas
conda install -c conda-forge cython
git clone --depth=1 https://github.com/GraphBLAS/python-suitesparse-graphblas.git ssgb
pushd ssgb
python setup.py install
popd
elif [[ ${{ matrix.sourcetype }} == "conda-forge" ]]; then
conda install -c conda-forge python-suitesparse-graphblas
fi
python setup.py develop
- name: Verify build
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate graphblas
# Make sure `from graphblas import *` works as expected
python -c "from graphblas import * ; Matrix"
# Make sure all top-level imports work
( for attr in Matrix Scalar Vector Recorder _agg agg base binary descriptor dtypes exceptions expr ffi formatting infix init io lib mask matrix monoid op operator scalar semiring tests unary vector recorder _ss ss ; do echo python -c \"from graphblas import $attr\" ; if ! python -c "from graphblas import $attr" ; then exit 1 ; fi ; done )
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}