Skip to content

Commit

Permalink
testing fortuno
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramy-Badr-Ahmed committed Oct 8, 2024
1 parent 0d3429f commit 75dd3c5
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 17 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/ci-fortuno.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI for Fortuno Integration

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

env:
BUILD_DIR: _build
INSTALL_DIR: _install

jobs:

#
# Test Fortuno integration in various configurations
#
fortuno-integration-test:

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
compiler: gnu
mpi: nompi
interface: serial
- os: ubuntu-latest
compiler: gnu
mpi: mpich
interface: mpi
- os: ubuntu-latest
compiler: intel
mpi: nompi
interface: serial

steps:

- name: Check-out code
uses: actions/checkout@v4

- name: Setup Intel compiler
if: ${{ contains(matrix.compiler, 'intel') }}
uses: rscohn2/setup-oneapi@v0
with:
components: |
ifx
icx
impi
- name: Setup GNU compiler
if: ${{ contains(matrix.compiler, 'gnu') }}
uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc
version: 13

- name: Setup build tools
run: |
pip install cmake fpm meson ninja fypp
- name: Build Fortuno
run: |
mkdir -p ${BUILD_DIR}
cmake -B ${BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DFORTUNO_WITH_SERIAL=ON
cmake --build ${BUILD_DIR}
cmake --install ${BUILD_DIR}
rm -rf ${BUILD_DIR}
- name: Run tests
run: |
cd ${BUILD_DIR}/app
./testapp
./testapp_fpp
./testapp_fypp
- name: Cleanup
run: |
rm -rf ${INSTALL_DIR} ${FPM_EXPORT_DIR}
19 changes: 2 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ name: ci

env:
build_path: ${{github.workspace}}/build
fortuno_build_path: ${{github.workspace}}/fortuno/build

jobs:
build_and_test:
Expand All @@ -27,23 +26,9 @@ jobs:
- name: Display versions
run: |
gfortran --version
cmake --version
cmake --version
- name: Clone Fortuno
run: |
git clone https://github.com/fortuno-repos/fortuno.git ${{github.workspace}}/fortuno
ls -l
- name: Create Fortuno Build Directory
run: cmake -E make_directory ${{env.fortuno_build_path}}

- name: Build Fortuno
working-directory: ${{env.fortuno_build_path}}
run: |
cmake ..
make
- name: Create Project Build Directory
- name: Create Build Directory
run: cmake -E make_directory ${{env.build_path}}

- name: Configure CMake
Expand Down

0 comments on commit 75dd3c5

Please sign in to comment.