WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ configuration, click on the corresponding badge below.
| ![Full version MS-MPI](https://github.com/FreeFem/FreeFem-sources/actions/workflows/full-msmpi.yml/badge.svg) | ![Full version MS-MPI](https://github.com/FreeFem/FreeFem-sources/actions/workflows/full-msmpi.yml/badge.svg?branch=develop) |

GitHub Actions workflows definition files available [here](.github/workflows).

## Triggers

CI worklows are triggered whenever there is a **push on develop or master**
branches, or when creating a **pull request on develop** branch.
90 changes: 72 additions & 18 deletions .github/workflows/full-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,31 @@ on:
branches:
- develop

workflow_call:
inputs:
build-types:
description: 'Build types as JSON array'
required: false
type: string
default: '["debug", "release"]'
versions:
description: 'Ubuntu version as JSON array'
required: false
type: string
default: '[22.04, 24.04]'
skip_check:
required: false
type: boolean
default: false
skip_macos:
required: false
type: boolean
default: false
upload_build_artifacts:
required: false
type: boolean
default: false

# For development phase
workflow_dispatch:

Expand All @@ -23,37 +48,45 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [22.04, 24.04]
cfg:
- {opts: --enable-debug}
- {opts: --enable-optim --enable-generic}
version: ${{ fromJson(inputs.versions || '[22.04, 24.04]') }}
build-type: ${{ fromJson(inputs.build-types || '["debug", "release"]') }}

name: Ubuntu ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
name: Ubuntu ${{ matrix.version }} with ${{ matrix.build-type }} \
- ${{ github.workflow }}

env:
INSTALL_DIR: /usr/local
runs-on: ubuntu-${{ matrix.version }}

steps:
- uses: actions/checkout@v4

- name: Install
- name: Install dependencies
run: |
sudo apt update
sudo apt install gcc g++ gfortran m4 patch git wget cmake \
libhdf5-dev flex bison autoconf automake \
autotools-dev
sudo apt install -y gcc g++ gfortran m4 patch git wget cmake \
libhdf5-dev flex bison autoconf automake unzip patch \
autotools-dev python3 freeglut3-dev

- name: Set configure flags and variables
id: flags
run: |
if [ "${{ matrix.build-type }}" = "debug" ]; then
echo "configure-flags=--enable-debug" >> $GITHUB_OUTPUT
elif [ "${{ matrix.build-type }}" = "release" ]; then
echo "configure-flags=--enable-optim --enable-generic" >> $GITHUB_OUTPUT
fi
echo "staging-dir=${{ github.workspace }}/install_staging" >> $GITHUB_OUTPUT

- name: Configure
run: |
autoreconf -i
./configure --enable-download ${{ matrix.cfg.opts }} \
--prefix="${HOME}/freefem"
./configure --enable-download ${{ steps.flags.outputs.configure-flags }} \
--prefix="$INSTALL_DIR"
./3rdparty/getall -a -o PETSc

- name: PETSc
run: |
cd 3rdparty/ff-petsc
make petsc-slepc
sudo make petsc-slepc
cd -
./reconfigure

Expand All @@ -67,22 +100,43 @@ jobs:
config.log
compression-level: 9

# Weird problem of permission on libfftw3.la without sudo
- name: Build
run: make -j 4
run: sudo make -j 4

- name: Check
if: ${{ inputs.skip_check == false }}
run: |
make check -i
./etc/actions/failed_tests_logs.sh

- name: Install
run: make install
- name: Install to staging directory
if: ${{ inputs.upload_build_artifacts == true }}
run: |
mkdir -p ${{ steps.flags.outputs.staging-dir }}/$INSTALL_DIR
sudo make install DESTDIR=${{ steps.flags.outputs.staging-dir }}
sudo cp -r $INSTALL_DIR/ff-petsc ${{ steps.flags.outputs.staging-dir }}/$INSTALL_DIR

- name: Tar to keep permission when upload/download
if: ${{ inputs.upload_build_artifacts == true }}
run: |
cd ${{ steps.flags.outputs.staging-dir }}/${{ env.INSTALL_DIR }}
tar -czf ${{ github.workspace }}/install_tree.tar.gz .

- name: Upload
if: ${{ inputs.upload_build_artifacts == true }}
uses: actions/upload-artifact@v4
with:
name: install_tree_${{ matrix.version }}
path: install_tree.tar.gz
retention-days: 1

macos:
if: ${{ inputs.skip_macos == false }}
strategy:
fail-fast: false
matrix:
version: [13, 14, 15]
version: [14, 15]
cfg:
- {opts: --enable-debug}
- {opts: --enable-optim --enable-generic}
Expand Down
83 changes: 66 additions & 17 deletions .github/workflows/full-openmpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ on:
branches:
- develop

workflow_call:
inputs:
build-types:
description: 'Build types as JSON array'
required: false
type: string
default: '["debug", "release"]'
versions:
description: 'Ubuntu version as JSON array'
required: false
type: string
default: '[22.04, 24.04]'
skip_check:
required: false
type: boolean
default: false
upload_build_artifacts:
required: false
type: boolean
default: false

# For development phase
workflow_dispatch:

Expand All @@ -23,37 +44,45 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [22.04, 24.04]
cfg:
- {opts: --enable-debug}
- {opts: --enable-optim --enable-generic}
version: ${{ fromJson(inputs.versions || '[22.04, 24.04]') }}
build-type: ${{ fromJson(inputs.build-types || '["debug", "release"]') }}

name: Ubuntu ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
name: Ubuntu ${{ matrix.version }} with ${{ matrix.build-type }} \
- ${{ github.workflow }}

env:
INSTALL_DIR: /usr/local
runs-on: ubuntu-${{ matrix.version }}

steps:
- uses: actions/checkout@v4

- name: Install
- name: Install dependencies
run: |
sudo apt update
sudo apt install gcc g++ gfortran m4 patch git wget cmake \
libhdf5-dev flex bison autoconf automake \
autotools-dev libopenmpi-dev
sudo apt install -y gcc g++ gfortran m4 patch git wget cmake \
libhdf5-dev flex bison autoconf automake unzip patch \
autotools-dev libopenmpi-dev python3 freeglut3-dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use Open MPI instead of letting PETSc compile MPICH? What if users install the .deb but have already MPICH installed?

Copy link
Contributor Author

@simonlegrand simonlegrand Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do that, but in my opinion it's better to leave MPI as an external dependency since the user could have other softwares compiled against OpenMPI or MPICH provided by the distribution. The ideal case would be to provide both MPICH and OpenMPI versions of FreeFEM (like hdf5 for instance), but with MPI as an external dependency. I can try that if you want.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ideal case would be to provide both MPICH and OpenMPI

No, that's a nightmare to maintain, you have two different MPI implementations, with possibility different versions between 22.04 and 24.04. Again, I'm really not sold on the idea of relying on an apt-installed MPI implementation, see, e.g., a very recent bug report https://community.freefem.org/t/freefem-compilation/4150.


- name: Set configure flags and variables
id: flags
run: |
if [ "${{ matrix.build-type }}" = "debug" ]; then
echo "configure-flags=--enable-debug" >> $GITHUB_OUTPUT
elif [ "${{ matrix.build-type }}" = "release" ]; then
echo "configure-flags=--enable-optim --enable-generic" >> $GITHUB_OUTPUT
fi
echo "staging-dir=${{ github.workspace }}/install_staging" >> $GITHUB_OUTPUT

- name: Configure
run: |
autoreconf -i
./configure --enable-download ${{ matrix.cfg.opts }} \
--prefix="${HOME}/freefem"
./configure --enable-download ${{ steps.flags.outputs.configure-flags }} \
--prefix="$INSTALL_DIR"
./3rdparty/getall -a -o PETSc

- name: PETSc
run: |
cd 3rdparty/ff-petsc
make petsc-slepc
sudo make petsc-slepc
cd -
./reconfigure

Expand All @@ -67,15 +96,35 @@ jobs:
config.log
compression-level: 9

# Weird problem of permission on libfftw3.la without sudo
- name: Build
run: make -j 4
run: sudo make -j 4

- name: Check
if: ${{ inputs.skip_check == false }}
run: |
make check -i
./etc/actions/failed_tests_logs.sh

- name: Install
run: make install
- name: Install to staging directory
if: ${{ inputs.upload_build_artifacts == true }}
run: |
mkdir -p ${{ steps.flags.outputs.staging-dir }}/$INSTALL_DIR
sudo make install DESTDIR=${{ steps.flags.outputs.staging-dir }}
sudo cp -r $INSTALL_DIR/ff-petsc ${{ steps.flags.outputs.staging-dir }}/$INSTALL_DIR

- name: Tar to keep permission when upload/download
if: ${{ inputs.upload_build_artifacts == true }}
run: |
cd ${{ steps.flags.outputs.staging-dir }}/${{ env.INSTALL_DIR }}
tar -czf ${{ github.workspace }}/install_tree.tar.gz .

- name: Upload
if: ${{ inputs.upload_build_artifacts == true }}
uses: actions/upload-artifact@v4
with:
name: install_tree_${{ matrix.version }}
path: install_tree.tar.gz
retention-days: 1

# No test for macOS, the homebrew bottle open-mpi seems broken.
2 changes: 1 addition & 1 deletion .github/workflows/minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [13, 14, 15]
version: [14, 15]
cfg:
- {opts: --enable-debug}
- {opts: --enable-optim --enable-generic}
Expand Down
Loading
Loading