From d821b4987f9cbf61de1361a4dc433a2948eff0bf Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Tue, 18 Nov 2025 22:38:47 -0500 Subject: [PATCH 01/14] Add initial CI capabilities --- .github/workflows/ci.yml | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..b19d46208b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +name: CI + +on: + push: + branches: ["master"] + pull_request: + branches: ["**"] + +jobs: + require-label: + name: Require Run CI label + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + steps: + - name: Ensure Run CI label is present + env: + HAS_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'Run CI') }} + run: | + if [ "${HAS_LABEL}" != "true" ]; then + echo "::error::Add the 'Run CI' label to this pull request to trigger CI." + exit 1 + fi + shell: bash + + build-and-check: + name: Build & Check (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + needs: [require-label] + if: github.event_name != 'pull_request' || needs.require-label.result == 'success' + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Install dependencies + shell: bash + run: | + if [[ "${RUNNER_OS}" == "Linux" ]]; then + sudo apt-get update + sudo apt-get install -y mpich + else + brew update + brew install open-mpi + fi + + - name: Configure (Debug) + run: cmake -S src -B build -DHYPRE_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug + + - name: Build + run: cmake --build build --parallel + + - name: Run check target + run: cmake --build build --target check + From 7646d8664eb19d9b65eac198788fd5f9c11561a1 Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Tue, 18 Nov 2025 22:49:12 -0500 Subject: [PATCH 02/14] Label addition is processed automatically by CI --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b19d46208b..4f029f9d16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,8 @@ on: branches: ["master"] pull_request: branches: ["**"] + types: [opened, reopened, synchronize, labeled, unlabeled] + workflow_dispatch: jobs: require-label: From b426d28e4596fca71633e1bd8a0a05b61a2b3a2c Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Fri, 21 Nov 2025 11:31:35 -0500 Subject: [PATCH 03/14] Add docs about GitHub CI --- src/docs/usr-manual/ch-misc.rst | 89 +++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/src/docs/usr-manual/ch-misc.rst b/src/docs/usr-manual/ch-misc.rst index 19c429d042..be47dba920 100644 --- a/src/docs/usr-manual/ch-misc.rst +++ b/src/docs/usr-manual/ch-misc.rst @@ -899,6 +899,95 @@ errors. To only clear a specific error code, the user can call ``--with-print-errors`` or ``-DHYPRE_ENABLE_PRINT_ERRORS=ON``, additional error information will be printed to the standard error during execution. +.. _github-ci: + +Continuous Integration Workflow +=============================== + +The hypre repository includes an intentionally simple GitHub Actions workflow +(``.github/workflows/ci.yml``) that provides a deterministic Debug build and the +``check`` regression target on both Linux and macOS. Understanding how this CI +policy operates is essential when opening pull requests (PRs), because the CI +status is required before changes may be merged into ``master``. + +Trigger conditions +^^^^^^^^^^^^^^^^^^ + +The workflow runs automatically for: + +* pushes to ``master`` (to protect the branch after merges), +* all PR events (``opened``, ``reopened``, ``synchronize``) **and** label + changes (``labeled`` / ``unlabeled``), +* the manual ``workflow_dispatch`` action (a maintainer can explicitly re-run CI + from the “Run workflow” button in the GitHub UI). + +Label requirement +^^^^^^^^^^^^^^^^^ + +Every PR must carry the label ``Run CI`` before the build begins. A lightweight +``require-label`` job validates the label, and if it is missing the workflow +fails immediately with a clear message: + +.. code-block:: text + + Add the 'Run CI' label to this pull request to trigger CI. + +Because label changes are part of the trigger set, adding (or re-adding) +``Run CI`` automatically restarts the workflow. Developers should therefore: + +1. Draft the PR. +2. Apply the ``Run CI`` label once the branch is ready for testing. +3. Re-apply the label after pushing new commits if the workflow needs to be + restarted (or use the manual dispatch button). + +Workflow structure +^^^^^^^^^^^^^^^^^^ + +The following jobs run in sequence: + +``require-label`` + *Runs only on PR events.* This job inspects the label list and fails fast if + ``Run CI`` is absent. The downstream build job is skipped when this happens, + which keeps GitHub’s check list concise. + +``build-and-check`` + A matrix job covering ``ubuntu-latest`` and ``macos-latest``. Each worker: + + #. Checks out the hypre sources. + #. Installs MPI runtime dependencies (``mpich`` via ``apt`` on Ubuntu and + ``open-mpi`` via Homebrew on macOS) so that ``mpiexec`` is available. + #. Configures a Debug CMake build from ``src`` into ``build`` with tests enabled. + #. Builds the library with ``cmake --build build --parallel``. + #. Invokes ``cmake --build build --target check`` to run simple tests using each + of the three conceptual interfaces in hypre: IJ, Struct, and SStruct. + #. Optionally, you can download GitHub Actions runner logs to help diagnose failures. + +Helpful GitHub links +^^^^^^^^^^^^^^^^^^^^ + +When you need background on GitHub Actions terminology or you want to inspect a +specific hypre workflow run, the following references collect the most useful +starting points: + +* **Understanding GitHub Actions** – GitHub's introductory guide explains the + terminology (workflows, jobs, runners, etc.) at + `Understanding GitHub Actions `_. +* **Understanding GitHub Continuous Integration** – GitHub's CI overview describes how + event triggers and test automation work in practice: + `Understanding CI with GitHub Actions `_. +* **Writing workflows** – GitHub's guide on using workflow templates explains how + to create and customize workflows: + `Using workflow templates `_. +* **Actions dashboard** – `Actions dashboard `_ shows + the full history of workflow runs. Filter by branch or event and click a row + to open detailed logs. +* **Specific workflow page** – `CI workflow page `_ + focuses on the main CI workflow currently in place. Use the "Run workflow" button for a + manual ``workflow_dispatch`` when needed. +* **Pull request checks tab** – Each PR includes a "Checks" tab that aggregates + the ``require-label`` and matrix results. Expand a failing job to view the + captured console output or re-run a subset of jobs. Example: + `PR #1426 checks page `_. Bug Reporting and General Support ============================================================================== From 8d31985fbe3c06bf9204cfc69feab68027c80c6e Mon Sep 17 00:00:00 2001 From: Rob Falgout Date: Fri, 21 Nov 2025 07:54:47 -0800 Subject: [PATCH 04/14] Testing CI --- src/struct_mv/struct_vector.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/struct_mv/struct_vector.c b/src/struct_mv/struct_vector.c index 8404c771af..fab74e121d 100644 --- a/src/struct_mv/struct_vector.c +++ b/src/struct_mv/struct_vector.c @@ -21,6 +21,7 @@ HYPRE_Int hypre_StructVectorMapDataIndex( hypre_StructVector *vector, hypre_Index dindex ) { + RDF COMPILE ERROR CI TEST hypre_MapToCoarseIndex(dindex, NULL, hypre_StructVectorStride(vector), hypre_StructVectorNDim(vector)); From 446e2d5ac0791a8169de9de9a49368937038eb05 Mon Sep 17 00:00:00 2001 From: Rob Falgout Date: Fri, 21 Nov 2025 07:59:44 -0800 Subject: [PATCH 05/14] More CI testing --- src/struct_mv/struct_vector.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/struct_mv/struct_vector.c b/src/struct_mv/struct_vector.c index fab74e121d..8404c771af 100644 --- a/src/struct_mv/struct_vector.c +++ b/src/struct_mv/struct_vector.c @@ -21,7 +21,6 @@ HYPRE_Int hypre_StructVectorMapDataIndex( hypre_StructVector *vector, hypre_Index dindex ) { - RDF COMPILE ERROR CI TEST hypre_MapToCoarseIndex(dindex, NULL, hypre_StructVectorStride(vector), hypre_StructVectorNDim(vector)); From 7f11c336f9158b4e2dcec16b459d846f88c9761e Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Mon, 1 Dec 2025 19:47:27 -0500 Subject: [PATCH 06/14] Move CI docs to wiki-dev --- src/docs/usr-manual/ch-misc.rst | 90 ------------------------------ src/docs/wiki-dev/CI.md | 98 +++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 90 deletions(-) create mode 100644 src/docs/wiki-dev/CI.md diff --git a/src/docs/usr-manual/ch-misc.rst b/src/docs/usr-manual/ch-misc.rst index be47dba920..2f0b387930 100644 --- a/src/docs/usr-manual/ch-misc.rst +++ b/src/docs/usr-manual/ch-misc.rst @@ -899,96 +899,6 @@ errors. To only clear a specific error code, the user can call ``--with-print-errors`` or ``-DHYPRE_ENABLE_PRINT_ERRORS=ON``, additional error information will be printed to the standard error during execution. -.. _github-ci: - -Continuous Integration Workflow -=============================== - -The hypre repository includes an intentionally simple GitHub Actions workflow -(``.github/workflows/ci.yml``) that provides a deterministic Debug build and the -``check`` regression target on both Linux and macOS. Understanding how this CI -policy operates is essential when opening pull requests (PRs), because the CI -status is required before changes may be merged into ``master``. - -Trigger conditions -^^^^^^^^^^^^^^^^^^ - -The workflow runs automatically for: - -* pushes to ``master`` (to protect the branch after merges), -* all PR events (``opened``, ``reopened``, ``synchronize``) **and** label - changes (``labeled`` / ``unlabeled``), -* the manual ``workflow_dispatch`` action (a maintainer can explicitly re-run CI - from the “Run workflow” button in the GitHub UI). - -Label requirement -^^^^^^^^^^^^^^^^^ - -Every PR must carry the label ``Run CI`` before the build begins. A lightweight -``require-label`` job validates the label, and if it is missing the workflow -fails immediately with a clear message: - -.. code-block:: text - - Add the 'Run CI' label to this pull request to trigger CI. - -Because label changes are part of the trigger set, adding (or re-adding) -``Run CI`` automatically restarts the workflow. Developers should therefore: - -1. Draft the PR. -2. Apply the ``Run CI`` label once the branch is ready for testing. -3. Re-apply the label after pushing new commits if the workflow needs to be - restarted (or use the manual dispatch button). - -Workflow structure -^^^^^^^^^^^^^^^^^^ - -The following jobs run in sequence: - -``require-label`` - *Runs only on PR events.* This job inspects the label list and fails fast if - ``Run CI`` is absent. The downstream build job is skipped when this happens, - which keeps GitHub’s check list concise. - -``build-and-check`` - A matrix job covering ``ubuntu-latest`` and ``macos-latest``. Each worker: - - #. Checks out the hypre sources. - #. Installs MPI runtime dependencies (``mpich`` via ``apt`` on Ubuntu and - ``open-mpi`` via Homebrew on macOS) so that ``mpiexec`` is available. - #. Configures a Debug CMake build from ``src`` into ``build`` with tests enabled. - #. Builds the library with ``cmake --build build --parallel``. - #. Invokes ``cmake --build build --target check`` to run simple tests using each - of the three conceptual interfaces in hypre: IJ, Struct, and SStruct. - #. Optionally, you can download GitHub Actions runner logs to help diagnose failures. - -Helpful GitHub links -^^^^^^^^^^^^^^^^^^^^ - -When you need background on GitHub Actions terminology or you want to inspect a -specific hypre workflow run, the following references collect the most useful -starting points: - -* **Understanding GitHub Actions** – GitHub's introductory guide explains the - terminology (workflows, jobs, runners, etc.) at - `Understanding GitHub Actions `_. -* **Understanding GitHub Continuous Integration** – GitHub's CI overview describes how - event triggers and test automation work in practice: - `Understanding CI with GitHub Actions `_. -* **Writing workflows** – GitHub's guide on using workflow templates explains how - to create and customize workflows: - `Using workflow templates `_. -* **Actions dashboard** – `Actions dashboard `_ shows - the full history of workflow runs. Filter by branch or event and click a row - to open detailed logs. -* **Specific workflow page** – `CI workflow page `_ - focuses on the main CI workflow currently in place. Use the "Run workflow" button for a - manual ``workflow_dispatch`` when needed. -* **Pull request checks tab** – Each PR includes a "Checks" tab that aggregates - the ``require-label`` and matrix results. Expand a failing job to view the - captured console output or re-run a subset of jobs. Example: - `PR #1426 checks page `_. - Bug Reporting and General Support ============================================================================== diff --git a/src/docs/wiki-dev/CI.md b/src/docs/wiki-dev/CI.md new file mode 100644 index 0000000000..eec6f0c87e --- /dev/null +++ b/src/docs/wiki-dev/CI.md @@ -0,0 +1,98 @@ +This document gives information on Continuous Integration (CI) in hypre. + +# Continuous Integration Workflow + +The hypre repository includes an intentionally simple GitHub Actions +workflow (`.github/workflows/ci.yml`) that provides a deterministic +Debug build and the `check` regression target on both Linux and macOS. +Understanding how this CI policy operates is essential when opening pull +requests (PRs), because the CI status is required before changes may be +merged into `master`. + +## Trigger conditions + +The workflow runs automatically for: + +- pushes to `master` (to protect the branch after merges), +- all PR events (`opened`, `reopened`, `synchronize`) **and** label + changes (`labeled` / `unlabeled`), +- the manual `workflow_dispatch` action (a maintainer can explicitly + re-run CI from the "Run workflow" button in the GitHub UI). + +## Label requirement + +Every PR must carry the label `Run CI` before the build begins. A +lightweight `require-label` job validates the label, and if it is +missing the workflow fails immediately with a clear message: + +``` text +Add the 'Run CI' label to this pull request to trigger CI. +``` + +Because label changes are part of the trigger set, adding (or re-adding) +`Run CI` automatically restarts the workflow. Developers should +therefore: + +1. Draft the PR. +2. Apply the `Run CI` label once the branch is ready for testing. +3. Re-apply the label after pushing new commits if the workflow needs + to be restarted (or use the manual dispatch button). + +## Workflow structure + +The following jobs run in sequence: + +`require-label` + +: *Runs only on PR events.* This job inspects the label list and fails + fast if `Run CI` is absent. The downstream build job is skipped when + this happens, which keeps GitHub's check list concise. + +`build-and-check` + +: A matrix job covering `ubuntu-latest` and `macos-latest`. Each + worker: + + 1. Checks out the hypre sources. + 2. Installs MPI runtime dependencies (`mpich` via `apt` on Ubuntu + and `open-mpi` via Homebrew on macOS) so that `mpiexec` is + available. + 3. Configures a Debug CMake build from `src` into `build` with + tests enabled. + 4. Builds the library with `cmake --build build --parallel`. + 5. Invokes `cmake --build build --target check` to run simple tests + using each of the three conceptual interfaces in hypre: IJ, + Struct, and SStruct. + 6. Optionally, you can download GitHub Actions runner logs to help + diagnose failures. + +## Helpful GitHub links + +When you need background on GitHub Actions terminology or you want to +inspect a specific hypre workflow run, the following references collect +the most useful starting points: + +- **Understanding GitHub Actions** -- GitHub\'s introductory guide + explains the terminology (workflows, jobs, runners, etc.) at + [Understanding GitHub + Actions](https://docs.github.com/en/actions/get-started/understand-github-actions). +- **Understanding GitHub Continuous Integration** -- GitHub\'s CI + overview describes how event triggers and test automation work in + practice: [Understanding CI with GitHub + Actions](https://docs.github.com/en/actions/get-started/continuous-integration). +- **Writing workflows** -- GitHub\'s guide on using workflow templates + explains how to create and customize workflows: [Using workflow + templates](https://docs.github.com/en/actions/how-tos/write-workflows/use-workflow-templates). +- **Actions dashboard** -- [Actions + dashboard](https://github.com/hypre-space/hypre/actions) shows the + full history of workflow runs. Filter by branch or event and click a + row to open detailed logs. +- **Specific workflow page** -- [CI workflow + page](https://github.com/hypre-space/hypre/actions/workflows/ci.yml) + focuses on the main CI workflow currently in place. Use the \"Run + workflow\" button for a manual `workflow_dispatch` when needed. +- **Pull request checks tab** -- Each PR includes a \"Checks\" tab + that aggregates the `require-label` and matrix results. Expand a + failing job to view the captured console output or re-run a subset + of jobs. Example: [PR #1426 checks + page](https://github.com/hypre-space/hypre/pull/1426/checks). From 1b8087c1672f15ab5f8405a071ad95fa091782a4 Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Tue, 6 Jan 2026 12:18:18 -0500 Subject: [PATCH 07/14] Add code checks job --- .github/workflows/ci.yml | 71 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f029f9d16..6e10c24bd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: run: | if [[ "${RUNNER_OS}" == "Linux" ]]; then sudo apt-get update - sudo apt-get install -y mpich + sudo apt-get install -y libopenmpi-dev openmpi-bin else brew update brew install open-mpi @@ -57,3 +57,72 @@ jobs: - name: Run check target run: cmake --build build --target check + code-checks: + name: Code Checks + runs-on: ubuntu-latest + needs: [require-label] + if: github.event_name != 'pull_request' || needs.require-label.result == 'success' + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libopenmpi-dev openmpi-bin astyle autoconf automake libtool build-essential + + - name: Verify astyle version + run: | + ASTYLE_VERSION="Artistic Style Version 3.1" + INSTALLED_VERSION=$(astyle --version) + if [ "$INSTALLED_VERSION" != "$ASTYLE_VERSION" ]; then + echo "::warning::Expected $ASTYLE_VERSION, but found $INSTALLED_VERSION" + echo "::warning::The script will continue, but results may vary. Consider using the correct version." + else + echo "astyle version: $INSTALLED_VERSION" + fi + + - name: Check code formatting + working-directory: src + run: | + # Configure git to recognize the workspace + git config --global --add safe.directory ${{ github.workspace }} + + # Run astyle-apply.sh to check and apply formatting + # This will modify files in place if formatting is needed + ./config/astyle-apply.sh . + + # Check if any source files were modified (formatting changes) + if ! git diff --exit-code -- '*.c' '*.h' '*.cc' '*.cpp' '*.cxx' '*.C' '*.hpp' '*.hxx' '*.H'; then + echo "::error::Code formatting check failed. Some source files need formatting." + echo "::error::Modified files:" + git diff --name-only -- '*.c' '*.h' '*.cc' '*.cpp' '*.cxx' '*.C' '*.hpp' '*.hxx' '*.H' + echo "" + echo "::error::Run './config/astyle-apply.sh .' from the src directory to fix formatting issues." + echo "::error::Then commit the formatted files." + exit 1 + fi + + # Check if any header files were generated/modified + if ! git diff --exit-code -- '*_hypre*.h'; then + echo "::warning::Generated header files were modified." + echo "::warning::Modified header files:" + git diff --name-only -- '*_hypre*.h' + echo "::warning::These may need to be committed if they are expected changes." + fi + + echo "Code formatting check passed" + + - name: Check mixed-precision code + working-directory: src + run: | + # Run mixed-precision check + echo "Running mixed-precision code check..." + ./mup_check + MUP_EXIT_CODE=$? + + if [ $MUP_EXIT_CODE -ne 0 ]; then + echo "::error::Mixed-precision code check failed" + exit 1 + fi + echo "Mixed-precision code check passed" From 2c82534d8a4045a493934698fbb9499cb7c4f0fa Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Tue, 13 Jan 2026 11:14:23 -0500 Subject: [PATCH 08/14] Add code checks from AUTOTEST --- .github/workflows/ci.yml | 92 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 88 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e10c24bd6..dd923b80a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,20 +95,20 @@ jobs: # Check if any source files were modified (formatting changes) if ! git diff --exit-code -- '*.c' '*.h' '*.cc' '*.cpp' '*.cxx' '*.C' '*.hpp' '*.hxx' '*.H'; then echo "::error::Code formatting check failed. Some source files need formatting." - echo "::error::Modified files:" - git diff --name-only -- '*.c' '*.h' '*.cc' '*.cpp' '*.cxx' '*.C' '*.hpp' '*.hxx' '*.H' - echo "" echo "::error::Run './config/astyle-apply.sh .' from the src directory to fix formatting issues." echo "::error::Then commit the formatted files." + echo "::error::Modified files:" + git diff --name-only -- '*.c' '*.h' '*.cc' '*.cpp' '*.cxx' '*.C' '*.hpp' '*.hxx' '*.H' exit 1 fi # Check if any header files were generated/modified if ! git diff --exit-code -- '*_hypre*.h'; then echo "::warning::Generated header files were modified." + echo "::warning::These may need to be committed if they are expected changes." echo "::warning::Modified header files:" git diff --name-only -- '*_hypre*.h' - echo "::warning::These may need to be committed if they are expected changes." + fi echo "Code formatting check passed" @@ -126,3 +126,87 @@ jobs: exit 1 fi echo "Mixed-precision code check passed" + + - name: Check license headers + working-directory: AUTOTEST + run: | + SRC_DIR="${{ github.workspace }}/src" + ./test.sh check-license.sh "$SRC_DIR/.." + if [ -s check-license.err ]; then + echo "::error::License header check failed" + cat check-license.err + exit 1 + fi + echo "License header check passed" + + - name: Check integer usage + working-directory: AUTOTEST + run: | + SRC_DIR="${{ github.workspace }}/src" + ./test.sh check-int.sh "$SRC_DIR" + if [ -s check-int.err ]; then + echo "::error::Integer usage check failed" + cat check-int.err + exit 1 + fi + echo "Integer usage check passed" + + - name: Check double usage + working-directory: AUTOTEST + run: | + SRC_DIR="${{ github.workspace }}/src" + ./test.sh check-double.sh "$SRC_DIR" + if [ -s check-double.err ]; then + echo "::error::Double usage check failed" + cat check-double.err + exit 1 + fi + echo "Double usage check passed" + + - name: Check MPI usage + working-directory: AUTOTEST + run: | + SRC_DIR="${{ github.workspace }}/src" + ./test.sh check-mpi.sh "$SRC_DIR" + if [ -s check-mpi.err ]; then + echo "::error::MPI usage check failed" + cat check-mpi.err + exit 1 + fi + echo "MPI usage check passed" + + - name: Check memory usage + working-directory: AUTOTEST + run: | + SRC_DIR="${{ github.workspace }}/src" + ./test.sh check-mem.sh "$SRC_DIR" + if [ -s check-mem.err ]; then + echo "::error::Memory usage check failed" + cat check-mem.err + exit 1 + fi + echo "Memory usage check passed" + + - name: Check headers + working-directory: AUTOTEST + run: | + SRC_DIR="${{ github.workspace }}/src" + ./test.sh check-headers.sh "$SRC_DIR" + if [ -s check-headers.err ]; then + echo "::error::Headers check failed" + cat check-headers.err + exit 1 + fi + echo "Headers check passed" + + - name: Check case-insensitive filenames + working-directory: AUTOTEST + run: | + SRC_DIR="${{ github.workspace }}/src" + ./test.sh check-case.sh "$SRC_DIR/.." + if [ -s check-case.err ]; then + echo "::error::Case-insensitive filename check failed" + cat check-case.err + exit 1 + fi + echo "Case-insensitive filename check passed" From c294e37571843836dc1a555e0c7997d163266a4a Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Tue, 13 Jan 2026 11:17:40 -0500 Subject: [PATCH 09/14] Add mup_clean --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd923b80a8..13e245d517 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,8 +71,13 @@ jobs: sudo apt-get update sudo apt-get install -y libopenmpi-dev openmpi-bin astyle autoconf automake libtool build-essential - - name: Verify astyle version + - name: Check code formatting + working-directory: src run: | + # Configure git to recognize the workspace + git config --global --add safe.directory ${{ github.workspace }} + + # Check astyle version ASTYLE_VERSION="Artistic Style Version 3.1" INSTALLED_VERSION=$(astyle --version) if [ "$INSTALLED_VERSION" != "$ASTYLE_VERSION" ]; then @@ -82,12 +87,6 @@ jobs: echo "astyle version: $INSTALLED_VERSION" fi - - name: Check code formatting - working-directory: src - run: | - # Configure git to recognize the workspace - git config --global --add safe.directory ${{ github.workspace }} - # Run astyle-apply.sh to check and apply formatting # This will modify files in place if formatting is needed ./config/astyle-apply.sh . @@ -126,6 +125,7 @@ jobs: exit 1 fi echo "Mixed-precision code check passed" + ./mup_clean - name: Check license headers working-directory: AUTOTEST From d9afd7bccc8618c889d338992b64daa71f24e226 Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Tue, 13 Jan 2026 11:22:12 -0500 Subject: [PATCH 10/14] Minor --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13e245d517..74d4e29860 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -189,6 +189,8 @@ jobs: - name: Check headers working-directory: AUTOTEST + env: + AR: "ar -rc" run: | SRC_DIR="${{ github.workspace }}/src" ./test.sh check-headers.sh "$SRC_DIR" From b69b706acf1b14d26f432a37d8d0d323e39068cb Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Tue, 13 Jan 2026 17:16:06 -0500 Subject: [PATCH 11/14] Remove unused file extensions --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74d4e29860..6c83a6dbf1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,12 +92,12 @@ jobs: ./config/astyle-apply.sh . # Check if any source files were modified (formatting changes) - if ! git diff --exit-code -- '*.c' '*.h' '*.cc' '*.cpp' '*.cxx' '*.C' '*.hpp' '*.hxx' '*.H'; then + if ! git diff --exit-code -- '*.c' '*.h' '*.hpp'; then echo "::error::Code formatting check failed. Some source files need formatting." echo "::error::Run './config/astyle-apply.sh .' from the src directory to fix formatting issues." echo "::error::Then commit the formatted files." echo "::error::Modified files:" - git diff --name-only -- '*.c' '*.h' '*.cc' '*.cpp' '*.cxx' '*.C' '*.hpp' '*.hxx' '*.H' + git diff --name-only -- '*.c' '*.h' '*.hpp' exit 1 fi @@ -107,7 +107,6 @@ jobs: echo "::warning::These may need to be committed if they are expected changes." echo "::warning::Modified header files:" git diff --name-only -- '*_hypre*.h' - fi echo "Code formatting check passed" From 3e8e35d5aef3b72938eb15f10f08b3a52e5fdafe Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Tue, 13 Jan 2026 17:19:43 -0500 Subject: [PATCH 12/14] Simplify error check involving astyle script --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c83a6dbf1..036b5de2c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,15 +100,6 @@ jobs: git diff --name-only -- '*.c' '*.h' '*.hpp' exit 1 fi - - # Check if any header files were generated/modified - if ! git diff --exit-code -- '*_hypre*.h'; then - echo "::warning::Generated header files were modified." - echo "::warning::These may need to be committed if they are expected changes." - echo "::warning::Modified header files:" - git diff --name-only -- '*_hypre*.h' - fi - echo "Code formatting check passed" - name: Check mixed-precision code From 9f97fdcd14ffb91373b93865793be6ac1c4b29d5 Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Fri, 16 Jan 2026 19:04:31 -0500 Subject: [PATCH 13/14] Set astyle version --- .github/workflows/ci.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 036b5de2c2..a47495ec05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y libopenmpi-dev openmpi-bin astyle autoconf automake libtool build-essential + sudo apt-get install -y libopenmpi-dev openmpi-bin astyle=3.1-3build1 autoconf automake libtool build-essential - name: Check code formatting working-directory: src @@ -77,16 +77,6 @@ jobs: # Configure git to recognize the workspace git config --global --add safe.directory ${{ github.workspace }} - # Check astyle version - ASTYLE_VERSION="Artistic Style Version 3.1" - INSTALLED_VERSION=$(astyle --version) - if [ "$INSTALLED_VERSION" != "$ASTYLE_VERSION" ]; then - echo "::warning::Expected $ASTYLE_VERSION, but found $INSTALLED_VERSION" - echo "::warning::The script will continue, but results may vary. Consider using the correct version." - else - echo "astyle version: $INSTALLED_VERSION" - fi - # Run astyle-apply.sh to check and apply formatting # This will modify files in place if formatting is needed ./config/astyle-apply.sh . From a8c69fde376dec0a1669568c6a2b7e004d418d0f Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Fri, 16 Jan 2026 19:08:01 -0500 Subject: [PATCH 14/14] Bump actions/checkout --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a47495ec05..5073034141 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install dependencies shell: bash