From 86e498a7152d5e84771f27628529e6018860eaad Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Mon, 24 Nov 2025 15:17:33 +0000 Subject: [PATCH 1/3] ci: Don't install lint group --- .github/workflows/custom-branch.yml | 2 +- .github/workflows/test-conda.yml | 4 ++-- .github/workflows/tests.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/custom-branch.yml b/.github/workflows/custom-branch.yml index 467aca80..e23af21e 100644 --- a/.github/workflows/custom-branch.yml +++ b/.github/workflows/custom-branch.yml @@ -67,7 +67,7 @@ jobs: - 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/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..d2a13f8b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -55,9 +55,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 . . ." From 408a9501b324cf2771a6bd7e8fea293b36cc7f01 Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Mon, 24 Nov 2025 15:48:58 +0000 Subject: [PATCH 2/3] ci: use -j4 to make install --- .github/workflows/custom-branch.yml | 2 +- .github/workflows/doc.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/pip.yml | 2 +- .github/workflows/tests.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/custom-branch.yml b/.github/workflows/custom-branch.yml index e23af21e..8bc06645 100644 --- a/.github/workflows/custom-branch.yml +++ b/.github/workflows/custom-branch.yml @@ -60,7 +60,7 @@ 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 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/tests.yml b/.github/workflows/tests.yml index d2a13f8b..d89ad933 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,7 +50,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 From a3a61707517faa4713e67b32dc975680f590a7fc Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Mon, 24 Nov 2025 15:48:02 +0000 Subject: [PATCH 3/3] ci: add job to check compile flags --- .github/workflows/config-options.yml | 74 ++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/config-options.yml 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