-
Notifications
You must be signed in to change notification settings - Fork 14
216 lines (191 loc) · 8.06 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
name: Windows
on:
# allows us to run workflows manually
workflow_dispatch:
pull_request:
branches:
- develop
paths-ignore:
- '.github/workflows/unix_linux.yml'
- '.github/workflows/unix_mac.yml'
- 'scripts/**'
- '*.md'
- 'LICENSE'
push:
branches:
- develop
paths-ignore:
- '.github/workflows/unix_linux.yml'
- '.github/workflows/unix_mac.yml'
- 'scripts/**'
- '*.md'
- 'LICENSE'
release:
types: # This configuration does not affect the page_build event above
- published
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
main:
runs-on: windows-2019
strategy:
matrix:
cubit: [17.1.0, 2021.3, 2021.4, 2021.5, 2021.11]
name: 'Cubit Svalinn Plugin ${{ matrix.cubit }} Build for Windows'
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
activate-environment: ""
- name: Environment Variables
shell: bash -l {0}
run: |
COREFORM_BASE_URL=https://f002.backblazeb2.com/file/cubit-downloads/Coreform-Cubit/Releases
CUBIT_BASE_NAME=Coreform-Cubit-${{ matrix.cubit }}
if [ "${{ matrix.cubit }}" == "17.1.0" ]; then
BASE=Trelis-17.1.0
BASESDK=Trelis-SDK-17.1.0
CUBIT_BASE_NAME=Trelis-17.1
elif [ "${{ matrix.cubit }}" == "2021.3" ]; then
BASE=Coreform-Cubit-2021.3.0
CUBIT_BASE_NAME=Coreform-Cubit-2021.3
elif [ "${{ matrix.cubit }}" == "2021.4" ]; then
BASE=Coreform-Cubit-2021.4%2B15017_05893177
elif [ "${{ matrix.cubit }}" == "2021.5" ]; then
BASE=Coreform-Cubit-2021.5%2B15962_5043ef39
elif [ "${{ matrix.cubit }}" == "2021.11" ]; then
BASE=Coreform-Cubit-2021.11%2B21637_35609873
fi
echo "COREFORM_BASE_URL=${COREFORM_BASE_URL}/Windows/" >> $GITHUB_ENV
echo "CUBIT_PKG=${BASE}-Win64.exe" >> $GITHUB_ENV
echo "CUBIT_SDK_PKG=${BASESDK}-Win64.zip" >> $GITHUB_ENV
echo "CUBIT_BASE_NAME=${CUBIT_BASE_NAME}" >> $GITHUB_ENV
echo "CURRENT=$(pwd)" >> $GITHUB_ENV
echo "SCRIPTPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "PLUGIN_ABS_PATH=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV
- name: Conda dependencies
shell: bash -l {0}
run: |
conda install curl eigen hdf5
- name: Build MOAB
shell: bash -l {0}
run: |
cd ${PLUGIN_ABS_PATH}
git clone https://bitbucket.org/fathomteam/moab -b 5.3.0 --depth 1 --shallow-submodules
mkdir moab_build moab_install
cd moab_build
cmake ../moab \
-DENABLE_BLASLAPACK=OFF \
-DENABLE_FORTRAN=OFF \
-DENABLE_IMESH=OFF \
-DENABLE_TESTING=OFF \
-DENABLE_HDF5=ON \
-DBUILD_SHARED_LIBS=ON \
-G"Visual Studio 16 2019" \
-DCMAKE_INSTALL_PREFIX=../moab_install/ \
-DHDF5_ROOT="C:/Miniconda/Library/" \
-DHDF5_hdf5_LIBRARY_RELEASE="C:/Miniconda/Library/lib/libhdf5_hl.lib;C:/Miniconda/Library/lib/libhdf5.lib;C:/Miniconda/Library/lib/zlib.lib;C:/Miniconda/Library/lib/libhdf5_cpp.lib" \
-DCMAKE_EXE_LINKER_FLAGS="" \
-DCMAKE_MODULE_LINKER_FLAGS="" \
-DCMAKE_SHARED_LINKER_FLAGS="" \
-DCMAKE_STATIC_LINKER_FLAGS="" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe" \
-DCMAKE_CXX_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe"
cmake --build . --config Release
cmake --install . --config Release
- name: build DAGMC
shell: bash -l {0}
run: |
cd ${PLUGIN_ABS_PATH}
git clone https://github.com/svalinn/DAGMC -b develop --depth 1 --shallow-submodules
mkdir dagmc_build dagmc_install
cd dagmc_build
cmake ../dagmc \
-G"Visual Studio 16 2019" \
-DBUILD_EXE=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DBUILD_TALLY=OFF \
-DBUILD_BUILD_OBB=OFF \
-DBUILD_UWUW=ON \
-DBUILD_MAKE_WATERTIGHT=ON \
-DBUILD_TESTS=OFF \
-DMOAB_DIR=../moab_install \
-DHDF5_ROOT="C:/Miniconda/Library/" \
-DHDF5_hdf5_LIBRARY_RELEASE="C:/Miniconda/Library/lib/libhdf5_hl.lib;C:/Miniconda/Library/lib/libhdf5.lib;C:/Miniconda/Library/lib/zlib.lib;C:/Miniconda/Library/lib/libhdf5_cpp.lib" \
-DCMAKE_INSTALL_PREFIX=../dagmc_install/ \
-DCMAKE_EXE_LINKER_FLAGS="" \
-DCMAKE_MODULE_LINKER_FLAGS="" \
-DCMAKE_SHARED_LINKER_FLAGS="" \
-DCMAKE_STATIC_LINKER_FLAGS="" \
-DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
cmake --install . --config Release
- name: Cubit download
shell: bash -l {0}
env:
CUBIT_DEB_URL: ${{ secrets[matrix.URL] }}
CUBIT_SDK_URL: ${{ secrets[matrix.URL_SDK] }}
run: |
cd ${PLUGIN_ABS_PATH}
mkdir Cubit
cd Cubit
curl -L ${COREFORM_BASE_URL}${CUBIT_PKG} --output ${CUBIT_PKG}
7z x ${CUBIT_PKG}
if [ "${{ matrix.cubit }}" = "17.1.0" ]; then
curl -L ${COREFORM_BASE_URL}${CUBIT_SDK_PKG} --output ${CUBIT_SDK_PKG}
7z x ${CUBIT_SDK_PKG}
cp -r Trelis*/* ./
fi
- uses: actions/checkout@v2
- name: build plugin
shell: bash -l {0}
run: |
cd ${PLUGIN_ABS_PATH}
mkdir plugin_build plugin_install
cd plugin_build
cmake ../Cubit-plugin/ \
-G"Visual Studio 16 2019" \
-DCubit_DIR="../Cubit/bin" \
-DCUBIT_ROOT="../Cubit/bin" \
-DUPDATE_SUBMODULES=ON \
-DDAGMC_DIR="../dagmc_install" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=../plugin_install \
-DHDF5_ROOT="C:/Miniconda/Library/" \
-DHDF5_hdf5_LIBRARY_RELEASE="C:/Miniconda/Library/lib/libhdf5_hl.lib;C:/Miniconda/Library/lib/libhdf5.lib;C:/Miniconda/Library/lib/zlib.lib;C:/Miniconda/Library/lib/libhdf5_cpp.lib" \
-DCMAKE_EXE_LINKER_FLAGS="" \
-DCMAKE_MODULE_LINKER_FLAGS="" \
-DCMAKE_SHARED_LINKER_FLAGS="" \
-DCMAKE_STATIC_LINKER_FLAGS=""
cmake --build . --config Release
cmake --install . --config Release
- name: prepare pkg
shell: bash
run: |
cd ${PLUGIN_ABS_PATH}
mkdir -p bin/plugins
cd bin/plugins
cp ../../moab_install/bin/MOAB.dll ./
cp ../../dagmc_install/lib/*.lib ./
cp ../../plugin_install/bin/* ./
cp ../../plugin_install/lib/* ./
cd ${PLUGIN_ABS_PATH}
7z -tzip a C:/Users/runneradmin/svalinn_plugin_windows_${{ matrix.cubit }}.zip bin\
- if: github.event_name != 'release'
name: Upload artifact for CI
uses: actions/upload-artifact@v2
with:
name: svalinn-plugin_windows_${{ matrix.cubit }}.zip
path: C:/Users/runneradmin/svalinn_plugin_windows_${{ matrix.cubit }}.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
- if: github.event_name == 'release'
name: Upload binaries into the release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: C:/Users/runneradmin/svalinn_plugin_windows_${{ matrix.cubit }}.zip
asset_name: svalinn_plugin_windows_${{ matrix.cubit }}.zip
tag: ${{ github.ref }}
overwrite: true