From 18b61a2b26a7416206631ced09b9929a96325c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 9 Apr 2026 16:52:26 +0200 Subject: [PATCH 1/6] Update PETSc version in README.md and GitHub workflows --- .github/workflows/documentation.yml | 7 ++++--- .github/workflows/testing.yml | 7 ++++--- docs/installation.md | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index c42429b95..1a4bcd201 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -68,9 +68,10 @@ jobs: - if: steps.cache-petsc.outputs.cache-hit != 'true' name: Download a specific release of PETSc run: | - git clone --depth 1 -b release https://gitlab.com/petsc/petsc.git - # when a tag will be available for the latest release we can install with - # git clone --depth 1 --branch v*.**.* https://gitlab.com/petsc/petsc.git + git clone --depth 1 --branch v3.25.0 https://gitlab.com/petsc/petsc.git + # The branch "release" contains work towards the next version of PETSc, + # and it may not be stable. If necessary, it can be cloned as follows: + # git clone --depth 1 --branch release https://gitlab.com/petsc/petsc.git - if: steps.cache-petsc.outputs.cache-hit != 'true' name: Install PETSc with complex support diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 1826ed656..0310099fd 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -79,9 +79,10 @@ jobs: - if: steps.cache-petsc.outputs.cache-hit != 'true' name: Download a specific release of PETSc run: | - git clone --depth 1 -b release https://gitlab.com/petsc/petsc.git - # when a tag will be available for the latest release we can install with - # git clone --depth 1 --branch v*.**.* https://gitlab.com/petsc/petsc.git + git clone --depth 1 --branch v3.25.0 https://gitlab.com/petsc/petsc.git + # The branch "release" contains work towards the next version of PETSc, + # and it may not be stable. If necessary, it can be cloned as follows: + # git clone --depth 1 --branch release https://gitlab.com/petsc/petsc.git - if: steps.cache-petsc.outputs.cache-hit != 'true' name: Install PETSc with complex support diff --git a/docs/installation.md b/docs/installation.md index 7e2c2d10b..0dd7576e1 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -162,7 +162,7 @@ Although PSYDAC provides several iterative linear solvers which work with our na In order to use these additional feature, PETSc and petsc4py must be installed as follows. First, we download the latest release of PETSc from its [official Git repository](https://gitlab.com/petsc/petsc): ```sh -git clone --depth 1 --branch v3.24.2 https://gitlab.com/petsc/petsc.git +git clone --depth 1 --branch v3.25.0 https://gitlab.com/petsc/petsc.git ``` Next, we specify a configuration for complex numbers, and install PETSc in a local directory: ```sh From 5d80683baf3a52a85c5cdbe47290496f497c3954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 9 Apr 2026 17:26:31 +0200 Subject: [PATCH 2/6] Add missing descriptions to our GitHub actions --- .github/actions/macos_install/action.yml | 1 + .github/actions/parallel_h5py/action.yml | 1 + .github/actions/ubuntu_install/action.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/actions/macos_install/action.yml b/.github/actions/macos_install/action.yml index ab3c1ae8c..52c60934e 100644 --- a/.github/actions/macos_install/action.yml +++ b/.github/actions/macos_install/action.yml @@ -1,4 +1,5 @@ name: 'MacOS installation commands' +description: 'Install non-Python dependencies on macOS' runs: using: "composite" diff --git a/.github/actions/parallel_h5py/action.yml b/.github/actions/parallel_h5py/action.yml index e75cf03ab..caa37a512 100644 --- a/.github/actions/parallel_h5py/action.yml +++ b/.github/actions/parallel_h5py/action.yml @@ -1,4 +1,5 @@ name: 'Parallel h5py installation' +description: 'Install h5py in parallel mode using the system MPI and HDF5 libraries' runs: using: "composite" diff --git a/.github/actions/ubuntu_install/action.yml b/.github/actions/ubuntu_install/action.yml index 1b04fc189..0edf2011d 100644 --- a/.github/actions/ubuntu_install/action.yml +++ b/.github/actions/ubuntu_install/action.yml @@ -1,4 +1,5 @@ name: 'Ubuntu installation commands' +description: 'Install non-Python dependencies on Ubuntu' runs: using: "composite" From afa49ee8798f1a5704029b47a4ecef65b24447ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 9 Apr 2026 17:46:29 +0200 Subject: [PATCH 3/6] Rename action: parallel_h5py -> install_h5py --- .github/actions/{parallel_h5py => install_h5py}/action.yml | 0 .github/workflows/documentation.yml | 2 +- .github/workflows/testing.yml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename .github/actions/{parallel_h5py => install_h5py}/action.yml (100%) diff --git a/.github/actions/parallel_h5py/action.yml b/.github/actions/install_h5py/action.yml similarity index 100% rename from .github/actions/parallel_h5py/action.yml rename to .github/actions/install_h5py/action.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 1a4bcd201..ed2189bab 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -101,7 +101,7 @@ jobs: pip install src/binding/petsc4py - name: Install h5py in parallel mode - uses: ./.github/actions/parallel_h5py + uses: ./.github/actions/install_h5py - name: Install project run: | diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 0310099fd..ac312aa5c 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -112,7 +112,7 @@ jobs: pip install src/binding/petsc4py - name: Install h5py in parallel mode - uses: ./.github/actions/parallel_h5py + uses: ./.github/actions/install_h5py - name: Install project run: | From eb5428adc5a9c3a70f1a97b658a45e04933a21bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 9 Apr 2026 18:11:40 +0200 Subject: [PATCH 4/6] Create 'install_petsc4py' action: This installs PETSc and petsc4py with complex support. Use action in 'testing' and 'documentation' workflows. --- .github/actions/install_petsc4py/action.yml | 54 +++++++++++++++++++++ .github/workflows/documentation.yml | 45 +---------------- .github/workflows/testing.yml | 45 +---------------- 3 files changed, 58 insertions(+), 86 deletions(-) create mode 100644 .github/actions/install_petsc4py/action.yml diff --git a/.github/actions/install_petsc4py/action.yml b/.github/actions/install_petsc4py/action.yml new file mode 100644 index 000000000..7cc21c01e --- /dev/null +++ b/.github/actions/install_petsc4py/action.yml @@ -0,0 +1,54 @@ +name: 'Install PETSc and petsc4py' +description: 'Install PETSc and petsc4py with complex support' + +runs: + using: "composite" + steps: + + - name: Cache PETSc + uses: actions/cache@v4 + id: cache-petsc + env: + cache-name: cache-PETSc + with: + path: "./petsc" + key: petsc-${{ matrix.os }}-${{ matrix.python-version }} + + - if: steps.cache-petsc.outputs.cache-hit != 'true' + name: Download a specific release of PETSc + shell: bash + run: | + git clone --depth 1 --branch v3.25.0 https://gitlab.com/petsc/petsc.git + # The branch "release" contains work towards the next version of PETSc, + # and it may not be stable. If necessary, it can be cloned as follows: + # git clone --depth 1 --branch release https://gitlab.com/petsc/petsc.git + + - if: steps.cache-petsc.outputs.cache-hit != 'true' + name: Install PETSc with complex support + shell: bash + working-directory: ./petsc + run: | + export PETSC_DIR=$(pwd) + export PETSC_ARCH=petsc-cmplx + ./configure --with-scalar-type=complex --with-fortran-bindings=0 --have-numpy=1 + make all + echo "PETSC_DIR=$PETSC_DIR" > petsc.env + echo "PETSC_ARCH=$PETSC_ARCH" >> petsc.env + + # This step is not really necessary and could be combined with PETSc install + # step; however it's good to verify if the cached PETSc installation really works! + - name: Test PETSc installation + shell: bash + working-directory: ./petsc + run: | + source petsc.env + make check + echo "PETSC_DIR=$PETSC_DIR" >> $GITHUB_ENV + echo "PETSC_ARCH=$PETSC_ARCH" >> $GITHUB_ENV + + - name: Install petsc4py + shell: bash + working-directory: ./petsc + run: | + pip install wheel Cython numpy + pip install src/binding/petsc4py diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index ed2189bab..c708fb6f6 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -56,49 +56,8 @@ jobs: run: | pip install --upgrade pip setuptools wheel - - name: Cache PETSc - uses: actions/cache@v4 - id: cache-petsc - env: - cache-name: cache-PETSc - with: - path: "./petsc" - key: petsc-${{ matrix.os }}-${{ matrix.python-version }} - - - if: steps.cache-petsc.outputs.cache-hit != 'true' - name: Download a specific release of PETSc - run: | - git clone --depth 1 --branch v3.25.0 https://gitlab.com/petsc/petsc.git - # The branch "release" contains work towards the next version of PETSc, - # and it may not be stable. If necessary, it can be cloned as follows: - # git clone --depth 1 --branch release https://gitlab.com/petsc/petsc.git - - - if: steps.cache-petsc.outputs.cache-hit != 'true' - name: Install PETSc with complex support - working-directory: ./petsc - run: | - export PETSC_DIR=$(pwd) - export PETSC_ARCH=petsc-cmplx - ./configure --with-scalar-type=complex --with-fortran-bindings=0 --have-numpy=1 - make all - echo "PETSC_DIR=$PETSC_DIR" > petsc.env - echo "PETSC_ARCH=$PETSC_ARCH" >> petsc.env - - # This step is not really necessary and could be combined with PETSc install - # step; however it's good to verify if the cached PETSc installation really works! - - name: Test PETSc installation - working-directory: ./petsc - run: | - source petsc.env - make check - echo "PETSC_DIR=$PETSC_DIR" >> $GITHUB_ENV - echo "PETSC_ARCH=$PETSC_ARCH" >> $GITHUB_ENV - - - name: Install petsc4py - working-directory: ./petsc - run: | - pip install wheel Cython numpy - pip install src/binding/petsc4py + - name: Install PETSc and petsc4py with complex support + uses: ./.github/actions/install_petsc4py - name: Install h5py in parallel mode uses: ./.github/actions/install_h5py diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ac312aa5c..fcdf0a9fc 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -67,49 +67,8 @@ jobs: run: | pip install --upgrade pip setuptools wheel - - name: Cache PETSc - uses: actions/cache@v4 - id: cache-petsc - env: - cache-name: cache-PETSc - with: - path: "./petsc" - key: petsc-${{ matrix.os }}-${{ matrix.python-version }} - - - if: steps.cache-petsc.outputs.cache-hit != 'true' - name: Download a specific release of PETSc - run: | - git clone --depth 1 --branch v3.25.0 https://gitlab.com/petsc/petsc.git - # The branch "release" contains work towards the next version of PETSc, - # and it may not be stable. If necessary, it can be cloned as follows: - # git clone --depth 1 --branch release https://gitlab.com/petsc/petsc.git - - - if: steps.cache-petsc.outputs.cache-hit != 'true' - name: Install PETSc with complex support - working-directory: ./petsc - run: | - export PETSC_DIR=$(pwd) - export PETSC_ARCH=petsc-cmplx - ./configure --with-scalar-type=complex --with-fortran-bindings=0 --have-numpy=1 - make all - echo "PETSC_DIR=$PETSC_DIR" > petsc.env - echo "PETSC_ARCH=$PETSC_ARCH" >> petsc.env - - # This step is not really necessary and could be combined with PETSc install - # step; however it's good to verify if the cached PETSc installation really works! - - name: Test PETSc installation - working-directory: ./petsc - run: | - source petsc.env - make check - echo "PETSC_DIR=$PETSC_DIR" >> $GITHUB_ENV - echo "PETSC_ARCH=$PETSC_ARCH" >> $GITHUB_ENV - - - name: Install petsc4py - working-directory: ./petsc - run: | - pip install wheel Cython numpy - pip install src/binding/petsc4py + - name: Install PETSc and petsc4py with complex support + uses: ./.github/actions/install_petsc4py - name: Install h5py in parallel mode uses: ./.github/actions/install_h5py From 6f6df78f70a23bd428a07be09eea9e27193c0ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 9 Apr 2026 18:20:15 +0200 Subject: [PATCH 5/6] Rename actions as macos/ubuntu_installations --- .../actions/{macos_install => macos_installations}/action.yml | 0 .../{ubuntu_install => ubuntu_installations}/action.yml | 0 .github/workflows/deploy.yml | 2 +- .github/workflows/deploy_check.yml | 2 +- .github/workflows/testing.yml | 4 ++-- 5 files changed, 4 insertions(+), 4 deletions(-) rename .github/actions/{macos_install => macos_installations}/action.yml (100%) rename .github/actions/{ubuntu_install => ubuntu_installations}/action.yml (100%) diff --git a/.github/actions/macos_install/action.yml b/.github/actions/macos_installations/action.yml similarity index 100% rename from .github/actions/macos_install/action.yml rename to .github/actions/macos_installations/action.yml diff --git a/.github/actions/ubuntu_install/action.yml b/.github/actions/ubuntu_installations/action.yml similarity index 100% rename from .github/actions/ubuntu_install/action.yml rename to .github/actions/ubuntu_installations/action.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7804583f7..7929ddf04 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,7 +24,7 @@ jobs: submodules: true - name: Install dependencies - uses: ./.github/actions/ubuntu_install + uses: ./.github/actions/ubuntu_installations - name: Update build tools run: | diff --git a/.github/workflows/deploy_check.yml b/.github/workflows/deploy_check.yml index fed925115..9be91e987 100644 --- a/.github/workflows/deploy_check.yml +++ b/.github/workflows/deploy_check.yml @@ -33,7 +33,7 @@ jobs: - name: Install dependencies if: steps.duplicate_check.outputs.should_skip != 'true' - uses: ./.github/actions/ubuntu_install + uses: ./.github/actions/ubuntu_installations - name: Update build tools if: steps.duplicate_check.outputs.should_skip != 'true' diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index fcdf0a9fc..f482ff643 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -52,11 +52,11 @@ jobs: - name: Install non-Python dependencies on Ubuntu if: matrix.os == 'ubuntu-24.04' - uses: ./.github/actions/ubuntu_install + uses: ./.github/actions/ubuntu_installations - name: Install non-Python dependencies on macOS if: matrix.os == 'macos-14' - uses: ./.github/actions/macos_install + uses: ./.github/actions/macos_installations - name: Print information on MPI and HDF5 libraries run: | From 0085574dc246a3723ab229020bb91635b10cf3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 9 Apr 2026 17:12:55 +0200 Subject: [PATCH 6/6] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b6bfa652..3546db8cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. ### Added - #577 : Add an installation configuration option to choose the backend language +- [DEVELOPER] Create action `install_petsc4py` to install PETSc & `petsc4py` w/ complex support ### Fixed @@ -18,16 +19,19 @@ All notable changes to this project will be documented in this file. - #570 : Optimize PSYDAC logo - #565 : Expand editable install info in `README.md` - #566 : Fix command `psydac test --mpi` on Ubuntu machines +- [DEVELOPER] Add missing 'description' properties (required!) to our GitHub actions - [DEVELOPER] Update CI installation of `petsc4py` after release of `setuptools` 81.0 - [DEVELOPER] Check correct reporting of failure for `psydac test` command in CI testing - [DEVELOPER] Use correct configuration file in coverage CI tests ### Changed +- #580 : Use PETSc 3.25.0 whose Python bindings `petsc4py` install correctly with `setuptools>=81.0` - #579 : Require `pyccel>=2.2.3` which can compile all kernels with C - #579 : Require `numpy>=2.1` to support Python >= 3.10 - #579 : Require `pytest>=9.0` and use `pytest.toml` instead of `pytest.ini` for Pytest configuration - #579 : Move coverage configuration from `pyproject.toml` to `psydac/pytest.toml` +- [DEVELOPER] Rename actions: `macos/ubuntu_install` -> `macos/ubuntu_installations` - [DEVELOPER] Do not check file changes to trigger testing workflow on PRs - [DEVELOPER] Run documentation workflow on pushes to `devel` whenever `README.md` is modified - [DEVELOPER] Run testing and documentation workflows on PRs only when set to "ready for review"