-
-
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 workflow to build and test the adapter (#7)
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 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,55 @@ | ||
name: Build and run | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: precice/precice:nightly | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
apt-get -qq update | ||
apt-get -qq install git cmake libblas-dev liblapack-dev libyaml-cpp-dev gfortran g++ | ||
- name: Build OpenFAST | ||
run: | | ||
git clone https://github.com/OpenFAST/OpenFAST.git | ||
cd OpenFAST | ||
git switch --detach v3.5.3 | ||
mkdir build | ||
cd build | ||
cmake -DBUILD_OPENFAST_CPP_API=ON .. | ||
make -j $(nproc) | ||
make install | ||
- name: Build OpenFAST adapter | ||
run: | | ||
cd src | ||
mkdir build | ||
cd build | ||
OpenFAST_DIR=../../OpenFAST/install/lib/cmake/OpenFAST cmake .. | ||
make -j $(nproc) | ||
- name: Build dummy-turbine fluid case | ||
run: | | ||
cd cases/dummy-turbine/fluid | ||
cmake . | ||
make -j $(nproc) | ||
- name: Run dummy-turbine tutorial | ||
run: | | ||
cd cases/dummy-turbine/fluid | ||
./run.sh & | ||
PIDOne=$! | ||
cd ../openfast | ||
PATH="../../../src/build/:${PATH}" ./run.sh & | ||
PIDTwo=$! | ||
wait $PIDOne | ||
wait $PIDTwo |