Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2eae614
Try building visual studio projects in github actions
deslaughter Feb 11, 2025
e91ef3c
Trying to build Windows OpenFAST in github actions
deslaughter Feb 11, 2025
7b05add
Put quotes around build configuration
deslaughter Feb 11, 2025
4e770b9
Specify project and add other executables/upload
deslaughter Feb 11, 2025
ebc6890
Remove /Project specification
deslaughter Feb 11, 2025
d498562
Enable VS integration
deslaughter Feb 11, 2025
bbd3b7e
Change windows version
deslaughter Feb 11, 2025
148dca0
Add MKL install, remove cache
deslaughter Feb 11, 2025
eba0476
Fix environment variable handling
deslaughter Feb 11, 2025
f97f963
Add all binaries and matlab
deslaughter Feb 11, 2025
5f27cf6
Attempt to fix matlab build
deslaughter Feb 11, 2025
8ad3e0c
Trying to get matlab to build
deslaughter Feb 12, 2025
f13442c
Fix matlab build
deslaughter Feb 12, 2025
464d15b
Fix matlab script
deslaughter Feb 12, 2025
919ba28
Update deploy.yml
deslaughter Feb 12, 2025
b588f4f
Update deploy.yml
deslaughter Feb 12, 2025
ff3fac0
Use MATLAB_ROOT in OpenFAST-Simulink.vfproj
deslaughter Feb 12, 2025
2fb9dfb
Fix type of matlab script
deslaughter Feb 12, 2025
87723a5
Add unsteadyaero driver and controllers
deslaughter Feb 12, 2025
180e153
Copy controllers to bin directory
deslaughter Feb 12, 2025
de0e6fe
Disable publish-to-pypi-test
deslaughter Feb 13, 2025
3f9d086
Get tags and ignore vs-build and types changes for version info
deslaughter Feb 13, 2025
c007cc0
Working on getting tags without errors
deslaughter Feb 13, 2025
1f27e23
Fix git command to init submodules
deslaughter Feb 13, 2025
4727761
Debugging version info on CI
deslaughter Feb 13, 2025
881846b
Merge remote-tracking branch 'upstream/main' into f/build-windows
deslaughter Feb 13, 2025
f3eb4f0
Just print out the git-version tag
deslaughter Feb 13, 2025
beffecc
get tags
deslaughter Feb 13, 2025
c05b124
Update r-test pointer
deslaughter Feb 13, 2025
71f258b
add origin
deslaughter Feb 13, 2025
c2c5c63
Just keep trying
deslaughter Feb 13, 2025
f447b6d
Test with actual build
deslaughter Feb 13, 2025
2097f2b
Everything except matlab
deslaughter Feb 13, 2025
b341047
Try to remove dirty from version
deslaughter Feb 14, 2025
a86ad21
Version works correctly. Make deploy.yml run on release and manual di…
deslaughter Feb 14, 2025
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
42 changes: 42 additions & 0 deletions .github/scripts/build_windows_executables.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" %VS_VER%

for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f"
@call "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat"

@REM Make the script that generates the git version description ignore dirty
@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
devenv vs-build/AeroDisk/AeroDisk_Driver.sln /Build "Release|x64"
devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release|x64"
devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release_OpenMP|x64"
devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release|x64"
devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release_OpenMP|x64"
devenv vs-build/BeamDyn/BeamDyn-w-registry.sln /Build "Release|x64"
devenv vs-build/Discon/Discon.sln /Build "Release|x64"
devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release|x64"
devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release_OpenMP|x64"
devenv vs-build/HydroDyn/HydroDynDriver.sln /Build "Release|x64"
devenv vs-build/HydroDyn_c_binding/HydroDyn_c_binding.sln /Build "Release|x64"
devenv vs-build/InflowWind_c_binding/InflowWind_c_binding.sln /Build "Release|x64"
devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release|x64"
devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release_OpenMP|x64"
devenv vs-build/MoorDyn/MoorDynDriver.sln /Build "Release|x64"
devenv vs-build/MoorDyn_c_binding/MoorDyn_c_binding.sln /Build "Release|x64"
devenv vs-build/FAST/FAST.sln /Build "Release|x64"
devenv vs-build/SeaState/SeaStateDriver.sln /Build "Release|x64"
devenv vs-build/SimpleElastoDyn/SimpleElastoDyn_Driver.sln /Build "Release|x64"
devenv vs-build/SubDyn/SubDyn.sln /Build "Release|x64"
devenv vs-build/TurbSim/TurbSim.vfproj /Build "Release|x64"
devenv vs-build/UnsteadyAero/UnsteadyAero.sln /Build "Release|x64"

@REM Build MATLAB solution last
devenv vs-build/FAST/FAST.sln /Build "Release_Matlab|x64"

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

exit /b %ERRORLEVEL%
101 changes: 98 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@ on:
types:
- released

push:
paths-ignore:
- 'LICENSE'
- 'README.rst'
- 'docs/**'
- 'share/**'

jobs:

# Disabled as publish-to-pypi is working correctly
publish-to-pypi-test:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
if: false
# if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -44,7 +53,7 @@ jobs:

publish-to-pypi:
runs-on: ubuntu-latest
if: github.event_name == 'release'
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v3

Expand All @@ -71,9 +80,11 @@ jobs:
run: hatch publish
working-directory: openfast_io

