Skip to content
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

New CI with Github Actions #329

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
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
121 changes: 121 additions & 0 deletions .github/workflows/full-mpich.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# 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)

- name: Install
run: make install

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

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

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

env:
CC: clang
CXX: clang++
FC: gfortran
F77: gfortran

steps:
- uses: actions/checkout@v4

- name: Install
run: |
brew install gcc m4 git bison hdf5 cmake wget autoconf automake

- 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)

- name: Install
run: make install

96 changes: 96 additions & 0 deletions .github/workflows/full-msmpi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# 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)
131 changes: 131 additions & 0 deletions .github/workflows/full-openmpi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# 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)

- name: Install
run: make install

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

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

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

env:
CC: gcc
CXX: "g++ -Wl,-ld_classic -Wno-unused-command-line-argument"
FC: gfortran
F77: gfortran
MPIRUN: mpirun
MPICC: mpicc
MPICXX: mpicxx
MPIFC: mpifort

steps:
- uses: actions/checkout@v4

- name: Install
run: |
brew install gcc m4 git bison hdf5 cmake wget autoconf automake \
open-mpi

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

# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

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

# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

- 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)

- name: Install
run: make install
Loading