-
-
Notifications
You must be signed in to change notification settings - Fork 10
314 lines (314 loc) · 12.2 KB
/
master-all.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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
name: Stable
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
SP_TIME: ''
ARTIFACT: ''
jobs:
linux-master:
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
matrix:
avx: [ ON, OFF ]
vtk: [ ON, OFF ]
mkl: [ ON, OFF ]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Golang
uses: actions/setup-go@v5
with:
cache: false
- name: Prepare
run: |
echo "SP_TIME=daily-$(date +''%y%m%d'')" >> $GITHUB_ENV
- name: VTK
if: matrix.vtk == 'ON'
run: |
wget -q https://github.com/TLCFEM/prebuilds/releases/download/latest/VTK-9.2.6-linux.tar.gz
tar xf VTK-9.2.6-linux.tar.gz
- name: MKL
if: matrix.mkl == 'ON'
run: |
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update && sudo apt-get install intel-oneapi-mkl-devel
- name: Dependency
run: |
sudo apt-get update && sudo apt-get install mesa-common-dev mesa-utils freeglut3-dev libglvnd-dev dpkg-dev xz-utils
- name: Compile
run: |
go build Checker/updater.go
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX2=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/home/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DLINK_DYNAMIC_MKL=OFF -DUSE_INTEL_OPENMP=OFF -DCMAKE_INSTALL_PREFIX=dist ..
make install -j"$(nproc)" && make package
- name: Pack
run: |
cp updater build/dist/bin
file_name="suanPan-linux"
if [ "${{ matrix.mkl }}" == "ON" ]; then
file_name+="-mkl"
else
file_name+="-openblas"
fi
if [ "${{ matrix.vtk }}" == "ON" ]; then
file_name+="-vtk"
fi
if [ "${{ matrix.avx }}" == "OFF" ]; then
file_name+="-no-avx"
fi
file_name+=".tar.gz"
echo "ARTIFACT=$file_name" >> "$GITHUB_ENV"
tar czf $file_name -C build/dist .
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.ARTIFACT }}
asset_name: ${{ env.ARTIFACT }}
tag: ${{ env.SP_TIME }}
prerelease: true
overwrite: true
body: |
This release is automatically generated by CI/CD pipelines.
macos-master:
runs-on: macos-13
timeout-minutes: 100
strategy:
matrix:
vtk: [ ON, OFF ]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Prepare
run: |
echo "SP_TIME=daily-$(date +''%y%m%d'')" >> $GITHUB_ENV
- name: VTK
if: matrix.vtk == 'ON'
run: |
wget -q https://github.com/TLCFEM/prebuilds/releases/download/latest/VTK-9.2.6-macos.tar.gz
tar xf VTK-9.2.6-macos.tar.gz
brew install glfw glew
- name: Compile
run: |
brew install go libomp
go build Checker/updater.go
mkdir build && cd build
export CC=$(brew --prefix llvm@15)/bin/clang
export CXX=$(brew --prefix llvm@15)/bin/clang++
export FC=gfortran-12
cmake -DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_Fortran_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_BUILD_TYPE=Release -DUSE_VTK=${{ matrix.vtk }} -DBUILD_MULTITHREAD=ON -DVTK_DIR=/Users/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
make install -j4
- name: Pack
run: |
cp updater build/dist/bin
file_name="suanPan-macos-openblas"
if [ "${{ matrix.vtk }}" == "ON" ]; then
file_name+="-vtk"
fi
file_name+=".tar.gz"
echo "ARTIFACT=$file_name" >> "$GITHUB_ENV"
tar czf $file_name -C build/dist .
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.ARTIFACT }}
asset_name: ${{ env.ARTIFACT }}
tag: ${{ env.SP_TIME }}
prerelease: true
overwrite: true
body: |
This release is automatically generated by CI/CD pipelines.
windows-master:
runs-on: windows-2022
timeout-minutes: 120
strategy:
matrix:
avx: [ ON, OFF ]
vtk: [ ON, OFF ]
mkl: [ ON, OFF ]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Golang
uses: actions/setup-go@v5
with:
cache: false
- name: Prepare
run: |
echo ("SP_TIME=daily-"+(get-date -format "yyMMdd")) >> $env:GITHUB_ENV
- name: MKL
shell: cmd
if: matrix.mkl == 'ON'
run: |
C:/msys64/usr/bin/wget.exe -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/a665fc26-bdf1-415f-9fc4-345f257f4fb1/w_onemkl_p_2024.2.1.106_offline.exe
C:/msys64/usr/bin/wget.exe -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ea23d696-a77f-4a4a-8996-20d02cdbc48f/w_fortran-compiler_p_2024.2.1.81_offline.exe
w_onemkl_p_2024.2.1.106_offline.exe -s -a --silent --eula accept
w_fortran-compiler_p_2024.2.1.81_offline.exe -s -a --silent --eula accept
- name: VTK
if: matrix.vtk == 'ON'
run: |
C:/msys64/usr/bin/wget.exe -q https://github.com/TLCFEM/prebuilds/releases/download/latest/VTK-9.2.6-win.7z
7z x VTK-9.2.6-win.7z
- name: Compile
run: |
go build Checker/updater.go
mkdir build && cd build
if (Test-Path "C:/Program Files (x86)/Intel/oneAPI/") {
cmd.exe "/K" '"C:\Program Files (x86)\Intel\oneAPI\setvars.bat" && powershell'
}
cmake -T fortran=ifx -DCMAKE_BUILD_TYPE=Release -DUSE_AVX2=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DLINK_DYNAMIC_MKL=OFF -DMKLROOT="C:/Program Files (x86)/Intel/oneAPI/mkl/latest" -DCMAKE_INSTALL_PREFIX=dist ..
cmake --build . --target install --config Release -j 4
- name: Pack
shell: bash
run: |
cp updater.exe build/dist/bin
file_name="suanPan-win"
if [ "${{ matrix.mkl }}" == "ON" ]; then
file_name+="-mkl"
else
file_name+="-openblas"
fi
if [ "${{ matrix.vtk }}" == "ON" ]; then
file_name+="-vtk"
fi
if [ "${{ matrix.avx }}" == "OFF" ]; then
file_name+="-no-avx"
fi
if [ "${{ matrix.mkl }}" == "ON" ]; then
file_name+=".zip"
echo "ARTIFACT=$file_name" >> "$GITHUB_ENV"
cd build/dist/bin
7z a -tzip ../../../$file_name ./*
else
file_name+=".7z"
echo "ARTIFACT=$file_name" >> "$GITHUB_ENV"
cd build/dist/bin
7z a ../../../$file_name ./*
fi
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.ARTIFACT }}
asset_name: ${{ env.ARTIFACT }}
tag: ${{ env.SP_TIME }}
prerelease: true
overwrite: true
body: |
This release is automatically generated by CI/CD pipelines.
- name: CHOCO
if: matrix.mkl == 'ON' && matrix.vtk == 'ON' && matrix.avx == 'ON'
shell: bash
run: |
python Enhancement/pack.ci.py build/dist/bin
ls -halt
if [ "${{ github.event_name }}" == "push" ]; then
choco apikey --key ${{ secrets.CHOCO_KEY }} --source https://push.chocolatey.org/
choco push suanpan.3.6.0.nupkg --source https://push.chocolatey.org/
fi
- name: Release SHA256
if: matrix.mkl == 'ON' && matrix.vtk == 'ON' && matrix.avx == 'ON'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: suanPan-win-mkl-vtk.sha256
asset_name: suanPan-win-mkl-vtk.sha256
tag: ${{ env.SP_TIME }}
prerelease: true
overwrite: true
body: |
This release is automatically generated by CI/CD pipelines.
- name: Release NUPKG
if: matrix.mkl == 'ON' && matrix.vtk == 'ON' && matrix.avx == 'ON'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: suanpan.3.6.0.nupkg
asset_name: suanpan.3.6.0.nupkg
tag: ${{ env.SP_TIME }}
prerelease: true
overwrite: true
body: |
This release is automatically generated by CI/CD pipelines.
windows-gcc-master:
runs-on: windows-2022
timeout-minutes: 120
strategy:
matrix:
avx: [ ON, OFF ]
vtk: [ ON, OFF ]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Golang
uses: actions/setup-go@v5
with:
cache: false
- name: Prepare
run: |
echo ("SP_TIME=daily-"+(get-date -format "yyMMdd")) >> $env:GITHUB_ENV
C:/msys64/usr/bin/wget.exe -q https://github.com/brechtsanders/winlibs_mingw/releases/download/13.2.0posix-18.1.5-11.0.1-msvcrt-r8/winlibs-x86_64-posix-seh-gcc-13.2.0-mingw-w64msvcrt-11.0.1-r8.7z
7z x winlibs-x86_64-posix-seh-gcc-13.2.0-mingw-w64msvcrt-11.0.1-r8.7z
- name: VTK
if: matrix.vtk == 'ON'
run: |
C:/msys64/usr/bin/wget.exe -q https://github.com/TLCFEM/prebuilds/releases/download/latest/VTK-9.3.1-win-gcc.7z
7z x VTK-9.3.1-win-gcc.7z -oVTK
- name: Compile
run: |
go build Checker/updater.go
mkdir build && cd build
cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=D:/a/suanPan/suanPan/mingw64/bin/gcc.exe -DCMAKE_CXX_COMPILER=D:/a/suanPan/suanPan/mingw64/bin/g++.exe -DCMAKE_Fortran_COMPILER=D:/a/suanPan/suanPan/mingw64/bin/gfortran.exe -DCMAKE_BUILD_TYPE=Release -DUSE_AVX2=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/VTK/lib/cmake/vtk-9.3 -DCMAKE_INSTALL_PREFIX=dist ..
cmake --build . --target install --config Release -j 4
- name: Pack
shell: bash
run: |
cp updater.exe build/dist/bin
file_name="suanPan-win-gcc-openblas"
if [ "${{ matrix.vtk }}" == "ON" ]; then
file_name+="-vtk"
fi
if [ "${{ matrix.avx }}" == "OFF" ]; then
file_name+="-no-avx"
fi
file_name+=".7z"
echo "ARTIFACT=$file_name" >> "$GITHUB_ENV"
cd build/dist/bin
7z a ../../../$file_name ./*
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.ARTIFACT }}
asset_name: ${{ env.ARTIFACT }}
tag: ${{ env.SP_TIME }}
prerelease: true
overwrite: true
body: |
This release is automatically generated by CI/CD pipelines.