Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f7578c8
Disable all GH Actions job except Release
rafmudaf Sep 17, 2021
c88d288
Run only AeroDyn module-regression tests
rafmudaf Sep 17, 2021
d31d15a
Use in-source build for GH Actions
rafmudaf Sep 17, 2021
522312c
Add CMake flags to enable code coverage profiling
rafmudaf Sep 17, 2021
ce3f7ff
Generate codecov report
rafmudaf Sep 17, 2021
11d09c5
Upload coverage report to codecov
rafmudaf Sep 17, 2021
8e41d96
Run codecov in debug Actions job
rafmudaf Sep 17, 2021
6ba540d
Remove codecov from release Actions job
rafmudaf Sep 17, 2021
bb9c0c4
Post coverage report to artifacts
rafmudaf Sep 17, 2021
d48cd78
Bug fix: use in source build for glue-code tests
rafmudaf Sep 17, 2021
6f449a9
Disable release reg test job - temporarily
rafmudaf Sep 17, 2021
ec100ca
Use text based coverage report
rafmudaf Sep 17, 2021
427d8cf
Use XML coverage report
rafmudaf Sep 20, 2021
e009e40
Enable code coverage in unit tests
rafmudaf Sep 20, 2021
103b6bf
Enable code coverage in C++ API tests
rafmudaf Sep 20, 2021
ff9e61e
Reenable all automated tests
rafmudaf Sep 20, 2021
4851df3
Add codecov config file with GH comment settinsg
rafmudaf Sep 20, 2021
eda6dc7
Add codecov badge to README
rafmudaf Sep 23, 2021
6783487
Add codecov info in testing docs
rafmudaf Sep 23, 2021
e9a9022
Update CMake flags list
rafmudaf Sep 23, 2021
7e5d2ed
Add CMake warning for code coverage and not debug
rafmudaf Sep 23, 2021
36d4d6b
Merge branch 'dev' into cc
rafmudaf Sep 23, 2021
47e5fae
Use portable method to install system dependencies
rafmudaf Sep 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false
require_base: yes
require_head: yes
branches: null

flag_management:
# this section will govern all default rules of Flags
default_rules:
carryforward: boolean?
ignore: [path]?
paths: [path]?
statuses: [
name_prefix: string (r"^[\w\-\.]+$")
type: OR("project", "patch", "changes")
target: OR("auto", percent)?
include_changes: OR("auto", percent)?
threshold: percent?
**normal status attributes
]?
2 changes: 1 addition & 1 deletion .github/actions/tests-gluecode-openfast/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- run: |
ctest -VV -L linear -E Ideal
ctest -VV -j8 -I 1,1,1,2,3,4,5,6,7,8,10,11,12,13,14,15,17,18,21,22,23,24,25,26,27,28,29
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
shell: bash

# OpenFAST linearization tests
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/tests-module-aerodyn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ runs:
ctest -VV -j7 -R ad_
fi

working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/tests-module-beamdyn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ runs:
ctest -VV -j7 -R bd_
fi

working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/tests-module-hydrodyn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ runs:
using: "composite"
steps:
- run: ctest -VV -j7 -R hd_
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/tests-module-inflowwind/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ runs:
using: "composite"
steps:
- run: ctest -VV -R inflowwind_utest
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/tests-module-nwtclibrary/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ runs:
using: "composite"
steps:
- run: ctest -VV -R nwtc_library_utest
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/tests-module-subdyn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ runs:
using: "composite"
steps:
- run: ctest -VV -j7 -R SD_
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
shell: bash
190 changes: 155 additions & 35 deletions .github/workflows/automated-dev-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:

env:
FORTRAN_COMPILER: gfortran-10
CXX_COMPILER: g++-10
C_COMPILER: gcc-10
GCOV_EXE: gcov-10
NUM_PROCS: 8


Expand All @@ -39,20 +42,22 @@ jobs:
pip install numpy Bokeh==1.4

- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/build
run: cmake -E make_directory ${{runner.workspace}}/openfast/build
- name: Configure Build
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/openfast/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_CXX_COMPILER:STRING=${{env.CXX_COMPILER}} \
-DCMAKE_C_COMPILER:STRING=${{env.C_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DBUILD_TESTING:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build OpenFAST
# 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
working-directory: ${{runner.workspace}}/openfast/build
run: cmake --build . --target install -- -j ${{env.NUM_PROCS}}

- name: Run AeroDyn tests
Expand All @@ -77,14 +82,14 @@ jobs:
with:
name: regression-tests-release
path: |
${{runner.workspace}}/build/reg_tests/modules
${{runner.workspace}}/build/reg_tests/glue-codes/openfast
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/5MW_Baseline
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/AOC
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/AWT27
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/SWRT
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/UAE_VI
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/WP_Baseline
${{runner.workspace}}/openfast/build/reg_tests/modules
${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast
!${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast/5MW_Baseline
!${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast/AOC
!${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast/AWT27
!${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast/SWRT
!${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast/UAE_VI
!${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast/WP_Baseline

regression-tests-debug:
runs-on: ${{ matrix.os }}
Expand All @@ -94,8 +99,10 @@ jobs:
include:
- os: macOS-11
FORTRAN_COMPILER: gfortran-11
install_deps: brew install gcovr
- os: ubuntu-20.04
FORTRAN_COMPILER: gfortran-10
install_deps: sudo apt-get install -y gcovr

name: regression-test-debug-${{ matrix.os }}-${{ matrix.FORTRAN_COMPILER }}
steps:
Expand All @@ -108,26 +115,30 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
${{matrix.install_deps}}

- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/build
run: cmake -E make_directory ${{runner.workspace}}/openfast/build
- name: Configure Build
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/openfast/install \
-DCMAKE_Fortran_COMPILER:STRING=${{matrix.FORTRAN_COMPILER}} \
-DCMAKE_CXX_COMPILER:STRING=${{env.CXX_COMPILER}} \
-DCMAKE_C_COMPILER:STRING=${{env.C_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DBUILD_TESTING:BOOL=ON \
-DCODECOV:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
${GITHUB_WORKSPACE}

- name: Build OpenFAST
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
run: |
cmake --build . --target aerodyn_driver -- -j ${{env.NUM_PROCS}}
cmake --build . --target beamdyn_driver -- -j ${{env.NUM_PROCS}}
Expand All @@ -147,13 +158,42 @@ jobs:
- name: Run SubDyn tests
uses: ./.github/actions/tests-module-subdyn

- name: Generate coverage report
working-directory: ${{runner.workspace}}/openfast/build
run: |
find . -type f -name '*.gcno' -not -path "**tests**" -exec ${{env.GCOV_EXE}} -pb {} +
cd ..
gcovr -g -k -r . --xml regressioncov.xml # --html --html-details -o regressioncov.html # -v

# cp `find . -name *.gcno` .
# cp `find . -name *.gcda` .
# ${{env.GCOV_EXE}} -b -l -p -c *.gcno
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
dry_run: false
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./regressioncov.xml # optional
flags: regtests # optional
# name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
directory: ${{runner.workspace}}/openfast

- name: Success artifacts
uses: actions/upload-artifact@v2
if: success()
with:
name: regression-tests-debug
path: |
${{runner.workspace}}/openfast/regressioncov.xml
- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: regression-tests-debug
path: |
${{runner.workspace}}/build/reg_tests/modules
${{runner.workspace}}/openfast/build/reg_tests/modules

fastfarm-regression-test:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -194,7 +234,6 @@ jobs:
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
Expand All @@ -215,20 +254,36 @@ jobs:
uses: actions/checkout@main
with:
submodules: recursive
- name: Setup
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
working-directory: ${{runner.workspace}}/build

- 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 -y
sudo apt-get install -y gcovr

- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/openfast/build
- name: Configure Build
working-directory: ${{runner.workspace}}/openfast/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/openfast/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DCMAKE_CXX_COMPILER:STRING=${{env.CXX_COMPILER}} \
-DCMAKE_C_COMPILER:STRING=${{env.C_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DBUILD_TESTING:BOOL=ON \
-DCODECOV:BOOL=ON \
${GITHUB_WORKSPACE}

- name: Build unit tests
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
run: cmake --build . --target unit_tests -- -j ${{env.NUM_PROCS}}

- name: Run NWTC Library tests
Expand All @@ -244,6 +299,40 @@ jobs:
- name: Run InflowWind tests
uses: ./.github/actions/tests-module-inflowwind

- name: Generate coverage report
working-directory: ${{runner.workspace}}/openfast/build
run: |
find . -type f -name '*.gcno' -not -path "**tests**" -exec ${{env.GCOV_EXE}} -pb {} +
cd ..
gcovr -g -k -r . --xml unitcov.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
dry_run: false
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./unitcov.xml # optional
flags: unittests # optional
# name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
directory: ${{runner.workspace}}/openfast

- name: Success artifacts
uses: actions/upload-artifact@v2
if: success()
with:
name: unit-tests
path: |
${{runner.workspace}}/openfast/unitcov.xml

- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: unit-tests
path: |
${{runner.workspace}}/openfast/build/unit_tests

compile-all-single-precision:
# Test if single precision compile completes.
# Compiles all targets excluding tests.
Expand Down Expand Up @@ -291,40 +380,71 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
sudo apt-get update

sudo apt-get update -y
sudo apt-get install -y gcovr
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev

- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/build
run: cmake -E make_directory ${{runner.workspace}}/openfast/build
- name: Configure Build
working-directory: ${{runner.workspace}}/build
working-directory: ${{runner.workspace}}/openfast/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/openfast/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DCMAKE_CXX_COMPILER:STRING=${{env.CXX_COMPILER}} \
-DCMAKE_C_COMPILER:STRING=${{env.C_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DBUILD_OPENFAST_CPP_API:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
-DCODECOV: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
working-directory: ${{runner.workspace}}/openfast/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
working-directory: ${{runner.workspace}}/openfast/build
run: |
ctest -VV -L cpp

- name: Generate coverage report
working-directory: ${{runner.workspace}}/openfast/build
run: |
find . -type f -name '*.gcno' -not -path "**tests**" -exec ${{env.GCOV_EXE}} -pb {} +
cd ..
gcovr -g -k -r . --xml regressioncov.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
dry_run: false
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./regressioncov.xml # optional
flags: regtests # optional
# name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
directory: ${{runner.workspace}}/openfast

- name: Success artifacts
uses: actions/upload-artifact@v2
if: success()
with:
name: cpp-reg-tests
path: |
${{runner.workspace}}/openfast/regressioncov.xml

- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
name: cpp-reg-tests
path: |
${{runner.workspace}}/build/reg_tests/glue-codes/openfast-cpp
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast-cpp/5MW_Baseline
Loading