Skip to content

Commit

Permalink
Add a workflow to build and test the adapter (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisH committed May 16, 2024
1 parent e606702 commit d9c3e9d
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
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

0 comments on commit d9c3e9d

Please sign in to comment.