# Disabled as it fails due to huge memory requirements
docker-build-and-push:
runs-on: ubuntu-latest
if: github.event_name == 'release'
if: false
# if: github.event_name == 'release'
timeout-minutes: 500
env:
DOCKERFILE_PATH: share/docker/Dockerfile
Expand Down Expand Up @@ -123,3 +134,87 @@ jobs:
push: true
cache-from: type=gha
cache-to: type=gha,mode=max

build-windows-executables:
runs-on: windows-2022
if: github.event_name == 'workflow_dispatch' || github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Install Intel oneAPI BaseKit (Windows)
shell: cmd
env:
URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7dff44ba-e3af-4448-841c-0d616c8da6e7/w_BaseKit_p_2024.1.0.595_offline.exe
COMPONENTS: intel.oneapi.win.mkl.devel
run: |
curl.exe --output %TEMP%\webimage.exe --url %URL% --retry 5 --retry-delay 5
start /b /wait %TEMP%\webimage.exe -s -x -f webimage_extracted --log extract.log
del %TEMP%\webimage.exe
webimage_extracted\bootstrapper.exe -s --action install --components=%COMPONENTS% --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=1 --log-dir=.
set installer_exit_code=%ERRORLEVEL%
rd /s/q "webimage_extracted"
exit /b %installer_exit_code%

- name: Install Intel oneAPI HPCKit (Windows)
shell: cmd
env:
URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95a3b26-fc45-496c-833b-df08b10297b9/w_HPCKit_p_2024.1.0.561_offline.exe
COMPONENTS: intel.oneapi.win.ifort-compiler
run: |
curl.exe --output %TEMP%\webimage.exe --url %URL% --retry 5 --retry-delay 5
start /b /wait %TEMP%\webimage.exe -s -x -f webimage_extracted --log extract.log
del %TEMP%\webimage.exe
webimage_extracted\bootstrapper.exe -s --action install --components=%COMPONENTS% --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=1 --log-dir=.
set installer_exit_code=%ERRORLEVEL%
rd /s/q "webimage_extracted"
exit /b %installer_exit_code%

- name: Set up MATLAB
id: setup-matlab
uses: matlab-actions/setup-matlab@v2
with:
products: Simulink

- name: Build Executables
env:
MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }}
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

- name: Build MATLAB Mex File
uses: matlab-actions/run-command@v2
with:
command: |
mexname = 'FAST_SFunc';
mex('-largeArrayDims', ...
'-v', ...
['-L' fullfile('build','bin')], ...
['-I' fullfile('modules','openfast-library','src')], ... % "FAST_Library.h"
['-I' fullfile('modules','supercontroller','src')], ... % "SuperController_Types.h"
['-I' fullfile('modules','externalinflow','src')], ... % "ExternalInflow_Types.h"
['-I' fullfile('modules','extloads','src')], ... % "ExtLoadsDX_Types.h"
['-I' fullfile(matlabroot,'simulink','include')], ...
['-I' fullfile(matlabroot,'extern','include')], ...
['COMPFLAGS=$COMPFLAGS -MT -DS_FUNCTION_NAME=' mexname], ...
'-lOpenFAST-Simulink_x64', ...
'-outdir', fullfile('build','bin'), ...
'-output', mexname, ...
fullfile('glue-codes','simulink','src','FAST_SFunc.c'));

- name: Upload executables
uses: actions/upload-artifact@v4
with:
name: openfast-binaries
path: |
build/bin/*.exe
build/bin/*.dll
build/bin/*.mexw64
2 changes: 1 addition & 1 deletion reg_tests/r-test
Submodule r-test updated 0 files
4 changes: 2 additions & 2 deletions vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
<Configuration Name="Release_Matlab|Win32" OutputDirectory="..\..\build\bin\" TargetName="$(ProjectName)_$(PlatformName)" ConfigurationType="typeDynamicLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" Preprocess="preprocessYes" PreprocessorDefinitions="COMPILE_SIMULINK" StandardWarnings="standardWarningsF03" DisableSpecificDiagnostics="5268,5199"/>
<Tool Name="VFLinkerTool" SuppressStartupBanner="true" GenerateManifest="false" SubSystem="subSystemWindows" LinkDLL="true" AdditionalDependencies="&quot;C:\Program Files (x86)\MATLAB\R2018a\extern\lib\win32\microsoft\libmex.lib&quot;"/>
<Tool Name="VFLinkerTool" SuppressStartupBanner="true" GenerateManifest="false" SubSystem="subSystemWindows" LinkDLL="true" AdditionalDependencies="&quot;$(MATLAB_ROOT)\extern\lib\win32\microsoft\libmex.lib&quot;"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
Expand All @@ -36,7 +36,7 @@
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
<Configuration Name="Release_Matlab|x64" OutputDirectory="..\..\build\bin\" TargetName="$(ProjectName)_$(PlatformName)" ConfigurationType="typeDynamicLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" Preprocess="preprocessYes" PreprocessorDefinitions="COMPILE_SIMULINK" StandardWarnings="standardWarningsF03" DisableSpecificDiagnostics="5268,5199"/>
<Tool Name="VFLinkerTool" SuppressStartupBanner="true" GenerateManifest="false" SubSystem="subSystemWindows" LinkDLL="true" AdditionalDependencies="&quot;C:\Program Files\MATLAB\R2019b\extern\lib\win64\microsoft\libmex.lib&quot;"/>
<Tool Name="VFLinkerTool" SuppressStartupBanner="true" GenerateManifest="false" SubSystem="subSystemWindows" LinkDLL="true" AdditionalDependencies="&quot;$(MATLAB_ROOT)\extern\lib\win64\microsoft\libmex.lib&quot;"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
Expand Down
Loading