|
11 | 11 | types: |
12 | 12 | - released |
13 | 13 |
|
| 14 | + push: |
| 15 | + paths-ignore: |
| 16 | + - 'LICENSE' |
| 17 | + - 'README.rst' |
| 18 | + - 'docs/**' |
| 19 | + - 'share/**' |
14 | 20 |
|
15 | 21 | jobs: |
| 22 | + |
| 23 | + # Disabled as publish-to-pypi is working correctly |
16 | 24 | publish-to-pypi-test: |
17 | 25 | runs-on: ubuntu-latest |
18 | | - if: github.event_name == 'workflow_dispatch' |
| 26 | + if: false |
| 27 | + # if: github.event_name == 'workflow_dispatch' |
19 | 28 | steps: |
20 | 29 | - uses: actions/checkout@v3 |
21 | 30 |
|
|
44 | 53 |
|
45 | 54 | publish-to-pypi: |
46 | 55 | runs-on: ubuntu-latest |
47 | | - if: github.event_name == 'release' |
| 56 | + if: github.event_name == 'release' |
48 | 57 | steps: |
49 | 58 | - uses: actions/checkout@v3 |
50 | 59 |
|
|
71 | 80 | run: hatch publish |
72 | 81 | working-directory: openfast_io |
73 | 82 |
|
| 83 | + # Disabled as it fails due to huge memory requirements |
74 | 84 | docker-build-and-push: |
75 | 85 | runs-on: ubuntu-latest |
76 | | - if: github.event_name == 'release' |
| 86 | + if: false |
| 87 | + # if: github.event_name == 'release' |
77 | 88 | timeout-minutes: 500 |
78 | 89 | env: |
79 | 90 | DOCKERFILE_PATH: share/docker/Dockerfile |
@@ -123,3 +134,87 @@ jobs: |
123 | 134 | push: true |
124 | 135 | cache-from: type=gha |
125 | 136 | cache-to: type=gha,mode=max |
| 137 | + |
| 138 | + build-windows-executables: |
| 139 | + runs-on: windows-2022 |
| 140 | + if: github.event_name == 'workflow_dispatch' || github.event_name == 'release' |
| 141 | + steps: |
| 142 | + - name: Checkout |
| 143 | + uses: actions/checkout@v4 |
| 144 | + with: |
| 145 | + submodules: true |
| 146 | + fetch-depth: 0 |
| 147 | + |
| 148 | + - name: Install Intel oneAPI BaseKit (Windows) |
| 149 | + shell: cmd |
| 150 | + env: |
| 151 | + URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7dff44ba-e3af-4448-841c-0d616c8da6e7/w_BaseKit_p_2024.1.0.595_offline.exe |
| 152 | + COMPONENTS: intel.oneapi.win.mkl.devel |
| 153 | + run: | |
| 154 | + curl.exe --output %TEMP%\webimage.exe --url %URL% --retry 5 --retry-delay 5 |
| 155 | + start /b /wait %TEMP%\webimage.exe -s -x -f webimage_extracted --log extract.log |
| 156 | + del %TEMP%\webimage.exe |
| 157 | + 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=. |
| 158 | + set installer_exit_code=%ERRORLEVEL% |
| 159 | + rd /s/q "webimage_extracted" |
| 160 | + exit /b %installer_exit_code% |
| 161 | +
|
| 162 | + - name: Install Intel oneAPI HPCKit (Windows) |
| 163 | + shell: cmd |
| 164 | + env: |
| 165 | + URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95a3b26-fc45-496c-833b-df08b10297b9/w_HPCKit_p_2024.1.0.561_offline.exe |
| 166 | + COMPONENTS: intel.oneapi.win.ifort-compiler |
| 167 | + run: | |
| 168 | + curl.exe --output %TEMP%\webimage.exe --url %URL% --retry 5 --retry-delay 5 |
| 169 | + start /b /wait %TEMP%\webimage.exe -s -x -f webimage_extracted --log extract.log |
| 170 | + del %TEMP%\webimage.exe |
| 171 | + 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=. |
| 172 | + set installer_exit_code=%ERRORLEVEL% |
| 173 | + rd /s/q "webimage_extracted" |
| 174 | + exit /b %installer_exit_code% |
| 175 | +
|
| 176 | + - name: Set up MATLAB |
| 177 | + id: setup-matlab |
| 178 | + uses: matlab-actions/setup-matlab@v2 |
| 179 | + with: |
| 180 | + products: Simulink |
| 181 | + |
| 182 | + - name: Build Executables |
| 183 | + env: |
| 184 | + MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }} |
| 185 | + run: .github/scripts/build_windows_executables.bat |
| 186 | + |
| 187 | + - name: Test version output |
| 188 | + run: | |
| 189 | + build/bin/openfast_x64.exe -h |
| 190 | + build/bin/TurbSim_x64.exe -h |
| 191 | + build/bin/FAST.Farm_x64.exe -h |
| 192 | +
|
| 193 | + - name: Build MATLAB Mex File |
| 194 | + uses: matlab-actions/run-command@v2 |
| 195 | + with: |
| 196 | + command: | |
| 197 | + mexname = 'FAST_SFunc'; |
| 198 | + mex('-largeArrayDims', ... |
| 199 | + '-v', ... |
| 200 | + ['-L' fullfile('build','bin')], ... |
| 201 | + ['-I' fullfile('modules','openfast-library','src')], ... % "FAST_Library.h" |
| 202 | + ['-I' fullfile('modules','supercontroller','src')], ... % "SuperController_Types.h" |
| 203 | + ['-I' fullfile('modules','externalinflow','src')], ... % "ExternalInflow_Types.h" |
| 204 | + ['-I' fullfile('modules','extloads','src')], ... % "ExtLoadsDX_Types.h" |
| 205 | + ['-I' fullfile(matlabroot,'simulink','include')], ... |
| 206 | + ['-I' fullfile(matlabroot,'extern','include')], ... |
| 207 | + ['COMPFLAGS=$COMPFLAGS -MT -DS_FUNCTION_NAME=' mexname], ... |
| 208 | + '-lOpenFAST-Simulink_x64', ... |
| 209 | + '-outdir', fullfile('build','bin'), ... |
| 210 | + '-output', mexname, ... |
| 211 | + fullfile('glue-codes','simulink','src','FAST_SFunc.c')); |
| 212 | +
|
| 213 | + - name: Upload executables |
| 214 | + uses: actions/upload-artifact@v4 |
| 215 | + with: |
| 216 | + name: openfast-binaries |
| 217 | + path: | |
| 218 | + build/bin/*.exe |
| 219 | + build/bin/*.dll |
| 220 | + build/bin/*.mexw64 |
0 commit comments