Use uv in favour of pip #1001
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: Run tests and lint | |
| on: [pull_request, workflow_dispatch] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| run-tests: | |
| name: ${{ matrix.os }} Python ${{ matrix.python_version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python_version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| os: [ubuntu-latest, macOS-latest] | |
| include: | |
| - os: ubuntu-latest | |
| compiler: g++ | |
| - os: macOS-latest | |
| compiler: clang++ | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| env: | |
| CXX: "ccache ${{ matrix.compiler }}" | |
| CXXFLAGS: "-O2 -g" | |
| UV_NO_SYNC: "1" | |
| LD_LIBRARY_PATH: "/usr/local/lib" | |
| steps: | |
| # Setup environment | |
| - uses: actions/checkout@v5 | |
| - name: Install uv and set the Python version | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| enable-cache: true | |
| # Build libsemigroups | |
| - name: "macOS only: Install libsemigroups dependencies . . ." | |
| if: ${{ matrix.os == 'macOS-latest' }} | |
| 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 main https://github.com/libsemigroups/libsemigroups.git | |
| cd libsemigroups | |
| ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi && sudo make install -j8 | |
| ccache -s | |
| # Build libsemigroups_pybind11 | |
| - name: "Install libsemigroups_pybind11 . . ." | |
| run: uv sync --locked --all-extras --no-dev --group lint | |
| # Run the tests and lint | |
| - name: "Running tests . . ." | |
| run: uv run pytest | |
| - name: "Running doc tests . . ." | |
| run: | | |
| uv run etc/make-doc.sh # so that all files are generated! | |
| cd docs | |
| uv run python -m sphinx -b doctest -d _build/doctrees source _build/doctest | |
| - name: "Running ruff, pylint and cpplint . . ." | |
| run: uv run make lint |