Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 52 additions & 3 deletions .github/scripts/build_windows_executables.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,65 @@ for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\
@REM since building the Visual Studio projects modifies files
powershell -command "(Get-Content -Path '.\vs-build\CreateGitVersion.bat') -replace '--dirty', '' | Set-Content -Path '.\vs-build\CreateGitVersion.bat'"

echo on

@REM Build all solutions

setlocal enabledelayedexpansion

:: Initialize a variable to store failed solutions
set "FailedSolutions="
set "OverallErrorLevel=0"


echo on
@REM Build all solutions (release 64)
devenv vs-build/OpenFAST.sln /Build "Release|x64"
echo off
if %ERRORLEVEL% NEQ 0 (
set "FailedSolutions=!FailedSolutions!Release "
set "OverallErrorLevel=1"
echo Build of OpenFAST.sln Release failed!
)
echo on


@REM Build all OpenMP solutions (release 64 OpenMP)
echo on
devenv vs-build/OpenFAST.sln /Build "Release_OpenMP|x64"
echo off
if %ERRORLEVEL% NEQ 0 (
set "FailedSolutions=!FailedSolutions!Release_OpenMP "
set "OverallErrorLevel=1"
echo Build of OpenFAST.sln Release_OpenMP failed!
)
echo on


@REM Build MATLAB solution last
echo on
devenv vs-build/OpenFAST.sln /Build "Release_Matlab|x64"
echo off
if %ERRORLEVEL% NEQ 0 (
set "FailedSolutions=!FailedSolutions!Release_Matlab "
set "OverallErrorLevel=1"
echo Build of OpenFAST.sln Release_Matlab failed!
)
echo on



@REM Copy controllers to bin directory
@REM xcopy .\reg_tests\r-test\glue-codes\openfast\5MW_Baseline\ServoData\*.dll .\build\bin\ /y

exit /b %ERRORLEVEL%
echo.
echo Build Summary:
echo off
if defined FailedSolutions (
echo The following solutions failed to build:
echo %FailedSolutions%
) else (
echo All solutions built successfully.
)
echo on

:: Set the final error level based on the overall build status
exit /b %OverallErrorLevel%
61 changes: 61 additions & 0 deletions .github/scripts/test_windows_executables.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
echo off
setlocal enabledelayedexpansion

:: Initialize a variable to store failed solutions
set "FailedExecs="
set "OverallErrorLevel=0"

echo "Directory listing of executables"
dir build\bin
echo.

:: test OpenFAST
echo on
build\bin\OpenFAST.exe -h
echo off
if %ERRORLEVEL% NEQ 0 (
set "FailedExecs=!FailedExecs!OpenFAST "
set "OverallErrorLevel=1"
echo OpenFAST failed to run!
)
echo on


:: test TurbSim
echo on
build\bin\TurbSim.exe -h
echo off
if %ERRORLEVEL% NEQ 0 (
set "FailedExecs=!FailedExecs!TurbSim "
set "OverallErrorLevel=1"
echo TurbSim failed to run!
)
echo on


:: test FAST.Farm
echo on
build\bin\FAST.Farm.exe -h
echo off
if %ERRORLEVEL% NEQ 0 (
set "FailedExecs=!FailedExecs!FAST.Farm "
set "OverallErrorLevel=1"
echo FAST.Farm failed to run!
)
echo on



echo.
echo Test Summary:
echo off
if defined FailedExecs (
echo The following executables failed to run:
echo %FailedExecs%
) else (
echo All executables ran successfully.
)
echo on

:: Set the final error level based on the overall build status
exit /b %OverallErrorLevel%
5 changes: 1 addition & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@ jobs:
run: .github/scripts/build_windows_executables.bat

- name: Test version output
run: |
build/bin/openfast_x64.exe -h
build/bin/TurbSim_x64.exe -h
build/bin/FAST.Farm_x64.exe -h
run: .github/scripts/test_windows_executables.bat

- name: Build MATLAB Mex File
uses: matlab-actions/run-command@v2
Expand Down
341 changes: 173 additions & 168 deletions vs-build/OpenFAST.sln

Large diffs are not rendered by default.

51 changes: 22 additions & 29 deletions vs-build/RunRegistry.bat
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,19 @@ REM ----------------------------------------------------------------------------
:NWTC_Lib
SET CURR_LOC=%NWTC_Lib_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\Registry_NWTC_Library_base.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%" -noextrap
%REGISTRY% "%CURR_LOC%\Registry_NWTC_Library_base.txt" %ALL_FAST_Includes% -O "%Output_Loc%" -noextrap
GOTO checkError

