Update to SS:GB 10.4.1 #421
Workflow file for this run
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: 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"] | |
| # A trailing "t" means the free-threaded (no-GIL) build of that version. | |
| python-version: ["3.11", "3.12", "3.13", "3.14", "3.14t"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Compose conda environment file | |
| run: | | |
| # conda-forge ships two ABIs for CPython 3.13+ ("cp314" and "cp314t"), | |
| # and `python=3.14` alone lets the solver pick either one: it resolved | |
| # to free-threaded on Linux and Windows but to the GIL build on macOS. | |
| # The `python-gil` and `python-freethreading` metapackages pin | |
| # `python_abi` to one or the other, so ask for the one this matrix | |
| # entry wants instead of leaving it to the solver. | |
| pyver="${{ matrix.python-version }}" | |
| if [[ $pyver == *t ]]; then | |
| variant=python-freethreading | |
| pyver=${pyver%t} | |
| else | |
| variant=python-gil | |
| fi | |
| cp continuous_integration/environment.yml environment-ci.yml | |
| echo " - python=$pyver" >> environment-ci.yml | |
| echo " - $variant" >> environment-ci.yml | |
| cat environment-ci.yml | |
| - name: Conda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| environment-file: environment-ci.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 (also works 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: Configure coverage | |
| run: | | |
| # Cython's coverage plugin (see [tool.coverage.run] in pyproject.toml) | |
| # needs coverage's C tracer. conda-forge builds coverage without its C | |
| # extension for free-threaded Python, and conda resolves `python=3.14` | |
| # to the free-threaded build (3.14t) on some platforms. There, loading | |
| # the plugin raises ImportError and every `coverage run` dies before it | |
| # runs anything, so run the tests directly instead. | |
| if python -c "import Cython.Coverage" 2>/dev/null; then | |
| coverage erase | |
| echo "COV=coverage run -a --branch" >> $GITHUB_ENV | |
| else | |
| echo "Cython coverage plugin unusable here; running without coverage" | |
| python -VV | |
| echo "COV=python" >> $GITHUB_ENV | |
| fi | |
| - name: Test | |
| env: | |
| CYTHON_COVERAGE: true | |
| run: | | |
| pytest -s -k test_print_jit_config | |
| $COV -m pytest | |
| $COV suitesparse_graphblas/tests/test_initialize.py | |
| - name: create_headers.py check | |
| if: (! contains(matrix.os, 'windows')) | |
| run: | | |
| $COV suitesparse_graphblas/create_headers.py | |
| git diff --exit-code # error if anything changed |