Skip to content

Commit f24f770

Browse files
authored
Merge pull request FreeFem#329 from simonlegrand/slegrand-actions
New CI with Github Actions
2 parents b9d0b68 + 60b0a19 commit f24f770

75 files changed

Lines changed: 1008 additions & 2337 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CI.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# CI FreeFEM
2+
3+
Each of the subsequent sections correspond to a workflow composed of a set of
4+
jobs: **Release/Debug + different plateform**. A workflow appears as `failed`
5+
if only one of its jobs has failed. To get more details about the failing
6+
configuration, click on the corresponding badge below.
7+
8+
9+
| master | develop |
10+
|:----------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------:|
11+
| ![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) |
12+
| ![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) |
13+
| ![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) |
14+
| ![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) |
15+
| ![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) |
16+
17+
GitHub Actions workflows definition files available [here](.github/workflows).

.github/workflows/full-mpich.yml

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# Full version of FreeFem, using MPICH installed by PETSc
2+
name: Full version MPICH
3+
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
- master
9+
- slegrand-actions-debug
10+
11+
pull_request:
12+
branches:
13+
- develop
14+
15+
# For development phase
16+
workflow_dispatch:
17+
18+
jobs:
19+
linux:
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
version: [22.04, 24.04]
24+
cfg:
25+
- {opts: --enable-debug}
26+
- {opts: --enable-optim --enable-generic}
27+
28+
name: Ubuntu ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
29+
- ${{ github.workflow }}
30+
31+
runs-on: ubuntu-${{ matrix.version }}
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Install
37+
run: |
38+
sudo apt update
39+
sudo apt install gcc g++ gfortran m4 patch git wget cmake \
40+
libhdf5-dev libgsl-dev flex bison autoconf automake \
41+
autotools-dev
42+
43+
- name: Configure
44+
run: |
45+
autoreconf -i
46+
./configure --enable-download ${{ matrix.cfg.opts }} \
47+
--prefix="${HOME}/freefem"
48+
./3rdparty/getall -a -o PETSc
49+
50+
- name: PETSc
51+
run: |
52+
cd 3rdparty/ff-petsc
53+
make petsc-slepc
54+
cd -
55+
./reconfigure
56+
57+
- name: Upload PETSc and reconfigure logs on fail
58+
if: ${{ failure() }}
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: PETSc-reconfigure-logs
62+
path: |
63+
3rdparty/ff-petsc/petsc-*/configure.log
64+
config.log
65+
compression-level: 9
66+
67+
- name: Build
68+
run: make -j 4
69+
70+
- name: Check
71+
run: |
72+
make check -i
73+
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
74+
./etc/actions/failed_tests_logs.sh
75+
76+
- name: Install
77+
run: make install
78+
79+
macos:
80+
strategy:
81+
fail-fast: false
82+
matrix:
83+
version: [13, 14, 15]
84+
cfg:
85+
- {opts: --enable-debug}
86+
- {opts: --enable-optim --enable-generic}
87+
88+
name: MacOS ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
89+
- ${{ github.workflow }}
90+
91+
runs-on: macos-${{ matrix.version }}
92+
93+
steps:
94+
- uses: actions/checkout@v4
95+
96+
# Remove homebrew LLVM compiler, and use most recent Xcode development
97+
# tools
98+
- name: Set environment
99+
run: |
100+
if [ "${{ matrix.version }}" -eq "15" ]; then
101+
echo "LLVM_VERSION=18" >> $GITHUB_ENV
102+
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
103+
elif [ "${{ matrix.version }}" -eq "14" ]; then
104+
echo "LLVM_VERSION=15" >> $GITHUB_ENV
105+
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
106+
elif [ "${{ matrix.version }}" -eq "13" ]; then
107+
echo "LLVM_VERSION=15" >> $GITHUB_ENV
108+
sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
109+
echo "LDFLAGS=-Wl,-ld_classic -Wl,-commons,use_dylibs" >> $GITHUB_ENV
110+
fi
111+
112+
- name: Install
113+
run: |
114+
brew install m4 git bison hdf5 wget autoconf automake
115+
brew remove llvm@$LLVM_VERSION
116+
117+
- name: Symlink gfortran
118+
run: ./etc/actions/macos/link_fortran.sh "$(uname -p)"
119+
120+
- name: Configure
121+
run: |
122+
autoreconf -i
123+
./configure --enable-download ${{ matrix.cfg.opts }} \
124+
--prefix="${HOME}/freefem"
125+
./3rdparty/getall -a -o PETSc
126+
127+
- name: PETSc
128+
run: |
129+
cd 3rdparty/ff-petsc
130+
make petsc-slepc
131+
cd -
132+
./reconfigure
133+
134+
- name: Upload PETSc and reconfigure logs on fail
135+
if: ${{ failure() }}
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: PETSc-reconfigure-logs
139+
path: |
140+
3rdparty/ff-petsc/petsc-*/configure.log
141+
config.log
142+
compression-level: 9
143+
144+
- name: Build
145+
run: make -j 3
146+
147+
- name: Check
148+
run: |
149+
make check -i
150+
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
151+
./etc/actions/failed_tests_logs.sh
152+
153+
- name: Install
154+
run: make install

