Skip to content

Foundations for v1 release #361

Foundations for v1 release

Foundations for v1 release #361

Workflow file for this run

name: Run tests and lint
on: [pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
default:
strategy:
fail-fast: false
matrix:
# We test against 3.7 because wheels are built for these
# versions of python, and I didn't figure out a way of disabling that.
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
shell: bash -l {0}
env:
PKG_CONFIG_PATH: "/home/runner/micromamba-root/envs/libsemigroups/lib/pkgconfig:/home/runner/micromamba-root/envs/libsemigroups/share/pkgconfig/"
LD_LIBRARY_PATH: "/home/runner/micromamba-root/envs/libsemigroups/lib"
steps:
- uses: actions/checkout@v3
- name: "Create micromamba environment"
uses: mamba-org/setup-micromamba@v1
with:
environment-name: libsemigroups
create-args: >-
python=${{ matrix.python_version }}
- name: "Install libsemigroups@v3 . . ."
run: |
micromamba activate libsemigroups
git clone --depth 1 --branch refactor-knuth-bendix https://github.com/Joseph-Edwards/libsemigroups.git
cd libsemigroups
./autogen.sh && ./configure CXXFLAGS='-O3 -g' --disable-hpcombi && sudo make install -j8
- name: "Python version . . ."
run: |
python --version
pip3 --version
- name: "Pip installing requirements.txt . . ."
run: |
pip3 install -r requirements.txt
- name: "Pip3 installing libsemigroups_pybind11 . . ."
run: |
pip3 install . -v
- name: "python -m pytest -vv tests/test_*.py . . ."
run: |
python -m pytest -vv tests/test_*.py
- name: "Run doc tests . . ."
# TODO figure out how to get this to work with python 3.11
if: ${{ matrix.python_version != '3.11' }}
run: |
etc/make-doc.sh # so that all files are generated!
cd docs
python -m sphinx -b doctest -d _build/doctrees source _build/doctest
- name: "Pip3 installing pylint + cpplint . . ."
run: |
pip3 install pylint cpplint
- name: "Running pylint and cpplint . . ."
run: |
python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py
python -m cpplint src/*.hpp src/*.cpp