Skip to content

New CI with Github Actions #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
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
17 changes: 17 additions & 0 deletions .github/CI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# CI FreeFEM

Each of the subsequent sections correspond to a workflow composed of a set of
jobs: **Release/Debug + different plateform**. A workflow appears as `failed`
if only one of its jobs has failed. To get more details about the failing
configuration, click on the corresponding badge below.


| master | develop |
|:----------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------:|
| ![Minimal version](https://github.com/FreeFem/FreeFem-sources/actions/workflows/minimal.yml/badge.svg) | ![Minimal version](https://github.com/FreeFem/FreeFem-sources/actions/workflows/minimal.yml/badge.svg?branch=develop) |
| ![Sequential version](https://github.com/FreeFem/FreeFem-sources/actions/workflows/sequential.yml/badge.svg) | ![Sequential version](https://github.com/FreeFem/FreeFem-sources/actions/workflows/sequential.yml/badge.svg?branch=develop) |
| ![Full version OpenMPI](https://github.com/FreeFem/FreeFem-sources/actions/workflows/full-openmpi.yml/badge.svg) | ![Full version OpenMPI](https://github.com/FreeFem/FreeFem-sources/actions/workflows/full-openmpi.yml/badge.svg?branch=develop) |
| ![Full version MPICH](https://github.com/FreeFem/FreeFem-sources/actions/workflows/full-mpich.yml/badge.svg) | ![Full version MPICH](https://github.com/FreeFem/FreeFem-sources/actions/workflows/full-mpich.yml/badge.svg?branch=develop) |
| ![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).
133 changes: 133 additions & 0 deletions .github/workflows/full-mpich.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Full version of FreeFem, using MPICH installed by PETSc
name: Full version MPICH

on:
push:
branches:
- develop
- master

pull_request:
branches:
- develop

# For development phase
workflow_dispatch:

jobs:
linux:
strategy:
fail-fast: false
matrix:
version: [22.04, 24.04]
cfg:
- {opts: --enable-debug}
- {opts: --enable-optim --enable-generic}

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

runs-on: ubuntu-${{ matrix.version }}

steps:
- uses: actions/checkout@v4

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

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

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

- name: Build
run: make -j 4

- name: Check
run: |
make check -i
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
./etc/actions/failed_tests_logs.sh

- name: Install
run: make install

macos:
strategy:
fail-fast: false
matrix:
version: [13, 14, 15]
cfg:
- {opts: --enable-debug}
- {opts: --enable-optim --enable-generic}

name: MacOS ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
- ${{ github.workflow }}

runs-on: macos-${{ matrix.version }}

steps:
- uses: actions/checkout@v4

# Remove homebrew LLVM compiler, and use most recent Xcode development
# tools
- name: Set environment
run: |
if [ "${{ matrix.version }}" -eq "15" ]; then
echo "LLVM_VERSION=18" >> $GITHUB_ENV
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
elif [ "${{ matrix.version }}" -eq "14" ]; then
echo "LLVM_VERSION=15" >> $GITHUB_ENV
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
elif [ "${{ matrix.version }}" -eq "13" ]; then
echo "LLVM_VERSION=15" >> $GITHUB_ENV
sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
echo "LDFLAGS=-Wl,-ld_classic -Wl,-commons,use_dylibs" >> $GITHUB_ENV
fi

- name: Install
run: |
brew install m4 git bison hdf5 wget autoconf automake
brew remove llvm@$LLVM_VERSION

- name: Symlink GCC & Fortran
run: ./etc/actions/macos/link_fortran.sh "$(uname -p)"

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

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

- name: Build
run: make -j 3

- name: Check
run: |
make check -i
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
./etc/actions/failed_tests_logs.sh

- name: Install
run: make install
97 changes: 97 additions & 0 deletions .github/workflows/full-msmpi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Full version of FreeFem, using Microsoft MS-MPI
name: Full version MS-MPI

on:
push:
branches:
- develop
- master

pull_request:
branches:
- develop

# For development phase
workflow_dispatch:

jobs:
windows:
strategy:
fail-fast: false
matrix:
cfg:
# - {opts: --enable-debug}
- {opts: --enable-optim --enable-generic}

name: Windows Server 2022 with ${{ matrix.cfg.opts }} - ${{github.workflow}}
runs-on: windows-2022

defaults:
run:
shell: msys2 {0}

steps:
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: msmpi

- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
mingw-w64-x86_64-toolchain
make
m4
patch
git
flex
bison
unzip
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-openblas
mingw-w64-x86_64-hdf5
mingw-w64-x86_64-gsl
autoconf
automake-wrapper
pkg-config
pkgfile
tar
mingw-w64-x86_64-cmake
mingw-w64-x86_64-msmpi
python

# Otherwise PETSc doesn't know which python to use and returns error at
# configure
- name: Remove packages
run: |
pacman -R --noconfirm mingw-w64-x86_64-python mingw-w64-x86_64-gdb \
mingw-w64-x86_64-gdb-multiarch

- uses: actions/checkout@v4

- name: Configure
run: |
autoreconf -i
./configure ${{ matrix.cfg.opts }} --enable-download \
--enable-maintainer-mode \
--prefix="${HOME}/freefem" \
--with-mpipath="/c/Progam Files/Microsoft MPI/Bin"
MPICC=mpicc MPICXX=mpicxx MPIFC=mpif90
./3rdparty/getall -a -o PETSc

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

- name: Build
run: make -j 4

- name: Check
run: |
make check -i
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
./etc/actions/failed_tests_logs.sh
68 changes: 68 additions & 0 deletions .github/workflows/full-openmpi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Full version of FreeFem, using OpenMPI
name: Full version OpenMPI

on:
push:
branches:
- develop
- master

pull_request:
branches:
- develop

# For development phase
workflow_dispatch:

jobs:
linux:
strategy:
fail-fast: false
matrix:
version: [22.04, 24.04]
cfg:
- {opts: --enable-debug}
- {opts: --enable-optim --enable-generic}

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

runs-on: ubuntu-${{ matrix.version }}

steps:
- uses: actions/checkout@v4

- name: Install
run: |
sudo apt update
sudo apt install gcc g++ gfortran m4 patch git wget cmake \
libhdf5-dev libgsl-dev flex bison autoconf automake \
autotools-dev libopenmpi-dev

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

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

- name: Build
run: make -j 4

- name: Check
run: |
make check -i
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
./etc/actions/failed_tests_logs.sh

- name: Install
run: make install

# No test for MacOS, the homebrew bottle open-mpi seems broken.
Loading
Loading