diff --git a/.github/workflows/config-options.yml b/.github/workflows/config-options.yml new file mode 100644 index 00000000..6acb519c --- /dev/null +++ b/.github/workflows/config-options.yml @@ -0,0 +1,74 @@ +name: Config options +on: [pull_request, workflow_dispatch] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + run-tests: + name: ${{ matrix.flags }} (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + flags: + [ + "--disable-hpcombi", + "--disable-eigen", + "--disable-hpcombi --disable-eigen", + ] + 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: Set up Python . . . + uses: actions/setup-python@v6 + with: + python-version-file: "pyproject.toml" + - name: Install uv . . . + uses: astral-sh/setup-uv@v7 + with: + 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" ${{ matrix.flags }} + sudo make install -j4 + ccache -s + + # Build libsemigroups_pybind11 + - name: "Install libsemigroups_pybind11 . . ." + run: uv sync --locked --all-extras --no-dev + + # Run the tests + - name: "Running tests . . ." + run: uv run pytest + - name: "Running doc tests . . ." + run: uv run make doctest diff --git a/.github/workflows/custom-branch.yml b/.github/workflows/custom-branch.yml index 467aca80..8bc06645 100644 --- a/.github/workflows/custom-branch.yml +++ b/.github/workflows/custom-branch.yml @@ -60,14 +60,14 @@ jobs: run: | git clone --depth 1 --branch ${{ inputs.branch }} https://github.com/${{ inputs.fork }}.git cd libsemigroups - ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j8 + ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j4 ccache -s # Build libsemigroups_pybind11 - name: "Install libsemigroups_pybind11 . . ." run: uv sync --locked --all-extras - # Run the tests and lint + # Run the tests - name: "Running tests . . ." run: uv run pytest - name: "Running doc tests . . ." diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index dbfecd81..97dde93f 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -51,7 +51,7 @@ jobs: run: | git clone --depth 1 --branch main https://github.com/libsemigroups/libsemigroups.git cd libsemigroups - ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j8 + ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j4 ccache -s # Build libsemigroups_pybind11 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d2b6b5aa..81bc50a3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -63,7 +63,7 @@ jobs: run: | git clone --depth 1 --branch main https://github.com/libsemigroups/libsemigroups.git cd libsemigroups - ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j8 + ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j4 ccache -s # Build libsemigroups_pybind11 diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml index 08cf8871..65d645ba 100644 --- a/.github/workflows/pip.yml +++ b/.github/workflows/pip.yml @@ -48,7 +48,7 @@ jobs: run: | git clone --depth 1 --branch main https://github.com/libsemigroups/libsemigroups.git cd libsemigroups - ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j8 + ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j4 ccache -s # Build libsemigroups_pybind11 diff --git a/.github/workflows/test-conda.yml b/.github/workflows/test-conda.yml index 0fe6127b..a96749dd 100644 --- a/.github/workflows/test-conda.yml +++ b/.github/workflows/test-conda.yml @@ -58,9 +58,9 @@ jobs: # Build libsemigroups_pybind11 - name: "Install libsemigroups_pybind11 . . ." - run: uv sync --locked --all-extras --no-dev --group lint + run: uv sync --locked --all-extras --no-dev - # Run the tests and lint + # Run the tests - name: "Running tests . . ." run: uv run pytest - name: "Running doc tests . . ." diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e1317261..d89ad933 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,14 +50,14 @@ jobs: run: | git clone --depth 1 --branch main https://github.com/libsemigroups/libsemigroups.git cd libsemigroups - ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j8 + ./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j4 ccache -s # Build libsemigroups_pybind11 - name: "Install libsemigroups_pybind11 . . ." - run: uv sync --locked --all-extras --no-dev --group lint + run: uv sync --locked --all-extras --no-dev - # Run the tests and lint + # Run the tests - name: "Running tests . . ." run: uv run pytest - name: "Running doc tests . . ."