From 2eae614fe6703db47ae8dfbaa44a72e975a2bc35 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 15:06:39 +0000 Subject: [PATCH 01/34] Try building visual studio projects in github actions --- .github/workflows/deploy.yml | 40 ++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 87240dbce4..ee4b32b7be 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,15 +7,22 @@ name: deploy on: workflow_dispatch: - release: - types: - - released + # release: + # types: + # - released + push: + paths-ignore: + - 'LICENSE' + - 'README.rst' + - 'docs/**' + - 'share/**' jobs: 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 @@ -44,7 +51,8 @@ jobs: publish-to-pypi: runs-on: ubuntu-latest - if: github.event_name == 'release' + if: false + # if: github.event_name == 'release' steps: - uses: actions/checkout@v3 @@ -73,7 +81,8 @@ jobs: 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 @@ -123,3 +132,22 @@ jobs: push: true cache-from: type=gha cache-to: type=gha,mode=max + + build-windows-executables: + runs-on: windows-2019 + timeout-minutes: 500 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Fortran Compiler + uses: fortran-lang/setup-fortran@v1 + with: + compiler: intel-classic + version: '2021.12' + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Build OpenFAST_x64 + run: msbuild vs-build/FAST/FAST.sln From e91ef3c99da94468c00b208edad0c6f7f134dce0 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 15:23:33 +0000 Subject: [PATCH 02/34] Trying to build Windows OpenFAST in github actions --- .github/workflows/deploy.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ee4b32b7be..fc6e81b48e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -146,8 +146,5 @@ jobs: compiler: intel-classic version: '2021.12' - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v2 - - name: Build OpenFAST_x64 - run: msbuild vs-build/FAST/FAST.sln + run: devenv vs-build/FAST/FAST.sln /Build Release|x64 From 7b05add9c53a41128cc2dba934303cc894bad0bf Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 15:30:35 +0000 Subject: [PATCH 03/34] Put quotes around build configuration --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fc6e81b48e..9bd46c3649 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -147,4 +147,4 @@ jobs: version: '2021.12' - name: Build OpenFAST_x64 - run: devenv vs-build/FAST/FAST.sln /Build Release|x64 + run: devenv vs-build/FAST/FAST.sln /Build "Release|x64" From 4e770b92563bf2c25ef04efe4455480031bd3b65 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 15:48:37 +0000 Subject: [PATCH 04/34] Specify project and add other executables/upload --- .github/workflows/deploy.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9bd46c3649..3ee92359b1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -147,4 +147,27 @@ jobs: version: '2021.12' - name: Build OpenFAST_x64 - run: devenv vs-build/FAST/FAST.sln /Build "Release|x64" + run: devenv vs-build/FAST/FAST.sln /Build "Release|x64" /Project FAST + + - name: Build AeroDyn_Driver + run: | + devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release|x64" /Project AeroDyn_Driver + devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release_OpenMP|x64" /Project AeroDyn_Driver + + - name: Build AeroDyn_Inflow_c_binding + run: | + devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release|x64" /Project AeroDyn_Inflow_c_binding + devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release_OpenMP|x64" /Project AeroDyn_Inflow_c_binding + + - name: Build Turbsim + run: | + devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release|x64" /Project AeroDyn_Inflow_c_binding + devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release_OpenMP|x64" /Project AeroDyn_Inflow_c_binding + + - name: Upload executables + uses: actions/upload-artifact@v4 + with: + path: | + build/bin/*.exe + build/bin/*.dll + build/bin/*.mexw64 \ No newline at end of file From ebc6890934c5b06187cb788fdbebf5d31c7307d3 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 16:05:15 +0000 Subject: [PATCH 05/34] Remove /Project specification --- .github/workflows/deploy.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3ee92359b1..99918e58b3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -147,22 +147,26 @@ jobs: version: '2021.12' - name: Build OpenFAST_x64 - run: devenv vs-build/FAST/FAST.sln /Build "Release|x64" /Project FAST + run: devenv vs-build/FAST/FAST.sln /Build "Release|x64" - name: Build AeroDyn_Driver run: | - devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release|x64" /Project AeroDyn_Driver - devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release_OpenMP|x64" /Project AeroDyn_Driver + devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release|x64" + devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release_OpenMP|x64" - name: Build AeroDyn_Inflow_c_binding run: | - devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release|x64" /Project AeroDyn_Inflow_c_binding - devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release_OpenMP|x64" /Project AeroDyn_Inflow_c_binding + 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" + + - name: Build BeamDyn_Driver + run: vs-build/BeamDyn/BeamDyn-w-registry.sln /Build "Release|x64" + + - name: Build Controllers + run: vs-build/Discon/Discon.sln /Build "Release|x64" - name: Build Turbsim - run: | - devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release|x64" /Project AeroDyn_Inflow_c_binding - devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release_OpenMP|x64" /Project AeroDyn_Inflow_c_binding + run: devenv vs-build/TurbSim/TurbSim.vfproj /Build "Release|x64" - name: Upload executables uses: actions/upload-artifact@v4 From d4985626c0c2475df284960fb5e74b4fd3cfd0dc Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 16:52:14 +0000 Subject: [PATCH 06/34] Enable VS integration --- .github/scripts/build_windows.bat | 15 +++++++ .github/scripts/cache_exclude_windows.sh | 15 +++++++ .github/scripts/install-fortran-windows.bat | 15 +++++++ .github/workflows/deploy.yml | 44 ++++++++++----------- 4 files changed, 65 insertions(+), 24 deletions(-) create mode 100644 .github/scripts/build_windows.bat create mode 100644 .github/scripts/cache_exclude_windows.sh create mode 100644 .github/scripts/install-fortran-windows.bat diff --git a/.github/scripts/build_windows.bat b/.github/scripts/build_windows.bat new file mode 100644 index 0000000000..e26feceb9c --- /dev/null +++ b/.github/scripts/build_windows.bat @@ -0,0 +1,15 @@ +@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" + +devenv vs-build/FAST/FAST.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/TurbSim/TurbSim.vfproj /Build "Release|x64" + +exit /b %ERRORLEVEL% diff --git a/.github/scripts/cache_exclude_windows.sh b/.github/scripts/cache_exclude_windows.sh new file mode 100644 index 0000000000..ba672f29d6 --- /dev/null +++ b/.github/scripts/cache_exclude_windows.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: 2020 Intel Corporation +# +# SPDX-License-Identifier: MIT + +#shellcheck disable=SC2010 +LATEST_VERSION=$(ls -1 "C:\Program Files (x86)\Intel\oneAPI\compiler" | grep -v latest | sort | tail -1) + +rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\compiler\lib\ia32_win" +rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\bin\intel64_ia32" +rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\emu" +rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\oclfpga" +rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\ocloc" +rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\x86" diff --git a/.github/scripts/install-fortran-windows.bat b/.github/scripts/install-fortran-windows.bat new file mode 100644 index 0000000000..8212ffb7bf --- /dev/null +++ b/.github/scripts/install-fortran-windows.bat @@ -0,0 +1,15 @@ +REM SPDX-FileCopyrightText: 2022 Intel Corporation +REM +REM SPDX-License-Identifier: MIT + +set URL=%1 +set COMPONENTS=%2 + +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% diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 99918e58b3..e21e021da5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,6 +18,11 @@ on: - 'docs/**' - 'share/**' +env: + WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95a3b26-fc45-496c-833b-df08b10297b9/w_HPCKit_p_2024.1.0.561_offline.exe + WINDOWS_FORTRAN_COMPONENTS: intel.oneapi.win.ifort-compiler + CACHE_NUMBER: 5 + jobs: publish-to-pypi-test: runs-on: ubuntu-latest @@ -135,38 +140,29 @@ jobs: build-windows-executables: runs-on: windows-2019 + defaults: + run: + shell: bash timeout-minutes: 500 steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Fortran Compiler - uses: fortran-lang/setup-fortran@v1 + - name: Cache | Install + id: cache-install + uses: actions/cache@v3 with: - compiler: intel-classic - version: '2021.12' - - - name: Build OpenFAST_x64 - run: devenv vs-build/FAST/FAST.sln /Build "Release|x64" - - - name: Build AeroDyn_Driver - run: | - devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release|x64" - devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release_OpenMP|x64" - - - name: Build AeroDyn_Inflow_c_binding - run: | - 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" - - - name: Build BeamDyn_Driver - run: vs-build/BeamDyn/BeamDyn-w-registry.sln /Build "Release|x64" + path: | + C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat + C:\Program Files (x86)\Intel\oneAPI\compiler + key: install-${{ env.CACHE_NUMBER }}-${{ env.WINDOWS_HPCKIT_URL }}-${{ env.WINDOWS_FORTRAN_COMPONENTS }}-compiler-${{ hashFiles('**/.github/scripts/cache_exclude_windows.sh') }} - - name: Build Controllers - run: vs-build/Discon/Discon.sln /Build "Release|x64" + - name: Intel Fortran Install + if: steps.cache-install.outputs.cache-hit != 'true' + run: .github/scripts/install-fortran-windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_FORTRAN_COMPONENTS - - name: Build Turbsim - run: devenv vs-build/TurbSim/TurbSim.vfproj /Build "Release|x64" + - name: Build + run: .github/scripts/build_windows.bat - name: Upload executables uses: actions/upload-artifact@v4 From bbd3b7e270a01f41c58b950e3295fa43b077487f Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 17:04:57 +0000 Subject: [PATCH 07/34] Change windows version --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e21e021da5..1b77bedb4a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -139,7 +139,7 @@ jobs: cache-to: type=gha,mode=max build-windows-executables: - runs-on: windows-2019 + runs-on: windows-2022 defaults: run: shell: bash From 148dca09b3c4cafccf88a198c01cb67d8efc4525 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 18:21:54 +0000 Subject: [PATCH 08/34] Add MKL install, remove cache --- .github/scripts/cache_exclude_windows.sh | 15 ------------- ...ortran-windows.bat => install_windows.bat} | 0 .github/workflows/deploy.yml | 21 ++++++------------- 3 files changed, 6 insertions(+), 30 deletions(-) delete mode 100644 .github/scripts/cache_exclude_windows.sh rename .github/scripts/{install-fortran-windows.bat => install_windows.bat} (100%) diff --git a/.github/scripts/cache_exclude_windows.sh b/.github/scripts/cache_exclude_windows.sh deleted file mode 100644 index ba672f29d6..0000000000 --- a/.github/scripts/cache_exclude_windows.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# SPDX-FileCopyrightText: 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT - -#shellcheck disable=SC2010 -LATEST_VERSION=$(ls -1 "C:\Program Files (x86)\Intel\oneAPI\compiler" | grep -v latest | sort | tail -1) - -rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\compiler\lib\ia32_win" -rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\bin\intel64_ia32" -rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\emu" -rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\oclfpga" -rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\ocloc" -rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\x86" diff --git a/.github/scripts/install-fortran-windows.bat b/.github/scripts/install_windows.bat similarity index 100% rename from .github/scripts/install-fortran-windows.bat rename to .github/scripts/install_windows.bat diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1b77bedb4a..0cf94bc10c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,9 +19,10 @@ on: - 'share/**' env: + WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7dff44ba-e3af-4448-841c-0d616c8da6e7/w_BaseKit_p_2024.1.0.595_offline.exe WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95a3b26-fc45-496c-833b-df08b10297b9/w_HPCKit_p_2024.1.0.561_offline.exe WINDOWS_FORTRAN_COMPONENTS: intel.oneapi.win.ifort-compiler - CACHE_NUMBER: 5 + WINDOWS_MKL_COMPONENTS: intel.oneapi.win.mkl.devel jobs: publish-to-pypi-test: @@ -140,26 +141,16 @@ jobs: build-windows-executables: runs-on: windows-2022 - defaults: - run: - shell: bash timeout-minutes: 500 steps: - name: Checkout uses: actions/checkout@v4 - - name: Cache | Install - id: cache-install - uses: actions/cache@v3 - with: - path: | - C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat - C:\Program Files (x86)\Intel\oneAPI\compiler - key: install-${{ env.CACHE_NUMBER }}-${{ env.WINDOWS_HPCKIT_URL }}-${{ env.WINDOWS_FORTRAN_COMPONENTS }}-compiler-${{ hashFiles('**/.github/scripts/cache_exclude_windows.sh') }} + - name: Install Intel Fortran + run: .github/scripts/install_windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_FORTRAN_COMPONENTS - - name: Intel Fortran Install - if: steps.cache-install.outputs.cache-hit != 'true' - run: .github/scripts/install-fortran-windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_FORTRAN_COMPONENTS + - name: Install Intel MKL + run: .github/scripts/install_windows.bat $WINDOWS_BASEKIT_URL $WINDOWS_MKL_COMPONENTS - name: Build run: .github/scripts/build_windows.bat From eba0476afd80cbab5dbb456ccdfd64ab8ad76c9b Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 18:34:26 +0000 Subject: [PATCH 09/34] Fix environment variable handling --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0cf94bc10c..f247b5811b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -147,10 +147,10 @@ jobs: uses: actions/checkout@v4 - name: Install Intel Fortran - run: .github/scripts/install_windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_FORTRAN_COMPONENTS + run: .github/scripts/install_windows.bat ${{ env.WINDOWS_HPCKIT_URL }} ${{ env.WINDOWS_FORTRAN_COMPONENTS }} - name: Install Intel MKL - run: .github/scripts/install_windows.bat $WINDOWS_BASEKIT_URL $WINDOWS_MKL_COMPONENTS + run: .github/scripts/install_windows.bat ${{ env.WINDOWS_BASEKIT_URL }} ${{ env.WINDOWS_MKL_COMPONENTS }} - name: Build run: .github/scripts/build_windows.bat From f97f963c11b10db9cbf4290cb1ea2faf46e79998 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 21:06:38 +0000 Subject: [PATCH 10/34] Add all binaries and matlab --- .github/scripts/build_windows.bat | 16 +++++++++++++++- .github/workflows/deploy.yml | 14 ++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/scripts/build_windows.bat b/.github/scripts/build_windows.bat index e26feceb9c..ee0ba4036e 100644 --- a/.github/scripts/build_windows.bat +++ b/.github/scripts/build_windows.bat @@ -3,13 +3,27 @@ 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" -devenv vs-build/FAST/FAST.sln /Build "Release|x64" +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_OpenMP|x64" +devenv vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj /Build "Release_Matlab|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" exit /b %ERRORLEVEL% diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f247b5811b..f4d3bbdbc0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -141,10 +141,11 @@ jobs: build-windows-executables: runs-on: windows-2022 - timeout-minutes: 500 steps: - name: Checkout uses: actions/checkout@v4 + with: + submodules: recursive - name: Install Intel Fortran run: .github/scripts/install_windows.bat ${{ env.WINDOWS_HPCKIT_URL }} ${{ env.WINDOWS_FORTRAN_COMPONENTS }} @@ -152,12 +153,21 @@ jobs: - name: Install Intel MKL run: .github/scripts/install_windows.bat ${{ env.WINDOWS_BASEKIT_URL }} ${{ env.WINDOWS_MKL_COMPONENTS }} - - name: Build + - name: Set up MATLAB + uses: matlab-actions/setup-matlab@v2 + + - name: Build Executables run: .github/scripts/build_windows.bat + - name: Run script + uses: matlab-actions/run-command@v2 + with: + command: glue-codes/simulink/src/create_FAST_SFunc.m + - name: Upload executables uses: actions/upload-artifact@v4 with: + name: openfast-binaries path: | build/bin/*.exe build/bin/*.dll From 5f27cf6822a747fdbbdb5f87341d2f392c6daa53 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Tue, 11 Feb 2025 23:35:28 +0000 Subject: [PATCH 11/34] Attempt to fix matlab build --- .github/scripts/build_windows.bat | 45 ++++++++++++----------- .github/workflows/deploy.yml | 61 ++++++++++++++++++++++++------- 2 files changed, 72 insertions(+), 34 deletions(-) diff --git a/.github/scripts/build_windows.bat b/.github/scripts/build_windows.bat index ee0ba4036e..f4bc29c759 100644 --- a/.github/scripts/build_windows.bat +++ b/.github/scripts/build_windows.bat @@ -3,27 +3,30 @@ 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" -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_OpenMP|x64" +echo on + +@REM devenv vs-build/AeroDisk/AeroDisk_Driver.sln /Build "Release|x64" +@REM devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release|x64" +@REM devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release_OpenMP|x64" +@REM devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release|x64" +@REM devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release_OpenMP|x64" +@REM devenv vs-build/BeamDyn/BeamDyn-w-registry.sln /Build "Release|x64" +@REM devenv vs-build/Discon/Discon.sln /Build "Release|x64" +@REM devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release|x64" +@REM devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release_OpenMP|x64" +@REM devenv vs-build/HydroDyn/HydroDynDriver.sln /Build "Release|x64" +@REM devenv vs-build/HydroDyn_c_binding/HydroDyn_c_binding.sln /Build "Release|x64" +@REM devenv vs-build/InflowWind_c_binding/InflowWind_c_binding.sln /Build "Release|x64" +@REM devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release|x64" +@REM devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release_OpenMP|x64" +@REM devenv vs-build/MoorDyn/MoorDynDriver.sln /Build "Release|x64" +@REM devenv vs-build/MoorDyn_c_binding/MoorDyn_c_binding.sln /Build "Release|x64" +powershell -Command "(Get-Content -Path 'vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj') -replace 'C:\Program Files\MATLAB\R2019b', $env:MATLAB_ROOT | Set-Content -Path 'vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj'" devenv vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj /Build "Release_Matlab|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" +@REM devenv vs-build/FAST/FAST.sln /Build "Release|x64" +@REM devenv vs-build/SeaState/SeaStateDriver.sln /Build "Release|x64" +@REM devenv vs-build/SimpleElastoDyn/SimpleElastoDyn_Driver.sln /Build "Release|x64" +@REM devenv vs-build/SubDyn/SubDyn.sln /Build "Release|x64" +@REM devenv vs-build/TurbSim/TurbSim.vfproj /Build "Release|x64" exit /b %ERRORLEVEL% diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f4d3bbdbc0..64cbbe0a46 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,12 +18,6 @@ on: - 'docs/**' - 'share/**' -env: - WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7dff44ba-e3af-4448-841c-0d616c8da6e7/w_BaseKit_p_2024.1.0.595_offline.exe - WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95a3b26-fc45-496c-833b-df08b10297b9/w_HPCKit_p_2024.1.0.561_offline.exe - WINDOWS_FORTRAN_COMPONENTS: intel.oneapi.win.ifort-compiler - WINDOWS_MKL_COMPONENTS: intel.oneapi.win.mkl.devel - jobs: publish-to-pypi-test: runs-on: ubuntu-latest @@ -147,22 +141,63 @@ jobs: with: submodules: recursive - - name: Install Intel Fortran - run: .github/scripts/install_windows.bat ${{ env.WINDOWS_HPCKIT_URL }} ${{ env.WINDOWS_FORTRAN_COMPONENTS }} - - - name: Install Intel MKL - run: .github/scripts/install_windows.bat ${{ env.WINDOWS_BASEKIT_URL }} ${{ env.WINDOWS_MKL_COMPONENTS }} + - name: Install Intel oneAPI BaseKit (Windows) + 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% + shell: cmd + + - name: Install Intel oneAPI HPCKit (Windows) + 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% + shell: cmd - name: Set up MATLAB + id: setup-matlab uses: matlab-actions/setup-matlab@v2 + - name: Print MATLAB root folder directly + run: echo ${{ steps.setup-matlab.outputs.matlabroot }} + - name: Build Executables + env: + MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }} run: .github/scripts/build_windows.bat - - name: Run script + - name: Build MATLAB Mex File uses: matlab-actions/run-command@v2 with: - command: glue-codes/simulink/src/create_FAST_SFunc.m + command: | + mexname = 'FAST_SFunc'; + outDir = 'build/bin'; + mex('-largeArrayDims', '-v', + '-Lbuild/bin, ... + '-lOpenFAST-Simulink_x64', ... + '-Imodules/openfast-library/src', ... % "FAST_Library.h" + '-Imodules/supercontroller/src', ... % "SuperController_Types.h" + '-Imodules/externalinflow/src', ... % "ExternalInflow_Types.h" + '-Imodules/extloads/src', ... % "ExtLoadsDX_Types.h" + '-outdir', outDir, ... + ['COMPFLAGS=$COMPFLAGS -MT -DS_FUNCTION_NAME=' mexname], ... + '-output', mexname, ... + 'FAST_SFunc.c'); - name: Upload executables uses: actions/upload-artifact@v4 From 8ad3e0c8c1db425a9e0321e5df161840ed193ec8 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Wed, 12 Feb 2025 00:16:44 +0000 Subject: [PATCH 12/34] Trying to get matlab to build --- .github/scripts/build_windows.bat | 4 ++-- .github/scripts/install_windows.bat | 15 --------------- 2 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 .github/scripts/install_windows.bat diff --git a/.github/scripts/build_windows.bat b/.github/scripts/build_windows.bat index f4bc29c759..de1ccaedb6 100644 --- a/.github/scripts/build_windows.bat +++ b/.github/scripts/build_windows.bat @@ -21,9 +21,9 @@ echo on @REM devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release_OpenMP|x64" @REM devenv vs-build/MoorDyn/MoorDynDriver.sln /Build "Release|x64" @REM devenv vs-build/MoorDyn_c_binding/MoorDyn_c_binding.sln /Build "Release|x64" -powershell -Command "(Get-Content -Path 'vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj') -replace 'C:\Program Files\MATLAB\R2019b', $env:MATLAB_ROOT | Set-Content -Path 'vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj'" -devenv vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj /Build "Release_Matlab|x64" +powershell -Command "(Get-Content -Path 'vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj') -replace 'C:\\Program Files\\MATLAB\\R2019b', $env:MATLAB_ROOT | Set-Content -Path 'vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj'" @REM devenv vs-build/FAST/FAST.sln /Build "Release|x64" +devenv vs-build/FAST/FAST.sln /Build "Release_Matlab|x64" @REM devenv vs-build/SeaState/SeaStateDriver.sln /Build "Release|x64" @REM devenv vs-build/SimpleElastoDyn/SimpleElastoDyn_Driver.sln /Build "Release|x64" @REM devenv vs-build/SubDyn/SubDyn.sln /Build "Release|x64" diff --git a/.github/scripts/install_windows.bat b/.github/scripts/install_windows.bat deleted file mode 100644 index 8212ffb7bf..0000000000 --- a/.github/scripts/install_windows.bat +++ /dev/null @@ -1,15 +0,0 @@ -REM SPDX-FileCopyrightText: 2022 Intel Corporation -REM -REM SPDX-License-Identifier: MIT - -set URL=%1 -set COMPONENTS=%2 - -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% From f13442c19e82ba91f1dfb2024727042d5b3f6cb9 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Wed, 12 Feb 2025 02:48:24 +0000 Subject: [PATCH 13/34] Fix matlab build --- .github/workflows/deploy.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 64cbbe0a46..905901493c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -173,9 +173,6 @@ jobs: id: setup-matlab uses: matlab-actions/setup-matlab@v2 - - name: Print MATLAB root folder directly - run: echo ${{ steps.setup-matlab.outputs.matlabroot }} - - name: Build Executables env: MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }} @@ -187,13 +184,14 @@ jobs: command: | mexname = 'FAST_SFunc'; outDir = 'build/bin'; - mex('-largeArrayDims', '-v', + mex('-largeArrayDims', ... + '-v', ... '-Lbuild/bin, ... '-lOpenFAST-Simulink_x64', ... '-Imodules/openfast-library/src', ... % "FAST_Library.h" - '-Imodules/supercontroller/src', ... % "SuperController_Types.h" - '-Imodules/externalinflow/src', ... % "ExternalInflow_Types.h" - '-Imodules/extloads/src', ... % "ExtLoadsDX_Types.h" + '-Imodules/supercontroller/src', ... % "SuperController_Types.h" + '-Imodules/externalinflow/src', ... % "ExternalInflow_Types.h" + '-Imodules/extloads/src', ... % "ExtLoadsDX_Types.h" '-outdir', outDir, ... ['COMPFLAGS=$COMPFLAGS -MT -DS_FUNCTION_NAME=' mexname], ... '-output', mexname, ... From 464d15b76eec2c39727d4f96a10e175f894a939a Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Wed, 12 Feb 2025 03:47:13 +0000 Subject: [PATCH 14/34] Fix matlab script --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 905901493c..57b9ae0269 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -186,7 +186,7 @@ jobs: outDir = 'build/bin'; mex('-largeArrayDims', ... '-v', ... - '-Lbuild/bin, ... + '-Lbuild/bin', ... '-lOpenFAST-Simulink_x64', ... '-Imodules/openfast-library/src', ... % "FAST_Library.h" '-Imodules/supercontroller/src', ... % "SuperController_Types.h" From 919ba2861621c4b7271cebd1336524504f298792 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Wed, 12 Feb 2025 00:04:39 -0500 Subject: [PATCH 15/34] Update deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 57b9ae0269..4ca7af1422 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -195,7 +195,7 @@ jobs: '-outdir', outDir, ... ['COMPFLAGS=$COMPFLAGS -MT -DS_FUNCTION_NAME=' mexname], ... '-output', mexname, ... - 'FAST_SFunc.c'); + 'glue-codes/simulink/src/FAST_SFunc.c'); - name: Upload executables uses: actions/upload-artifact@v4 From b588f4f3e6fc980e17cc1ae1b01c18e9b92a361d Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Wed, 12 Feb 2025 09:05:19 -0500 Subject: [PATCH 16/34] Update deploy.yml --- .github/workflows/deploy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4ca7af1422..d04133cc01 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -192,8 +192,10 @@ jobs: '-Imodules/supercontroller/src', ... % "SuperController_Types.h" '-Imodules/externalinflow/src', ... % "ExternalInflow_Types.h" '-Imodules/extloads/src', ... % "ExtLoadsDX_Types.h" - '-outdir', outDir, ... + ['-I' fullfile(matlabroot,'simulink','include')], ... + ['-I' fullfile(matlabroot,'extern','include')], ... ['COMPFLAGS=$COMPFLAGS -MT -DS_FUNCTION_NAME=' mexname], ... + '-outdir', outDir, ... '-output', mexname, ... 'glue-codes/simulink/src/FAST_SFunc.c'); @@ -204,4 +206,4 @@ jobs: path: | build/bin/*.exe build/bin/*.dll - build/bin/*.mexw64 \ No newline at end of file + build/bin/*.mexw64 From ff3fac0b05e648d35d8d479ca50dd8237ae3da1f Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Wed, 12 Feb 2025 17:54:25 +0000 Subject: [PATCH 17/34] Use MATLAB_ROOT in OpenFAST-Simulink.vfproj --- .github/scripts/build_windows.bat | 43 +++++++++---------- .github/workflows/deploy.yml | 23 +++++----- .../OpenFAST-Simulink.vfproj | 4 +- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/scripts/build_windows.bat b/.github/scripts/build_windows.bat index de1ccaedb6..e8e0ff1788 100644 --- a/.github/scripts/build_windows.bat +++ b/.github/scripts/build_windows.bat @@ -5,28 +5,27 @@ for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\ echo on -@REM devenv vs-build/AeroDisk/AeroDisk_Driver.sln /Build "Release|x64" -@REM devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release|x64" -@REM devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release_OpenMP|x64" -@REM devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release|x64" -@REM devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release_OpenMP|x64" -@REM devenv vs-build/BeamDyn/BeamDyn-w-registry.sln /Build "Release|x64" -@REM devenv vs-build/Discon/Discon.sln /Build "Release|x64" -@REM devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release|x64" -@REM devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release_OpenMP|x64" -@REM devenv vs-build/HydroDyn/HydroDynDriver.sln /Build "Release|x64" -@REM devenv vs-build/HydroDyn_c_binding/HydroDyn_c_binding.sln /Build "Release|x64" -@REM devenv vs-build/InflowWind_c_binding/InflowWind_c_binding.sln /Build "Release|x64" -@REM devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release|x64" -@REM devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release_OpenMP|x64" -@REM devenv vs-build/MoorDyn/MoorDynDriver.sln /Build "Release|x64" -@REM devenv vs-build/MoorDyn_c_binding/MoorDyn_c_binding.sln /Build "Release|x64" -powershell -Command "(Get-Content -Path 'vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj') -replace 'C:\\Program Files\\MATLAB\\R2019b', $env:MATLAB_ROOT | Set-Content -Path 'vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj'" -@REM devenv vs-build/FAST/FAST.sln /Build "Release|x64" +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/FAST/FAST.sln /Build "Release_Matlab|x64" -@REM devenv vs-build/SeaState/SeaStateDriver.sln /Build "Release|x64" -@REM devenv vs-build/SimpleElastoDyn/SimpleElastoDyn_Driver.sln /Build "Release|x64" -@REM devenv vs-build/SubDyn/SubDyn.sln /Build "Release|x64" -@REM devenv vs-build/TurbSim/TurbSim.vfproj /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" exit /b %ERRORLEVEL% diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d04133cc01..7680844e8e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -142,6 +142,7 @@ jobs: submodules: recursive - 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 @@ -153,9 +154,9 @@ jobs: set installer_exit_code=%ERRORLEVEL% rd /s/q "webimage_extracted" exit /b %installer_exit_code% - shell: cmd - 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 @@ -167,11 +168,12 @@ jobs: set installer_exit_code=%ERRORLEVEL% rd /s/q "webimage_extracted" exit /b %installer_exit_code% - shell: cmd - name: Set up MATLAB id: setup-matlab uses: matlab-actions/setup-matlab@v2 + with: + products: Simulink - name: Build Executables env: @@ -183,21 +185,20 @@ jobs: with: command: | mexname = 'FAST_SFunc'; - outDir = 'build/bin'; mex('-largeArrayDims', ... '-v', ... - '-Lbuild/bin', ... - '-lOpenFAST-Simulink_x64', ... - '-Imodules/openfast-library/src', ... % "FAST_Library.h" - '-Imodules/supercontroller/src', ... % "SuperController_Types.h" - '-Imodules/externalinflow/src', ... % "ExternalInflow_Types.h" - '-Imodules/extloads/src', ... % "ExtLoadsDX_Types.h" + ['-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], ... - '-outdir', outDir, ... + '-lOpenFAST-Simulink_x64', ... + '-outdir', fullfile('build','bin'), ... '-output', mexname, ... - 'glue-codes/simulink/src/FAST_SFunc.c'); + fullfile('glue-codes','simulink','src','FAST_SFunc.c'')); - name: Upload executables uses: actions/upload-artifact@v4 diff --git a/vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj b/vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj index 1b7110e1d7..655b2435a6 100644 --- a/vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj +++ b/vs-build/OpenFAST-Simulink/OpenFAST-Simulink.vfproj @@ -16,7 +16,7 @@ - + @@ -36,7 +36,7 @@ - + From 2fb9dfbdd0386495d0e9529202985919dd11362d Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Wed, 12 Feb 2025 19:36:54 +0000 Subject: [PATCH 18/34] Fix type of matlab script --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7680844e8e..f6149bc390 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -198,7 +198,7 @@ jobs: '-lOpenFAST-Simulink_x64', ... '-outdir', fullfile('build','bin'), ... '-output', mexname, ... - fullfile('glue-codes','simulink','src','FAST_SFunc.c'')); + fullfile('glue-codes','simulink','src','FAST_SFunc.c')); - name: Upload executables uses: actions/upload-artifact@v4 From 87723a551db08399c18e57e0fcffec70224dc6fd Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Wed, 12 Feb 2025 21:45:57 +0000 Subject: [PATCH 19/34] Add unsteadyaero driver and controllers --- .../{build_windows.bat => build_windows_executables.bat} | 1 + .github/workflows/deploy.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) rename .github/scripts/{build_windows.bat => build_windows_executables.bat} (96%) diff --git a/.github/scripts/build_windows.bat b/.github/scripts/build_windows_executables.bat similarity index 96% rename from .github/scripts/build_windows.bat rename to .github/scripts/build_windows_executables.bat index e8e0ff1788..067e6c9b5d 100644 --- a/.github/scripts/build_windows.bat +++ b/.github/scripts/build_windows_executables.bat @@ -27,5 +27,6 @@ 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" exit /b %ERRORLEVEL% diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f6149bc390..b00b6ff947 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -178,7 +178,7 @@ jobs: - name: Build Executables env: MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }} - run: .github/scripts/build_windows.bat + run: .github/scripts/build_windows_executables.bat - name: Build MATLAB Mex File uses: matlab-actions/run-command@v2 @@ -208,3 +208,4 @@ jobs: build/bin/*.exe build/bin/*.dll build/bin/*.mexw64 + reg_tests/r-test/glue-codes/openfast/5MW_Baseline/ServoData/*.dll From 180e1534e6bfa0d96756e374ddcab13eb4049ebf Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Wed, 12 Feb 2025 23:50:05 +0000 Subject: [PATCH 20/34] Copy controllers to bin directory --- .github/scripts/build_windows_executables.bat | 4 ++++ .github/workflows/deploy.yml | 15 +++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/scripts/build_windows_executables.bat b/.github/scripts/build_windows_executables.bat index 067e6c9b5d..0d4733b1f0 100644 --- a/.github/scripts/build_windows_executables.bat +++ b/.github/scripts/build_windows_executables.bat @@ -5,6 +5,7 @@ for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\ 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" @@ -29,4 +30,7 @@ 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 Copy controllers to bin directory +xcopy .\reg_tests\r-test\glue-codes\openfast\5MW_Baseline\ServoData\*.dll .\build\bin\ /y + exit /b %ERRORLEVEL% diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b00b6ff947..5ba04b952a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,9 +7,9 @@ name: deploy on: workflow_dispatch: - # release: - # types: - # - released + release: + types: + - released push: paths-ignore: @@ -21,8 +21,7 @@ on: jobs: publish-to-pypi-test: runs-on: ubuntu-latest - if: false - # if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' steps: - uses: actions/checkout@v3 @@ -51,8 +50,7 @@ jobs: publish-to-pypi: runs-on: ubuntu-latest - if: false - # if: github.event_name == 'release' + if: github.event_name == 'release' steps: - uses: actions/checkout@v3 @@ -79,6 +77,7 @@ 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: false @@ -135,6 +134,7 @@ jobs: build-windows-executables: runs-on: windows-2022 + if: github.event_name == 'workflow_dispatch' || github.event_name == 'release' steps: - name: Checkout uses: actions/checkout@v4 @@ -208,4 +208,3 @@ jobs: build/bin/*.exe build/bin/*.dll build/bin/*.mexw64 - reg_tests/r-test/glue-codes/openfast/5MW_Baseline/ServoData/*.dll From de0e6fe963a54516d700f2314a1376d9bfd5925f Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 00:06:17 +0000 Subject: [PATCH 21/34] Disable publish-to-pypi-test --- .github/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5ba04b952a..f256d540f5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,9 +19,12 @@ on: - '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 From 3f9d0863a781e4d465cba3d0d04da9f67f6197a3 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 15:00:16 +0000 Subject: [PATCH 22/34] Get tags and ignore vs-build and types changes for version info --- .github/scripts/build_windows_executables.bat | 5 +++++ .github/workflows/deploy.yml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/.github/scripts/build_windows_executables.bat b/.github/scripts/build_windows_executables.bat index 0d4733b1f0..29f1d74382 100644 --- a/.github/scripts/build_windows_executables.bat +++ b/.github/scripts/build_windows_executables.bat @@ -3,6 +3,11 @@ 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 git ignore changes to Types files (line endings) and +@REM vs-build directory so it doesn't append -dirty to version +ECHO *_Types.f90>>".gitignore" +ECHO vs-build>>".gitignore" + echo on @REM Build all solutions diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f256d540f5..9aef1a67fa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -144,6 +144,9 @@ jobs: with: submodules: recursive + - name: Get tags for version info + run: git fetch --tags origin + - name: Install Intel oneAPI BaseKit (Windows) shell: cmd env: From c007cc070dfd16253747f1bd20c778c665741ccc Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 17:07:57 +0000 Subject: [PATCH 23/34] Working on getting tags without errors --- .github/workflows/deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9aef1a67fa..e621adf1e5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -141,12 +141,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - submodules: recursive - name: Get tags for version info run: git fetch --tags origin + - name: Init submodules + run: git submodule init --recursive + - name: Install Intel oneAPI BaseKit (Windows) shell: cmd env: From 1f27e23bc9acc3e316db0b5af91df8bb616e8a69 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 17:11:04 +0000 Subject: [PATCH 24/34] Fix git command to init submodules --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e621adf1e5..12dd2eb2a1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -146,7 +146,7 @@ jobs: run: git fetch --tags origin - name: Init submodules - run: git submodule init --recursive + run: git submodule update --init --recursive - name: Install Intel oneAPI BaseKit (Windows) shell: cmd From 47277618fbcede38eb7cb8c4510f57eb70158e36 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 19:05:58 +0000 Subject: [PATCH 25/34] Debugging version info on CI --- .github/scripts/build_windows_executables.bat | 52 +++++++++--------- .github/workflows/deploy.yml | 55 +++++++++---------- 2 files changed, 54 insertions(+), 53 deletions(-) diff --git a/.github/scripts/build_windows_executables.bat b/.github/scripts/build_windows_executables.bat index 29f1d74382..56f575e9d3 100644 --- a/.github/scripts/build_windows_executables.bat +++ b/.github/scripts/build_windows_executables.bat @@ -5,37 +5,39 @@ for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\ @REM Make git ignore changes to Types files (line endings) and @REM vs-build directory so it doesn't append -dirty to version -ECHO *_Types.f90>>".gitignore" -ECHO vs-build>>".gitignore" +ECHO *_Types.f90>>".git/info/exclude" +ECHO vs-build>>".git/info/exclude" 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/FAST/FAST.sln /Build "Release_Matlab|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" +@REM devenv vs-build/AeroDisk/AeroDisk_Driver.sln /Build "Release|x64" +@REM devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release|x64" +@REM devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release_OpenMP|x64" +@REM devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release|x64" +@REM devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release_OpenMP|x64" +@REM devenv vs-build/BeamDyn/BeamDyn-w-registry.sln /Build "Release|x64" +@REM devenv vs-build/Discon/Discon.sln /Build "Release|x64" +@REM devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release|x64" +@REM devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release_OpenMP|x64" +@REM devenv vs-build/HydroDyn/HydroDynDriver.sln /Build "Release|x64" +@REM devenv vs-build/HydroDyn_c_binding/HydroDyn_c_binding.sln /Build "Release|x64" +@REM devenv vs-build/InflowWind_c_binding/InflowWind_c_binding.sln /Build "Release|x64" +@REM devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release|x64" +@REM devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release_OpenMP|x64" +@REM devenv vs-build/MoorDyn/MoorDynDriver.sln /Build "Release|x64" +@REM devenv vs-build/MoorDyn_c_binding/MoorDyn_c_binding.sln /Build "Release|x64" +@REM devenv vs-build/FAST/FAST.sln /Build "Release|x64" +@REM devenv vs-build/SeaState/SeaStateDriver.sln /Build "Release|x64" +@REM devenv vs-build/SimpleElastoDyn/SimpleElastoDyn_Driver.sln /Build "Release|x64" +@REM 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 devenv vs-build/UnsteadyAero/UnsteadyAero.sln /Build "Release|x64" + +@REM Build MATLAB solution last +@REM 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 +@REM xcopy .\reg_tests\r-test\glue-codes\openfast\5MW_Baseline\ServoData\*.dll .\build\bin\ /y exit /b %ERRORLEVEL% diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 12dd2eb2a1..afc6497261 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -137,13 +137,12 @@ jobs: build-windows-executables: runs-on: windows-2022 - if: github.event_name == 'workflow_dispatch' || github.event_name == 'release' + # if: github.event_name == 'workflow_dispatch' || github.event_name == 'release' steps: - name: Checkout uses: actions/checkout@v4 - - - name: Get tags for version info - run: git fetch --tags origin + with: + fetch-depth: 0 - name: Init submodules run: git submodule update --init --recursive @@ -176,36 +175,36 @@ jobs: 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: 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: 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: 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 From f3eb4f021400c226356002e0d45ae87a1c5cc06e Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 20:30:02 +0000 Subject: [PATCH 26/34] Just print out the git-version tag --- .github/workflows/deploy.yml | 57 +++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index afc6497261..68ec528a61 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -147,7 +147,11 @@ jobs: - name: Init submodules run: git submodule update --init --recursive + - name: Print git version + run: git describe --abbrev=8 --tags --dirty + - name: Install Intel oneAPI BaseKit (Windows) + if: false 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 @@ -162,6 +166,7 @@ jobs: exit /b %installer_exit_code% - name: Install Intel oneAPI HPCKit (Windows) + if: false 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 @@ -175,38 +180,42 @@ jobs: 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: Set up MATLAB + if: false + id: setup-matlab + uses: matlab-actions/setup-matlab@v2 + with: + products: Simulink - name: Build Executables + if: false env: MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }} run: .github/scripts/build_windows_executables.bat - # - 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: Build MATLAB Mex File + if: false + 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 + if: false uses: actions/upload-artifact@v4 with: name: openfast-binaries From beffeccc3dcb622505b05f1e898c750a280e4ae6 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 20:34:08 +0000 Subject: [PATCH 27/34] get tags --- .github/workflows/deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 68ec528a61..0c740f781e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -141,8 +141,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 + + - name: Get git tags + run: git fetch --tags OpenFAST - name: Init submodules run: git submodule update --init --recursive From c05b124183184f8e7fd56e2f3aabd289ab875f24 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 20:35:39 +0000 Subject: [PATCH 28/34] Update r-test pointer --- .github/workflows/deploy.yml | 2 +- reg_tests/r-test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0c740f781e..5ab9d984ff 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -143,7 +143,7 @@ jobs: uses: actions/checkout@v4 - name: Get git tags - run: git fetch --tags OpenFAST + run: git fetch --tags - name: Init submodules run: git submodule update --init --recursive diff --git a/reg_tests/r-test b/reg_tests/r-test index df9ee7dae9..54a2998d96 160000 --- a/reg_tests/r-test +++ b/reg_tests/r-test @@ -1 +1 @@ -Subproject commit df9ee7dae97c20aa9664f11dc9daafd73f12ab3a +Subproject commit 54a2998d96908461eeb554f756bfc9da69055804 From 71f258b49f46fb0065dd16373be86193fea5bdd1 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 20:38:56 +0000 Subject: [PATCH 29/34] add origin --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5ab9d984ff..19587bca82 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -143,7 +143,7 @@ jobs: uses: actions/checkout@v4 - name: Get git tags - run: git fetch --tags + run: git fetch --tags origin - name: Init submodules run: git submodule update --init --recursive From c2c5c639ecd3c26908344201f8422e70a0da6f7a Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 20:51:14 +0000 Subject: [PATCH 30/34] Just keep trying --- .github/workflows/deploy.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 19587bca82..a7f70dea47 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -141,12 +141,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - - name: Get git tags - run: git fetch --tags origin - - - name: Init submodules - run: git submodule update --init --recursive + with: + submodules: true + fetch-depth: 0 - name: Print git version run: git describe --abbrev=8 --tags --dirty From f447b6d11588aa0f0b453be0f959627f7fa31854 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 20:55:12 +0000 Subject: [PATCH 31/34] Test with actual build --- .github/workflows/deploy.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a7f70dea47..fc1346d67b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -145,11 +145,7 @@ jobs: submodules: true fetch-depth: 0 - - name: Print git version - run: git describe --abbrev=8 --tags --dirty - - name: Install Intel oneAPI BaseKit (Windows) - if: false 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 @@ -164,7 +160,6 @@ jobs: exit /b %installer_exit_code% - name: Install Intel oneAPI HPCKit (Windows) - if: false 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 @@ -186,7 +181,6 @@ jobs: products: Simulink - name: Build Executables - if: false env: MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }} run: .github/scripts/build_windows_executables.bat From 2097f2b5089e37effc5292217a5eac7b2a9afdb3 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Thu, 13 Feb 2025 22:30:07 +0000 Subject: [PATCH 32/34] Everything except matlab --- .github/scripts/build_windows_executables.bat | 44 +++++++++---------- .github/workflows/deploy.yml | 1 - 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/scripts/build_windows_executables.bat b/.github/scripts/build_windows_executables.bat index 56f575e9d3..856803e582 100644 --- a/.github/scripts/build_windows_executables.bat +++ b/.github/scripts/build_windows_executables.bat @@ -11,33 +11,33 @@ ECHO vs-build>>".git/info/exclude" echo on @REM Build all solutions -@REM devenv vs-build/AeroDisk/AeroDisk_Driver.sln /Build "Release|x64" -@REM devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release|x64" -@REM devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release_OpenMP|x64" -@REM devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release|x64" -@REM devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release_OpenMP|x64" -@REM devenv vs-build/BeamDyn/BeamDyn-w-registry.sln /Build "Release|x64" -@REM devenv vs-build/Discon/Discon.sln /Build "Release|x64" -@REM devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release|x64" -@REM devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release_OpenMP|x64" -@REM devenv vs-build/HydroDyn/HydroDynDriver.sln /Build "Release|x64" -@REM devenv vs-build/HydroDyn_c_binding/HydroDyn_c_binding.sln /Build "Release|x64" -@REM devenv vs-build/InflowWind_c_binding/InflowWind_c_binding.sln /Build "Release|x64" -@REM devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release|x64" -@REM devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release_OpenMP|x64" -@REM devenv vs-build/MoorDyn/MoorDynDriver.sln /Build "Release|x64" -@REM devenv vs-build/MoorDyn_c_binding/MoorDyn_c_binding.sln /Build "Release|x64" -@REM devenv vs-build/FAST/FAST.sln /Build "Release|x64" -@REM devenv vs-build/SeaState/SeaStateDriver.sln /Build "Release|x64" -@REM devenv vs-build/SimpleElastoDyn/SimpleElastoDyn_Driver.sln /Build "Release|x64" -@REM devenv vs-build/SubDyn/SubDyn.sln /Build "Release|x64" +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" -@REM devenv vs-build/UnsteadyAero/UnsteadyAero.sln /Build "Release|x64" +devenv vs-build/UnsteadyAero/UnsteadyAero.sln /Build "Release|x64" @REM Build MATLAB solution last @REM devenv vs-build/FAST/FAST.sln /Build "Release_Matlab|x64" @REM Copy controllers to bin directory -@REM xcopy .\reg_tests\r-test\glue-codes\openfast\5MW_Baseline\ServoData\*.dll .\build\bin\ /y +xcopy .\reg_tests\r-test\glue-codes\openfast\5MW_Baseline\ServoData\*.dll .\build\bin\ /y exit /b %ERRORLEVEL% diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fc1346d67b..5be43761c5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -207,7 +207,6 @@ jobs: fullfile('glue-codes','simulink','src','FAST_SFunc.c')); - name: Upload executables - if: false uses: actions/upload-artifact@v4 with: name: openfast-binaries From b3410475b5f71dae6c8ebc517cc911419d8b2ea4 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Fri, 14 Feb 2025 15:16:58 +0000 Subject: [PATCH 33/34] Try to remove dirty from version --- .github/scripts/build_windows_executables.bat | 9 ++++----- .github/workflows/deploy.yml | 8 ++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/scripts/build_windows_executables.bat b/.github/scripts/build_windows_executables.bat index 856803e582..70257fcb69 100644 --- a/.github/scripts/build_windows_executables.bat +++ b/.github/scripts/build_windows_executables.bat @@ -3,10 +3,9 @@ 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 git ignore changes to Types files (line endings) and -@REM vs-build directory so it doesn't append -dirty to version -ECHO *_Types.f90>>".git/info/exclude" -ECHO vs-build>>".git/info/exclude" +@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 @@ -35,7 +34,7 @@ devenv vs-build/TurbSim/TurbSim.vfproj /Build "Release|x64" devenv vs-build/UnsteadyAero/UnsteadyAero.sln /Build "Release|x64" @REM Build MATLAB solution last -@REM devenv vs-build/FAST/FAST.sln /Build "Release_Matlab|x64" +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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5be43761c5..019dfe2a85 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -174,7 +174,6 @@ jobs: exit /b %installer_exit_code% - name: Set up MATLAB - if: false id: setup-matlab uses: matlab-actions/setup-matlab@v2 with: @@ -185,8 +184,13 @@ jobs: 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 - if: false uses: matlab-actions/run-command@v2 with: command: | From a86ad216f7360acb7f0c3e419200a0829162fcc3 Mon Sep 17 00:00:00 2001 From: Derek Slaughter Date: Fri, 14 Feb 2025 16:59:58 +0000 Subject: [PATCH 34/34] Version works correctly. Make deploy.yml run on release and manual dispatch. PR is ready. --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 019dfe2a85..adf3513704 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -137,7 +137,7 @@ jobs: build-windows-executables: runs-on: windows-2022 - # if: github.event_name == 'workflow_dispatch' || github.event_name == 'release' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'release' steps: - name: Checkout uses: actions/checkout@v4