Skip to content

Commit

Permalink
Merge pull request #5 from WISDEM/develop
Browse files Browse the repository at this point in the history
WISDEM/WEIS:develop -> UIUC/WEIS:uiuc-dfsm
  • Loading branch information
yonghoonlee authored Jul 9, 2021
2 parents 29ca790 + f50b168 commit 403b943
Show file tree
Hide file tree
Showing 850 changed files with 165,615 additions and 60,416 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,15 @@ Thumbs.db
*.sum
*.ech
*.dbg
*/CMakeCache.txt
*.check_cache

# Temp
*Temp*
*temp*

outputs/
results/

# Turbsim
wind/
18 changes: 17 additions & 1 deletion OpenFAST/.github/actions/tests-module-aerodyn/action.yml
Original file line number Diff line number Diff line change
@@ -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 OpenFAST/.github/actions/tests-module-subdyn/action.yml
Original file line number Diff line number Diff line change
@@ -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 OpenFAST/.github/actions/utils/increment_conda_build.py
Original file line number Diff line number Diff line change
@@ -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')
188 changes: 185 additions & 3 deletions OpenFAST/.github/workflows/automated-dev-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'vs-build/**'

pull_request:
types: [opened, synchronize] #labeled, assigned]
types: [opened, synchronize, edited, reopened] #labeled, assigned]
paths-ignore:
- 'docs/**'
- 'share/**'
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,71 @@ 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

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 Interfaces
# 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 openfastlib -- -j ${{env.NUM_PROCS}}
cmake --build . --target openfastcpp -- -j ${{env.NUM_PROCS}}
cmake --build . --target regression_tests -- -j ${{env.NUM_PROCS}}
- name: Run C++ API tests
working-directory: ${{runner.workspace}}/build
run: |
ctest -VV -L cpp
- name: Run Python API tests
working-directory: ${{runner.workspace}}/build
run: |
ctest -VV -L python
- 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
47 changes: 47 additions & 0 deletions OpenFAST/.github/workflows/conda-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

name: 'Conda Deployment Pipeline'

on:
push:
paths-ignore:
- 'docs/**'
- 'share/**'
- 'vs-build/**'
branches:
- 'dev'

jobs:
update-dev:
if: github.repository_owner == 'OpenFAST'
runs-on: ubuntu-20.04
steps:
# - name: Echo path
# run: |
# echo ${{runner.workspace}} # /home/runner/work/openfast
# echo $GITHUB_WORKSPACE # /home/runner/work/openfast/openfast
- name: Checkout OpenFAST/dev
uses: actions/checkout@main
with:
path: ${{runner.workspace}}/openfast
ref: dev

- name: Checkout openfast-feedstock
uses: actions/checkout@main
with:
repository: conda-forge/openfast-feedstock
token: ${{ secrets.ACTIONS_TOKEN }}
path: ./openfast-feedstock
ref: dev

- name: Prep the meta.yaml
run: python ${{runner.workspace}}/openfast/.github/actions/utils/increment_conda_build.py
working-directory: ./openfast-feedstock/recipe

- name: Push Project B
run: |
cd ./openfast-feedstock
git add recipe/meta.yaml
git config user.name github-actions
git config user.email [email protected]
git commit -m "Increment build number for dev label"
git push
Loading

0 comments on commit 403b943

Please sign in to comment.