Bump Python version #611
Workflow file for this run
This file contains 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: Run tests | |
on: [pull_request, workflow_dispatch] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ubuntu: | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
CXX: "ccache g++" | |
CXXFLAGS: "-O2 -g" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Create micromamba environment" | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-name: libsemigroups | |
create-args: >- | |
python=${{ matrix.python_version }} | |
fmt | |
- name: "Set environment variables . . ." | |
run: | | |
echo "PKG_CONFIG_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib/pkgconfig:$MAMBA_ROOT_PREFIX/envs/libsemigroups/share/pkgconfig:/usr/local/lib/pkgconfig" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib:/usr/local/lib" >> $GITHUB_ENV | |
- name: "Setup ccache . . ." | |
uses: Chocobo1/setup-ccache-action@v1 | |
with: | |
update_packager_index: false | |
install_ccache: true | |
- name: "Install libsemigroups . . ." | |
run: | | |
git clone --depth 1 --branch v3 https://github.com/libsemigroups/libsemigroups.git | |
cd libsemigroups | |
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi --with-external-fmt && sudo make install -j8 | |
ccache -s | |
- 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: | | |
echo $PKG_CONFIG_PATH | |
pip3 install . -v | |
- name: "python -m pytest -vv tests/test_*.py . . ." | |
run: | | |
python -m pytest -vv tests/test_*.py | |
- name: "Run doc tests . . ." | |
run: | | |
etc/make-doc.sh # so that all files are generated! | |
cd docs | |
python -m sphinx -b doctest -d _build/doctrees source _build/doctest | |
macosx: | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
runs-on: macOS-latest | |
timeout-minutes: 15 | |
env: | |
CXX: "ccache clang++" | |
CXXFLAGS: "-O2 -g" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Create micromamba environment" | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-name: libsemigroups | |
create-args: >- | |
python=${{ matrix.python_version }} | |
fmt | |
- name: "Set environment variables . . ." | |
run: | | |
echo "PKG_CONFIG_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib/pkgconfig:$MAMBA_ROOT_PREFIX/envs/libsemigroups/share/pkgconfig:/usr/local/lib/pkgconfig" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/lib:/usr/local/lib" >> $GITHUB_ENV | |
echo "PATH=$MAMBA_ROOT_PREFIX/envs/libsemigroups/bin:$PATH" >> $GITHUB_ENV | |
- name: "Install libsemigroups dependencies . . ." | |
run: brew install autoconf automake libtool | |
- name: "Setup ccache . . ." | |
uses: Chocobo1/setup-ccache-action@v1 | |
with: | |
update_packager_index: false | |
install_ccache: true | |
- name: "Install libsemigroups . . ." | |
run: | | |
git clone --depth 1 --branch v3 https://github.com/libsemigroups/libsemigroups.git | |
cd libsemigroups | |
./autogen.sh | |
./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi --with-external-fmt | |
sudo make install -j8 | |
ccache -s | |
- 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: | | |
echo $PKG_CONFIG_PATH | |
pip3 install . -v | |
- name: "python -m pytest -vv tests/test_*.py . . ." | |
run: | | |
python -m pytest -vv tests/test_*.py | |
- name: "Run doc tests . . ." | |
run: | | |
etc/make-doc.sh # so that all files are generated! | |
cd docs | |
python -m sphinx -b doctest -d _build/doctrees source _build/doctest |