forked from TheAlgorithms/Fortran
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d3429f
commit 75dd3c5
Showing
2 changed files
with
83 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters