Skip to content

Commit

Permalink
Release v3.0.0 (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafmudaf committed Jun 24, 2021
2 parents bbbb1ca + 8f1d45e commit 42a5a81
Show file tree
Hide file tree
Showing 252 changed files with 96,722 additions and 22,818 deletions.
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -16,3 +16,17 @@

**Test results, if applicable**
<!-- Add the results from unit tests and regression tests here along with justification for any failing test cases. -->

<!-- Release checklist:
- [ ] Update the documentation version in docs/conf.py
- [ ] Update the versions in docs/source/user/api_change.rst
- [ ] Verify readthedocs builds correctly
- [ ] Create a tag in OpenFAST
- [ ] Create a merge commit in r-test and add a corresponding tag
- [ ] Compile executables for Windows builds
- [ ] FAST_SFunc.mexw64
- [ ] MAP_X64.dll
- [ ] OpenFAST-Simulink_x64.dll
- [ ] openfast_x64.exe
- [ ] DISCON.dll
-->
18 changes: 17 additions & 1 deletion .github/actions/tests-module-aerodyn/action.yml
@@ -1,9 +1,25 @@
name: 'AeroDyn module tests'
description: 'Run tests specific to the AeroDyn module'
author: 'Rafael Mudafort https://github.com/rafmudaf'


inputs:
test-target:
description: 'Which tests to run: unit | regression | all'
default: 'all'

runs:
using: "composite"
steps:
- run: ctest -VV -R fvw_utest
- run: |
if [[ ${{ inputs.test-target }} == "unit" ]] || [[ ${{ inputs.test-target }} == "all" ]]; then
ctest -VV -R fvw_utest
fi
if [[ ${{ inputs.test-target }} == "regression" ]] || [[ ${{ inputs.test-target }} == "all" ]]; then
ctest -VV -j7 -R ad_
fi
working-directory: ${{runner.workspace}}/build
shell: bash
9 changes: 9 additions & 0 deletions .github/actions/tests-module-subdyn/action.yml
@@ -0,0 +1,9 @@
name: 'SubDyn module tests'
description: 'Run tests specific to the SubDyn module'
author: 'Rafael Mudafort https://github.com/rafmudaf'
runs:
using: "composite"
steps:
- run: ctest -VV -j7 -R SD_
working-directory: ${{runner.workspace}}/build
shell: bash
35 changes: 35 additions & 0 deletions .github/actions/utils/increment_conda_build.py
@@ -0,0 +1,35 @@

from shutil import copyfile

# Open existing meta.yaml and another one
metayaml = open('meta.yaml')
outyaml = open('out.yaml', 'w')

# Find the build number, increment it, and write to the new yaml
found = False
for line in metayaml:
if "number:" in line:
found = True
# For the line containing the build number, parse the number and increment
elements = [e.strip() for e in line.split(":")]
if not elements[1].isnumeric():
raise ValueError("Build number is not parsable: {}".format(line))

old_build_number = int(elements[1])
new_build_number = old_build_number + 1

# Write new build number to new yaml
outyaml.write(line.replace(str(old_build_number), str(new_build_number)))
else:
# Write all other lines to new yaml
outyaml.write(line)

if not found:
raise Exception("Error incrementing the build number.")

# Clean up
metayaml.close()
outyaml.close()

# Replace original meta.yaml with the new one
copyfile('out.yaml', 'meta.yaml')
190 changes: 183 additions & 7 deletions .github/workflows/automated-dev-tests.yml
Expand Up @@ -4,16 +4,16 @@ name: 'Development Pipeline'
on:
push:
paths-ignore:
- 'LICENSE'
- 'README.rst'
- 'docs/**'
- 'share/**'
- 'vs-build/**'

pull_request:
types: [opened, synchronize] #labeled, assigned]
paths-ignore:
- 'docs/**'
- 'share/**'
- 'vs-build/**'
types: [opened, synchronize, edited, reopened] #labeled, assigned]
# Pull request event triggers are unrelated to paths
# paths-ignore:

env:
FORTRAN_COMPILER: gfortran-10
Expand All @@ -25,7 +25,7 @@ env:
# os: [macOS-10.14, ubuntu-18.04]

jobs:
regression-test:
regression-tests-release:
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand Down Expand Up @@ -59,12 +59,18 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target install -- -j ${{env.NUM_PROCS}}

- name: Run AeroDyn tests
uses: ./.github/actions/tests-module-aerodyn
with:
test-target: regression
- name: Run BeamDyn tests
uses: ./.github/actions/tests-module-beamdyn
with:
test-target: regression
- name: Run HydroDyn tests
uses: ./.github/actions/tests-module-hydrodyn
- name: Run SubDyn tests
uses: ./.github/actions/tests-module-subdyn
- name: Run OpenFAST tests
# if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
uses: ./.github/actions/tests-gluecode-openfast
Expand All @@ -73,7 +79,7 @@ jobs:
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
name: regression-tests-release
path: |
${{runner.workspace}}/build/reg_tests/modules
${{runner.workspace}}/build/reg_tests/glue-codes/openfast
Expand All @@ -84,6 +90,118 @@ jobs:
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/UAE_VI
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/WP_Baseline
regression-tests-debug:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure Build
working-directory: ${{runner.workspace}}/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DBUILD_TESTING:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build OpenFAST
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --target aerodyn_driver -- -j ${{env.NUM_PROCS}}
cmake --build . --target beamdyn_driver -- -j ${{env.NUM_PROCS}}
cmake --build . --target hydrodyn_driver -- -j ${{env.NUM_PROCS}}
cmake --build . --target subdyn_driver -- -j ${{env.NUM_PROCS}}
- name: Run AeroDyn tests
uses: ./.github/actions/tests-module-aerodyn
with:
test-target: regression
- name: Run BeamDyn tests
uses: ./.github/actions/tests-module-beamdyn
with:
test-target: regression
- name: Run HydroDyn tests
uses: ./.github/actions/tests-module-hydrodyn
- name: Run SubDyn tests
uses: ./.github/actions/tests-module-subdyn

- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: regression-tests-debug
path: |
${{runner.workspace}}/build/reg_tests/modules
fastfarm-regression-test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure Build
working-directory: ${{runner.workspace}}/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DOPENMP:BOOL=ON \
-DBUILD_FASTFARM:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DBUILD_TESTING:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build FAST.Farm
# if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --target FAST.Farm -- -j ${{env.NUM_PROCS}}
cmake --build . --target regression_tests -- -j ${{env.NUM_PROCS}}
- name: Run FAST.Farm tests
# if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
run: |
ctest -VV -L fastfarm -j ${{env.NUM_PROCS}}
working-directory: ${{runner.workspace}}/build
shell: bash

- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: |
${{runner.workspace}}/build/reg_tests/glue-codes/fastfarm
unit-test:
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -111,6 +229,8 @@ jobs:
uses: ./.github/actions/tests-module-nwtclibrary
- name: Run AeroDyn tests
uses: ./.github/actions/tests-module-aerodyn
with:
test-target: unit
- name: Run BeamDyn tests
uses: ./.github/actions/tests-module-beamdyn
with:
Expand All @@ -121,6 +241,7 @@ jobs:
compile-all-single-precision:
# Test if single precision compile completes.
# Compiles all targets excluding tests.
# Run with the OpenFAST registry generating the types files.
# Do not run the test suite.

runs-on: ubuntu-20.04
Expand All @@ -139,10 +260,65 @@ jobs:
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DDOUBLE_PRECISION:BOOL=OFF \
-DGENERATE_TYPES:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build all
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target all -- -j ${{env.NUM_PROCS}}
- name: Test
working-directory: ${{runner.workspace}}/build
run: ./glue-codes/openfast/openfast -v

cpp-interface-tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
sudo apt-get update
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure Build
working-directory: ${{runner.workspace}}/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DBUILD_OPENFAST_CPP_API:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build OpenFAST C++ API
# if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --target openfastcpp -- -j ${{env.NUM_PROCS}}
cmake --build . --target regression_tests -- -j ${{env.NUM_PROCS}}
- name: Run OpenFAST C++ API tests
working-directory: ${{runner.workspace}}/build
run: |
ctest -VV -L cpp
- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: |
${{runner.workspace}}/build/reg_tests/glue-codes/openfast-cpp
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast-cpp/5MW_Baseline

0 comments on commit 42a5a81

Please sign in to comment.