forked from erf-model/erf-amrwind-driver
-
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.
Add a CI workflow for a Linux GCC build (and run) test (erf-model#11)
This is an outcome of the NERSC week hackathon which I used to learn CI workflows from the experienced folks at NERSC. It checks out specific ERF and AMR-Wind branches from my personal forks as the dependencies for now. The Couette flow simulation test is commented out for now as it is hanging.
- Loading branch information
Showing
4 changed files
with
88 additions
and
14 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,65 @@ | ||
name: Linux GCC | ||
|
||
on: [push, pull_request] | ||
|
||
#concurrency: | ||
# group: ${{ github.ref }}-${{ github.head_ref }}-linux-gcc | ||
# cancel-in-progress: true | ||
|
||
jobs: | ||
library: | ||
name: [email protected] C++17 Release | ||
runs-on: ubuntu-20.04 | ||
# env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual"} | ||
steps: | ||
- name: checkout driver | ||
uses: actions/checkout@v3 | ||
|
||
- name: checkout ERF | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mukul1992/ERF.git | ||
ref: preserve-amrw-coupling | ||
submodules: true | ||
path: ERF | ||
- name: checkout amr-wind | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mukul1992/amr-wind.git | ||
ref: new-erf-coupling | ||
submodules: true | ||
path: amr-wind | ||
|
||
- name: Install Dependencies | ||
run: ${{github.workspace}}/ERF/Submodules/AMReX/.github/workflows/dependencies/dependencies.sh | ||
|
||
- name: Configure Project and Generate Build System | ||
run: | | ||
cmake \ | ||
-B${{runner.workspace}}/erf-amrwind-driver/build \ | ||
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/erf-amrwind-driver/install \ | ||
-DCMAKE_CXX_COMPILER:STRING=mpicxx \ | ||
-DCMAKE_C_COMPILER:STRING=mpicc \ | ||
-DCMAKE_Fortran_COMPILER:STRING=mpifort \ | ||
-DCMAKE_BUILD_TYPE:STRING=Release \ | ||
-DAMRWIND_HOME:STRING=${{github.workspace}}/amr-wind \ | ||
-DERF_HOME:STRING=${{github.workspace}}/ERF \ | ||
-DERF_DIM:STRING=3 \ | ||
-DERF_ENABLE_MPI:BOOL=ON \ | ||
-DERF_ENABLE_TESTS:BOOL=OFF \ | ||
-DERF_ENABLE_FCOMPARE:BOOL=ON \ | ||
-DERF_ENABLE_DOCUMENTATION:BOOL=OFF \ | ||
-DERF_ENABLE_MULTIBLOCK:BOOL=ON \ | ||
${{github.workspace}}; | ||
- name: Compile and Link | ||
run: | | ||
cd ${{runner.workspace}}/erf-amrwind-driver/build | ||
make -j 8 | ||
- name: Run Couette flow problem | ||
run: | | ||
cd ${{runner.workspace}}/erf-amrwind-driver/build | ||
cd Exec/CouetteFlow | ||
cp ${{runner.workspace}}/erf-amrwind-driver/Exec/CouetteFlow/input* . | ||
# ./erf_mb_couette inputs_amrex input_erf1 input_amrwind |
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
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,20 @@ | ||
#!/bin/bash | ||
|
||
# Example CMake config script for an OSX laptop with OpenMPI | ||
|
||
cmake -DCMAKE_INSTALL_PREFIX:PATH=./install \ | ||
-DCMAKE_CXX_COMPILER:STRING=mpicxx \ | ||
-DCMAKE_C_COMPILER:STRING=mpicc \ | ||
-DCMAKE_Fortran_COMPILER:STRING=mpifort \ | ||
-DMPIEXEC_PREFLAGS:STRING=--oversubscribe \ | ||
-DCMAKE_BUILD_TYPE:STRING=Debug \ | ||
-DAMRWIND_HOME:STRING=$HOME/amr-wind \ | ||
-DERF_HOME:STRING=$HOME/ERF \ | ||
-DERF_DIM:STRING=3 \ | ||
-DERF_ENABLE_MPI:BOOL=ON \ | ||
-DERF_ENABLE_TESTS:BOOL=OFF \ | ||
-DERF_ENABLE_FCOMPARE:BOOL=ON \ | ||
-DERF_ENABLE_DOCUMENTATION:BOOL=OFF \ | ||
-DERF_ENABLE_MULTIBLOCK:BOOL=ON \ | ||
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \ | ||
.. && make -j8 |
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