Skip to content

Commit 7c73123

Browse files
committed
Add Github actions workflows definitions and utils
Each workflow contents several jobs (Debug/Release + plateforms)
1 parent c7644ad commit 7c73123

File tree

6 files changed

+642
-0
lines changed

6 files changed

+642
-0
lines changed

.github/workflows/full-mpich.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
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+
10+
# pull_request:
11+
# branches:
12+
# - develop
13+
14+
# For development phase
15+
workflow_dispatch:
16+
17+
jobs:
18+
linux:
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
version: [22.04, 24.04]
23+
cfg:
24+
- {opts: --enable-debug}
25+
- {opts: --enable-optim --enable-generic}
26+
27+
name: Ubuntu ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
28+
- ${{ github.workflow }}
29+
30+
runs-on: ubuntu-${{ matrix.version }}
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Install
36+
run: |
37+
sudo apt update
38+
sudo apt install gcc g++ gfortran m4 patch git wget cmake \
39+
libhdf5-dev libgsl-dev flex bison autoconf automake \
40+
autotools-dev
41+
42+
- name: Configure
43+
run: |
44+
autoreconf -i
45+
./configure --enable-download ${{ matrix.cfg.opts }} \
46+
--prefix="${HOME}/freefem"
47+
./3rdparty/getall -a -o PETSc
48+
49+
- name: PETSc
50+
run: |
51+
cd 3rdparty/ff-petsc
52+
make petsc-slepc
53+
cd -
54+
./reconfigure
55+
56+
- name: Build
57+
run: make -j 4
58+
59+
- name: Check
60+
run: |
61+
make check -i
62+
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
63+
64+
- name: Install
65+
run: make install
66+
67+
macos:
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
version: [13, 14]
72+
cfg:
73+
- {opts: --enable-debug}
74+
- {opts: --enable-optim --enable-generic}
75+
76+
name: MacOS ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
77+
- ${{ github.workflow }}
78+
79+
runs-on: macos-${{ matrix.version }}
80+
81+
env:
82+
CC: clang
83+
CXX: clang++
84+
FC: gfortran
85+
F77: gfortran
86+
87+
steps:
88+
- uses: actions/checkout@v4
89+
90+
- name: Install
91+
run: |
92+
brew install gcc m4 git bison hdf5 cmake wget autoconf automake
93+
94+
- name: Symlink GCC & Fortran
95+
run: ./etc/actions/macos/link_fortran.sh "$(uname -p)"
96+
97+
- name: Configure
98+
run: |
99+
autoreconf -i
100+
./configure --enable-download ${{ matrix.cfg.opts }} \
101+
--prefix="${HOME}/freefem"
102+
./3rdparty/getall -a -o PETSc
103+
104+
- name: PETSc
105+
run: |
106+
cd 3rdparty/ff-petsc
107+
make petsc-slepc
108+
cd -
109+
./reconfigure
110+
111+
- name: Build
112+
run: make -j 3
113+
114+
- name: Check
115+
run: |
116+
make check -i
117+
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
118+
119+
- name: Install
120+
run: make install
121+

.github/workflows/full-msmpi.yml

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

.github/workflows/full-openmpi.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Full version of FreeFem, using OpenMPI
2+
name: Full version OpenMPI
3+
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
- master
9+
10+
# pull_request:
11+
# branches:
12+
# - develop
13+
14+
# For development phase
15+
workflow_dispatch:
16+
17+
jobs:
18+
linux:
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
version: [22.04, 24.04]
23+
cfg:
24+
- {opts: --enable-debug}
25+
- {opts: --enable-optim --enable-generic}
26+
27+
name: Ubuntu ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
28+
- ${{ github.workflow }}
29+
30+
runs-on: ubuntu-${{ matrix.version }}
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Install
36+
run: |
37+
sudo apt update
38+
sudo apt install gcc g++ gfortran m4 patch git wget cmake \
39+
libhdf5-dev libgsl-dev flex bison autoconf automake \
40+
autotools-dev libopenmpi-dev
41+
42+
- name: Configure
43+
run: |
44+
autoreconf -i
45+
./configure --enable-download ${{ matrix.cfg.opts }} \
46+
--prefix="${HOME}/freefem"
47+
./3rdparty/getall -a -o PETSc
48+
49+
- name: PETSc
50+
run: |
51+
cd 3rdparty/ff-petsc
52+
make petsc-slepc
53+
cd -
54+
./reconfigure
55+
56+
- name: Build
57+
run: make -j 4
58+
59+
- name: Check
60+
run: |
61+
make check -i
62+
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
63+
64+
- name: Install
65+
run: make install
66+
67+
macos:
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
version: [13, 14]
72+
cfg:
73+
- {opts: --enable-debug}
74+
- {opts: --enable-optim --enable-generic}
75+
76+
name: MacOS ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
77+
- ${{ github.workflow }}
78+
79+
runs-on: macos-${{ matrix.version }}
80+
81+
env:
82+
CC: gcc
83+
CXX: "g++ -Wl,-ld_classic -Wno-unused-command-line-argument"
84+
FC: gfortran
85+
F77: gfortran
86+
MPIRUN: mpirun
87+
MPICC: mpicc
88+
MPICXX: mpicxx
89+
MPIFC: mpifort
90+
91+
steps:
92+
- uses: actions/checkout@v4
93+
94+
- name: Install
95+
run: |
96+
brew install gcc m4 git bison hdf5 cmake wget autoconf automake \
97+
open-mpi
98+
99+
- name: Symlink GCC & Fortran
100+
run: ./etc/actions/macos/link_fortran.sh "$(uname -p)"
101+
102+
# - name: Setup tmate session
103+
# uses: mxschmitt/action-tmate@v3
104+
105+
- name: Configure
106+
run: |
107+
autoreconf -i
108+
./configure --enable-download --with-mpi=openmpi ${{ matrix.cfg.opts }} \
109+
--prefix="${HOME}/freefem"
110+
./3rdparty/getall -a -o PETSc
111+
112+
# - name: Setup tmate session
113+
# uses: mxschmitt/action-tmate@v3
114+
115+
- name: PETSc
116+
run: |
117+
cd 3rdparty/ff-petsc
118+
make petsc-slepc
119+
cd -
120+
./reconfigure
121+
122+
- name: Build
123+
run: make -j 3
124+
125+
- name: Check
126+
run: |
127+
make check -i
128+
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
129+
130+
- name: Install
131+
run: make install

0 commit comments

Comments
 (0)