|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | | -git fetch origin ${GITHUB_REF}:CI |
4 | | -git checkout CI |
5 | | -git submodule update |
6 | | - |
7 | | -# Print the current git info |
8 | | -echo `git status` |
9 | | -echo `git log -1` |
10 | | -cd /openfast/reg_tests/r-test |
11 | | -echo `git status` |
12 | | -echo `git log -1` |
13 | | -cd /openfast |
| 3 | +verbosecommand() { echo ">>> $1" && eval $1 && echo "<<<"; } |
| 4 | + |
| 5 | +# Configure Bash to exit if any command returns an error |
| 6 | +set -e |
| 7 | + |
| 8 | +verbosecommand "cd /openfast" |
| 9 | + |
| 10 | +repo="OpenFAST" |
| 11 | +echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}" |
| 12 | +if [[ "${GITHUB_EVENT_NAME}" != "pull_request" ]]; then |
| 13 | + repo=${GITHUB_ACTOR} |
| 14 | +fi |
| 15 | +# Create a branch "CI" at the current commit from the GH Actor's fork. |
| 16 | +verbosecommand "git fetch https://github.com/${repo}/openfast ${GITHUB_REF}:CI" |
| 17 | +verbosecommand "git checkout CI" |
| 18 | +verbosecommand "git submodule update" |
| 19 | + |
| 20 | +# Display the current git info |
| 21 | +echo "*** git-status from openfast:" |
| 22 | +verbosecommand "git status" |
| 23 | + |
| 24 | +echo "*** git-log from openfast:" |
| 25 | +verbosecommand "git log -1" |
| 26 | + |
| 27 | +verbosecommand "cd /openfast/reg_tests/r-test" |
| 28 | +echo "*** git-status from r-test:" |
| 29 | +verbosecommand "git status" |
| 30 | + |
| 31 | +echo "*** git-log from r-test:" |
| 32 | +verbosecommand "git log -1" |
| 33 | + |
| 34 | +verbosecommand "cd /openfast" |
| 35 | + |
| 36 | +# Display the differences between this commit and `dev` |
| 37 | +echo "*** git-diff from ${GITHUB_REF} to dev:" |
| 38 | +verbosecommand "git diff dev --numstat" |
14 | 39 |
|
15 | 40 | # Move into the "build" directory, remove the old reg tests, and compile |
16 | | -cd /openfast/build |
17 | | -rm -rf reg_tests |
18 | | -cmake .. |
19 | | -make -j4 install |
| 41 | +verbosecommand "cd /openfast/build" |
| 42 | +verbosecommand "rm -rf reg_tests" |
| 43 | +verbosecommand "cmake .." |
| 44 | +verbosecommand "make -j4 install" |
20 | 45 |
|
21 | 46 | # Run the tests |
22 | 47 |
|
23 | 48 | # NWTC Library tests |
24 | | -ctest -VV -R nwtc_library_utest |
| 49 | +verbosecommand "ctest -VV -R nwtc_library_utest" |
25 | 50 |
|
26 | 51 | # BeamDyn-specific tests |
27 | | -ctest -VV -j7 -R bd_ |
28 | | -ctest -VV -R beamdyn_utest |
| 52 | +verbosecommand "ctest -VV -j7 -R bd_" |
| 53 | +verbosecommand "ctest -VV -R beamdyn_utest" |
| 54 | + |
| 55 | +# OLAF free vortex wake tests |
| 56 | +ctest -VV -R fvw_utest |
29 | 57 |
|
30 | 58 | # OpenFAST linearization tests |
31 | 59 | # Dont run these in parallel, copying the case files can fail in a race condition |
32 | | -ctest -VV -L linear |
| 60 | +# Exclude the Ideal_Beam test cases |
| 61 | +# - They fail consistently in the Docker container when run on GitHub, |
| 62 | +# but pass everywhere else including running the same Docker image locally |
| 63 | +verbosecommand "ctest -VV -L linear -E Ideal" |
33 | 64 |
|
34 | 65 | # Subset of OpenFAST regression tests; do not run |
35 | 66 | ## - 9, 16 because they're very sensitive |
36 | 67 | ## - 19, 20 because theyre too long |
37 | | -## - 17, 22, 23 becuase we dont know why they fail :( |
38 | | -ctest -VV -j8 -I 1,1,1,2,3,4,5,6,7,8,10,11,12,13,14,15,18,21,24,25 |
| 68 | +## - 17, 22, 23 because we dont know why they fail :( |
| 69 | +verbosecommand "ctest -VV -j8 -I 1,1,1,2,3,4,5,6,7,8,10,11,12,13,14,15,18,21,24,25,26,27,28,29" |
0 commit comments