forked from FloatingArrayDesign/MoorDyn
-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (59 loc) · 2.21 KB
/
mdf_verification.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: MoorDynF regression tests
on:
push:
branches: [ $default-branch, master, mdf ]
pull_request:
branches:
- "**"
permissions: write-all
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
id: setup-python
- name: Install Python dependencies
run: pip install --upgrade build pytest Bokeh numpy
- name: Download OpenFAST
shell: bash
run: |
cd ${{github.workspace}}/
git clone --recursive https://github.com/OpenFAST/openfast.git
- name: Compile MoorDynF
shell: bash
run: |
cd ${{github.workspace}}/
mkdir -p openfast.build
cd openfast.build
cmake openfast -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_TESTING=ON ../openfast
make moordyn_driver
cd ${{github.workspace}}/
- name: Run MoorDynF regression tests
shell: bash
run: |
cd ${{github.workspace}}/openfast.build
ctest -VV -R md_ -LE python
cd ${{github.workspace}}/
- name: Create install folder
run: |
mkdir -p ${{github.workspace}}/install
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=ON -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=OFF -DBUILD_TESTING=ON
- name: Build
id: build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Install
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Set env variables for the tests
run: |
echo "LD_LIBRARY_PATH=${{github.workspace}}/build/source/" >> $GITHUB_ENV
- name: Run the tests
run: python ${{github.workspace}}/tests/.mdf_verification/verify.py ${{github.workspace}}/