.github/workflows/full-msmpi.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Full version of FreeFem, using Microsoft MS-MPI
2+
name: Full version MS-MPI
3+
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
- master
9+
- slegrand-actions-debug
10+
11+
pull_request:
12+
branches:
13+
- develop
14+
15+
# For development phase
16+
workflow_dispatch:
17+
18+
jobs:
19+
windows:
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
cfg:
24+
# - {opts: --enable-debug}
25+
- {opts: --enable-optim --enable-generic}
26+
27+
name: Windows Server 2022 with ${{ matrix.cfg.opts }} - ${{github.workflow}}
28+
runs-on: windows-2022
29+
30+
defaults:
31+
run:
32+
shell: msys2 {0}
33+
34+
steps:
35+
- name: Setup MPI
36+
uses: mpi4py/setup-mpi@v1
37+
with:
38+
mpi: msmpi
39+
40+
- uses: msys2/setup-msys2@v2
41+
with:
42+
update: true
43+
install: >-
44+
mingw-w64-x86_64-toolchain
45+
make
46+
m4
47+
patch
48+
git
49+
flex
50+
bison
51+
unzip
52+
mingw-w64-x86_64-gcc-fortran
53+
mingw-w64-x86_64-openblas
54+
mingw-w64-x86_64-hdf5
55+
mingw-w64-x86_64-gsl
56+
autoconf
57+
automake-wrapper
58+
pkg-config
59+
pkgfile
60+
tar
61+
mingw-w64-x86_64-cmake
62+
mingw-w64-x86_64-msmpi
63+
python
64+
65+
# Otherwise PETSc doesn't know which python to use and returns error at
66+
# configure
67+
- name: Remove packages
68+
run: |
69+
pacman -R --noconfirm mingw-w64-x86_64-python mingw-w64-x86_64-gdb \
70+
mingw-w64-x86_64-gdb-multiarch
71+
72+
- uses: actions/checkout@v4
73+
74+
- name: Configure
75+
run: |
76+
autoreconf -i
77+
./configure ${{ matrix.cfg.opts }} --enable-download \
78+
--enable-maintainer-mode \
79+
--prefix="${HOME}/freefem" \
80+
--with-mpipath="/c/Progam Files/Microsoft MPI/Bin"
81+
MPICC=mpicc MPICXX=mpicxx MPIFC=mpif90
82+
./3rdparty/getall -a -o PETSc
83+
84+
- name: PETSc
85+
run: |
86+
cd 3rdparty/ff-petsc
87+
make petsc-slepc
88+
cd -
89+
./reconfigure
90+
91+
- name: Upload PETSc and reconfigure logs on fail
92+
if: ${{ failure() }}
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: PETSc-reconfigure-logs
96+
path: |
97+
3rdparty/ff-petsc/petsc-*/configure.log
98+
config.log
99+
compression-level: 9
100+
101+
- name: Build
102+
run: make -j 4
103+
104+
- name: Check
105+
run: |
106+
make check -i
107+
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
108+
./etc/actions/failed_tests_logs.sh

.github/workflows/full-openmpi.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Full version of FreeFem, using OpenMPI
2+
name: Full version OpenMPI
3+
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
- master
9+
- slegrand-actions-debug
10+
11+
pull_request:
12+
branches:
13+
- develop
14+
15+
# For development phase
16+
workflow_dispatch:
17+
18+
jobs:
19+
linux:
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
version: [22.04, 24.04]
24+
cfg:
25+
- {opts: --enable-debug}
26+
- {opts: --enable-optim --enable-generic}
27+
28+
name: Ubuntu ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
29+
- ${{ github.workflow }}
30+
31+
runs-on: ubuntu-${{ matrix.version }}
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Install
37+
run: |
38+
sudo apt update
39+
sudo apt install gcc g++ gfortran m4 patch git wget cmake \
40+
libhdf5-dev libgsl-dev flex bison autoconf automake \
41+
autotools-dev libopenmpi-dev
42+
43+
- name: Configure
44+
run: |
45+
autoreconf -i
46+
./configure --enable-download ${{ matrix.cfg.opts }} \
47+
--prefix="${HOME}/freefem"
48+
./3rdparty/getall -a -o PETSc
49+
50+
- name: PETSc
51+
run: |
52+
cd 3rdparty/ff-petsc
53+
make petsc-slepc
54+
cd -
55+
./reconfigure
56+
57+
- name: Upload PETSc and reconfigure logs on fail
58+
if: ${{ failure() }}
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: PETSc-reconfigure-logs
62+
path: |
63+
3rdparty/ff-petsc/petsc-*/configure.log
64+
config.log
65+
compression-level: 9
66+
67+
- name: Build
68+
run: make -j 4
69+
70+
- name: Check
71+
run: |
72+
make check -i
73+
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
74+
./etc/actions/failed_tests_logs.sh
75+
76+
- name: Install
77+
run: make install
78+
79+
# No test for MacOS, the homebrew bottle open-mpi seems broken.

0 commit comments

Comments
 (0)