@@ -15,131 +15,134 @@ on:
1515 - ' share/**'
1616 - ' vs-build/**'
1717
18+ env :
19+ FORTRAN_COMPILER : gfortran-10
20+ NUM_PROCS : 8
21+
1822# runs-on: ${{ matrix.os }}
1923# strategy:
2024# matrix:
2125# os: [macOS-10.14, ubuntu-18.04]
2226
2327jobs :
2428 regression-test :
25- runs-on : ubuntu-latest
26- container :
27- image : rafmudaf/openfast-ubuntu:dev
29+ runs-on : ubuntu-20.04
2830 steps :
2931 - name : Checkout
3032 uses : actions/checkout@main
3133 with :
3234 submodules : recursive
33- - name : Git Update
34- uses : ./.github/actions/git-update
35- with :
36- repository : $GITHUB_REPOSITORY
37- ref : $GITHUB_REF
3835
39- - name : Configure CMake
40- uses : ./.github/actions/cmake-config
41- with :
42- build-type : RelWithDebInfo
43- additional-flags : -DBUILD_TESTING=ON -DCTEST_PLOT_ERRORS=ON
36+ - name : Setup Python
37+ uses : actions/setup-python@v2
38+ with :
39+ python-version : ' 3.7'
40+ - name : Install dependencies
41+ run : |
42+ python -m pip install --upgrade pip
43+ pip install numpy Bokeh==1.4
4444
45- - name : Compile Drivers
46- uses : ./.github/actions/compile
47- with :
48- build-target : ' beamdyn_driver hydrodyn_driver'
49- - name : Compile OpenFAST
45+ - name : Setup Workspace
46+ run : cmake -E make_directory ${{runner.workspace}}/build
47+ - name : Configure Build
48+ working-directory : ${{runner.workspace}}/build
49+ run : |
50+ cmake \
51+ -DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
52+ -DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
53+ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
54+ -DBUILD_TESTING:BOOL=ON \
55+ -DCTEST_PLOT_ERRORS:BOOL=ON \
56+ ${GITHUB_WORKSPACE}
57+ - name : Build OpenFAST
5058 # if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
51- uses : ./.github/actions/compile
52- with :
53- build-target : ' regression_tests'
59+ working-directory : ${{runner.workspace}}/build
60+ run : cmake --build . --target install -- -j ${{env.NUM_PROCS}}
5461
55- - name : ' Run BeamDyn tests'
62+ - name : Run BeamDyn tests
5663 uses : ./.github/actions/tests-module-beamdyn
5764 with :
5865 test-target : regression
59- - name : ' Run HydroDyn tests'
66+ - name : Run HydroDyn tests
6067 uses : ./.github/actions/tests-module-hydrodyn
61- - name : ' Run OpenFAST tests'
68+ - name : Run OpenFAST tests
6269 # if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
6370 uses : ./.github/actions/tests-gluecode-openfast
6471
65- - name : ' If failure, post test files '
72+ - name : Failing test artifacts
6673 uses : actions/upload-artifact@v2
6774 if : failure()
6875 with :
6976 name : test-results
7077 path : |
71- /openfast /build/reg_tests/modules
72- /openfast /build/reg_tests/glue-codes/openfast
73- !/openfast /build/reg_tests/glue-codes/openfast/5MW_Baseline
74- !/openfast /build/reg_tests/glue-codes/openfast/AOC
75- !/openfast /build/reg_tests/glue-codes/openfast/AWT27
76- !/openfast /build/reg_tests/glue-codes/openfast/SWRT
77- !/openfast /build/reg_tests/glue-codes/openfast/UAE_VI
78- !/openfast /build/reg_tests/glue-codes/openfast/WP_Baseline
78+ ${{runner.workspace}} /build/reg_tests/modules
79+ ${{runner.workspace}} /build/reg_tests/glue-codes/openfast
80+ !${{runner.workspace}} /build/reg_tests/glue-codes/openfast/5MW_Baseline
81+ !${{runner.workspace}} /build/reg_tests/glue-codes/openfast/AOC
82+ !${{runner.workspace}} /build/reg_tests/glue-codes/openfast/AWT27
83+ !${{runner.workspace}} /build/reg_tests/glue-codes/openfast/SWRT
84+ !${{runner.workspace}} /build/reg_tests/glue-codes/openfast/UAE_VI
85+ !${{runner.workspace}} /build/reg_tests/glue-codes/openfast/WP_Baseline
7986
8087 unit-test :
81- runs-on : ubuntu-latest
82- container :
83- image : rafmudaf/openfast-ubuntu:dev
88+ runs-on : ubuntu-20.04
8489 steps :
8590 - name : Checkout
8691 uses : actions/checkout@main
8792 with :
8893 submodules : recursive
89- - name : Git Update
90- uses : ./.github/actions/git-update
91- with :
92- repository : $GITHUB_REPOSITORY
93- ref : $GITHUB_REF
94+ - name : Setup
95+ run : cmake -E make_directory ${{runner.workspace}}/build
96+ - name : Configure
97+ working-directory : ${{runner.workspace}}/build
98+ run : |
99+ cmake \
100+ -DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
101+ -DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
102+ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
103+ -DBUILD_TESTING:BOOL=ON \
104+ ${GITHUB_WORKSPACE}
94105
95- - name : Configure CMake
96- uses : ./.github/actions/cmake-config
97- with :
98- build-type : RelWithDebInfo
99- additional-flags : -DBUILD_TESTING=ON
100-
101- - name : Compile Unit Tests
102- uses : ./.github/actions/compile
103- with :
104- build-target : ' unit_tests'
106+ - name : Build unit tests
107+ working-directory : ${{runner.workspace}}/build
108+ run : cmake --build . --target unit_tests -- -j ${{env.NUM_PROCS}}
105109
106- - name : ' Run NWTC Library tests'
110+ - name : Run NWTC Library tests
107111 uses : ./.github/actions/tests-module-nwtclibrary
108- - name : ' Run AeroDyn tests'
112+ - name : Run AeroDyn tests
109113 uses : ./.github/actions/tests-module-aerodyn
110- - name : ' Run BeamDyn tests'
114+ - name : Run BeamDyn tests
111115 uses : ./.github/actions/tests-module-beamdyn
112116 with :
113117 test-target : unit
114- - name : ' Run InflowWind tests'
118+ - name : Run InflowWind tests
115119 uses : ./.github/actions/tests-module-inflowwind
116120
117121 compile-all-single-precision :
118122 # Test if single precision compile completes.
123+ # Compiles all targets excluding tests.
119124 # Do not run the test suite.
120125
121- runs-on : ubuntu-latest
122- container :
123- image : rafmudaf/openfast-ubuntu:dev
126+ runs-on : ubuntu-20.04
124127 steps :
125128 - name : Checkout
126129 uses : actions/checkout@main
127130 with :
128131 submodules : recursive
129- - name : Git Update
130- uses : ./.github/actions/git-update
131- with :
132- repository : $GITHUB_REPOSITORY
133- ref : $GITHUB_REF
134- - name : Configure CMake
135- uses : ./.github/actions/cmake-config
136- with :
137- build-type : Debug
138- additional-flags : -DDOUBLE_PRECISION=OFF
139- - name : Compile OpenFAST
140- uses : ./.github/actions/compile
141- with :
142- build- target : ' all'
143- - name : simple-test
144- working-directory : /openfast /build
132+ - name : Setup
133+ run : cmake -E make_directory ${{runner.workspace}}/build
134+ - name : Configure
135+ working-directory : ${{runner.workspace}}/build
136+ run : |
137+ cmake \
138+ -DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
139+ -DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
140+ -DCMAKE_BUILD_TYPE:STRING= Debug \
141+ -DDOUBLE_PRECISION:BOOL =OFF \
142+ ${GITHUB_WORKSPACE}
143+ - name : Build all
144+ working-directory : ${{runner.workspace}}/build
145+ run : cmake -- build . -- target all -- -j ${{env.NUM_PROCS}}
146+ - name : Test
147+ working-directory : ${{runner.workspace}} /build
145148 run : ./glue-codes/openfast/openfast -v
0 commit comments