:MAP
SET CURR_LOC=%MAP_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -ccode -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
:: %REGISTRY% "%CURR_LOC%\MAP_Fortran_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%" -noextrap
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -ccode %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:MAP_Fortran
SET CURR_LOC=%MAP_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%" -noextrap
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%" -noextrap
GOTO checkError

:FAST
Expand All @@ -99,13 +98,7 @@ GOTO checkError
:BeamDyn
SET CURR_LOC=%BD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\Registry_BeamDyn.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%"
GOTO checkError

:SuperController
SET CURR_LOC=%SC_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\SuperController_Registry.txt" -I "%NWTC_Lib_Loc%" -O "%Output_Loc%" -ccode
%REGISTRY% "%CURR_LOC%\Registry_BeamDyn.txt" %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:SCDataEx:
Expand All @@ -131,96 +124,96 @@ GOTO checkError
:ServoDyn
SET CURR_LOC=%SrvD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:Lidar
:InflowWind
SET CURR_LOC=%IfW_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:IfW_FlowField
:InflowWind_IO
SET CURR_LOC=%IfW_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -noextrap -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" %ALL_FAST_Includes% -noextrap -O "%Output_Loc%"
GOTO checkError

:InflowWind_Driver
SET CURR_LOC=%IfW_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -noextrap -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" %ALL_FAST_Includes% -noextrap -O "%Output_Loc%"
GOTO checkError

:ExternalInflow
SET CURR_LOC=%ExtInfw_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%IfW_Loc%" -ccode -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" %ALL_FAST_Includes% -ccode -O "%Output_Loc%"
GOTO checkError

:ExtLoads
SET CURR_LOC=%ExtLoads_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -I "%IfW_Loc%" -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:ExtLoadsDX
SET CURR_LOC=%ExtLoads_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -ccode -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" %ALL_FAST_Includes% -ccode -O "%Output_Loc%"
GOTO checkError

:AeroDyn
:BEMT
:DBEMT
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%IfW_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:AeroDyn_Driver
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\AeroDyn_Driver_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%IfW_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%" -noextrap
%REGISTRY% "%CURR_LOC%\AeroDyn_Driver_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%" -noextrap
GOTO checkError

:ADI
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\AeroDyn_Inflow_Registry.txt" -I "%NWTC_Lib_Loc%" -I %IfW_Loc% -I "%CURR_LOC%" -O "%Output_Loc%" -noextrap
%REGISTRY% "%CURR_LOC%\AeroDyn_Inflow_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%" -noextrap
GOTO checkError


:AFI
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\AirfoilInfo_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%" -noextrap
%REGISTRY% "%CURR_LOC%\AirfoilInfo_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%" -noextrap
GOTO checkError

:UA
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\UnsteadyAero_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\UnsteadyAero_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:LinDyn
SET CURR_LOC=%LD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\LinDyn_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\LinDyn_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:FVW
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\FVW_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\FVW_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:AA
SET CURR_LOC=%AD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\AeroAcoustics_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -O "%Output_Loc%" -noextrap
%REGISTRY% "%CURR_LOC%\AeroAcoustics_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%" -noextrap
GOTO checkError

:HydroDyn
Expand All @@ -232,7 +225,7 @@ GOTO checkError
:Morison
SET CURR_LOC=%HD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -I "%SEAST_Loc%" -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:SeaState
Expand All @@ -243,7 +236,7 @@ GOTO checkError

SET CURR_LOC=%SEAST_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" -I "%NWTC_Lib_Loc%" -I "%CURR_LOC%" -noextrap -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%.txt" %ALL_FAST_Includes% -noextrap -O "%Output_Loc%"
GOTO checkError

:SubDyn
Expand All @@ -261,7 +254,7 @@ GOTO checkError
:MoorDyn
SET CURR_LOC=%MD_Loc%
SET Output_Loc=%CURR_LOC%
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%" -I "%SEAST_Loc%" -O "%Output_Loc%"
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" %ALL_FAST_Includes% -O "%Output_Loc%"
GOTO checkError

:IceFloe
Expand Down
64 changes: 0 additions & 64 deletions vs-build/SeaState_c_binding/SeaState_c_binding.sln

This file was deleted.

Loading