-
Notifications
You must be signed in to change notification settings - Fork 737
311 lines (302 loc) · 10.5 KB
/
ci.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
# for github runner images, see: https://github.com/actions/runner-images?tab=readme-ov-file#available-images
name: interpret-CI
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 12 * * *"
jobs:
bld:
strategy:
matrix:
include:
- name: linux_release_64
image: ubuntu-20.04
options: "-release_64"
asm: "-asm"
artifact_name: "libebm_ubuntu_release_64"
- name: linux_debug_64
image: ubuntu-20.04
options: "-debug_64"
asm: ""
artifact_name: "libebm_ubuntu_debug_64"
- name: mac_release_64
image: macos-13 # macos-13 is an intel based mac
options: "-release_64"
asm: "-asm"
artifact_name: "libebm_mac_release_64"
- name: mac_debug_64
image: macos-13 # macos-13 is an intel based mac
options: "-debug_64"
asm: ""
artifact_name: "libebm_mac_debug_64"
- name: mac_release_arm
image: macos-14 # macos-14 is an ARM based mac
options: "-release_arm"
asm: "-asm"
artifact_name: "libebm_mac_release_arm"
- name: mac_debug_arm
image: macos-14 # macos-14 is an ARM based mac
options: "-debug_arm"
asm: ""
artifact_name: "libebm_mac_debug_arm"
- name: win_release_64
image: windows-2022
options: "-release_64"
asm: ""
artifact_name: "libebm_win_release_64"
- name: win_debug_64
image: windows-2022
options: "-debug_64"
asm: ""
artifact_name: "libebm_win_debug_64"
runs-on: ${{ matrix.image }}
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Build on Windows
if: startsWith(matrix.image, 'windows')
run: |
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
.\build.bat ${{ matrix.options }} ${{ matrix.asm }}
- name: Build on Linux
if: startsWith(matrix.image, 'ubuntu')
run: |
sudo apt --yes update
sudo apt --yes install nvidia-cuda-toolkit
/bin/sh ./build.sh ${{ matrix.options }} ${{ matrix.asm }}
- name: Build on macOS
if: startsWith(matrix.image, 'macos')
run: |
/bin/sh ./build.sh ${{ matrix.options }} ${{ matrix.asm }}
- name: Publish shared library
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: bld/lib
- name: Publish assembly
if: ${{ matrix.asm != '' }}
uses: actions/upload-artifact@v4
with:
name: asm-${{ matrix.artifact_name }}
path: bld/asm/
vis:
runs-on: ubuntu-20.04
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Build vis
run: |
cd shared/vis
npm install
npm run build-prod
- name: Publish interpret-inline.js library
uses: actions/upload-artifact@v4
with:
name: vis
path: shared/vis/dist
npm:
runs-on: ubuntu-20.04
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Build npm package
run: |
cd shared/vis
npm install
npm run build-prod
npm pack
mkdir pkg
cp *.tgz pkg/
- name: Publish npm package
uses: actions/upload-artifact@v4
with:
name: npm
path: shared/vis/pkg
R:
runs-on: ubuntu-20.04
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Build R package
run: |
cd R
sudo apt --yes update
sudo apt --yes install texlive-latex-base texlive-fonts-extra
Rscript build.R
- name: Display errors
if: failure()
run: cat bld/tmp/R/interpret.Rcheck/00install.out
- name: Publish R package
uses: actions/upload-artifact@v4
with:
name: R
path: bld/R
sdist:
runs-on: ubuntu-20.04
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Build sdist package
run: |
python -m pip install --upgrade pip setuptools wheel
cd python/interpret-core
python setup.py sdist -d ../../bld/sdist
cd ../interpret
python setup.py sdist -d ../../bld/sdist
- name: Publish sdist package
uses: actions/upload-artifact@v4
with:
name: sdist
path: bld/sdist
bdist:
runs-on: ubuntu-20.04
needs: [bld, vis]
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Download libebm artifacts
uses: actions/download-artifact@v4
with:
pattern: libebm_*
merge-multiple: true
path: python/interpret-core/interpret/root/bld/lib/
- name: Download vis artifact
uses: actions/download-artifact@v4
with:
name: vis
path: python/interpret-core/interpret/root/bld/lib/
- name: Build bdist package
run: |
python -m pip install --upgrade pip setuptools wheel
cd python/interpret-core
python setup.py bdist_wheel -d ../../bld/bdist
cd ../interpret
python setup.py bdist_wheel -d ../../bld/bdist
- name: Publish bdist package
uses: actions/upload-artifact@v4
with:
name: bdist
path: bld/bdist
testC:
needs: [bld]
strategy:
matrix:
include:
- name: linux_release_64
image: ubuntu-latest
options: "-release_64 -existing_release_64"
scheduled: "-valgrind"
artifact_name: "libebm_ubuntu_release_64"
- name: linux_debug_64
image: ubuntu-latest
options: "-debug_64 -existing_debug_64"
scheduled: "-valgrind"
artifact_name: "libebm_ubuntu_debug_64"
- name: linux_release_32
image: ubuntu-latest
options: "-release_32"
scheduled: "-valgrind"
artifact_name: ""
- name: linux_debug_32
image: ubuntu-latest
options: "-debug_32"
scheduled: "-valgrind"
artifact_name: ""
- name: mac_release_64
image: macos-latest-large
options: "-release_64 -existing_release_64"
scheduled: ""
artifact_name: "libebm_mac_release_64"
- name: mac_debug_64
image: macos-latest-large
# don't use the existing debug library since we want to rebuild with asan
options: "-debug_64 -asan"
scheduled: ""
artifact_name: ""
- name: mac_release_arm
image: macos-latest
options: "-release_arm -existing_release_arm"
scheduled: ""
artifact_name: "libebm_mac_release_arm"
- name: mac_debug_arm
image: macos-latest
# don't use the existing debug library since we want to rebuild with asan
options: "-debug_arm -asan"
scheduled: ""
artifact_name: ""
- name: win_release_64
image: windows-latest
options: "-release_64 -existing_release_64"
scheduled: "-analysis"
artifact_name: "libebm_win_release_64"
- name: win_debug_64
image: windows-latest
options: "-debug_64 -existing_debug_64"
scheduled: ""
artifact_name: "libebm_win_debug_64"
- name: win_release_32
image: windows-latest
options: "-release_32"
scheduled: "-analysis"
artifact_name: ""
- name: win_debug_32
image: windows-latest
options: "-debug_32"
scheduled: ""
artifact_name: ""
runs-on: ${{ matrix.image }}
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
# - name: Download libebm artifact
# if: ${{ matrix.artifact_name != '' }}
# uses: actions/download-artifact@v4
# with:
# name: ${{ matrix.artifact_name }}
# path: bld/lib
# - name: mac test_native
# if: ${{ startsWith(matrix.os, 'macos') }}
# run: |
# /bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }}
# - name: linux test_native (CI)
# if: ${{ startsWith(matrix.os, 'ubuntu') && github.event_name != 'schedule' }}
# run: |
# /bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }}
# - name: linux test_native (Schedule)
# if: ${{ startsWith(matrix.os, 'ubuntu') && github.event_name == 'schedule' }}
# run: |
# /bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }} ${{ matrix.scheduled }}
# - name: win test_native (CI)
# if: ${{ startsWith(matrix.os, 'windows') && github.event_name != 'schedule' }}
# run: |
# SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
# SET CudaToolkitDir=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2
# cuda_11.2.2_win10_network.exe -s nvcc_11.2 visual_studio_integration_11.2 cudart_11.2
# IF ERRORLEVEL 1 (
# ECHO cuda_11.2.2_win10_network.exe FAILED
# EXIT /B 201
# )
# .\shared\libebm\tests\libebm_test.bat ${{ matrix.options }}
# - name: win test_native (Schedule)
# if: ${{ startsWith(matrix.os, 'windows') && github.event_name == 'schedule' }}
# run: |
# SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
# SET CudaToolkitDir=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2
# cuda_11.2.2_win10_network.exe -s nvcc_11.2 visual_studio_integration_11.2 cudart_11.2
# IF ERRORLEVEL 1 (
# ECHO cuda_11.2.2_win10_network.exe FAILED
# EXIT /B 201
# )
# .\shared\libebm\tests\libebm_test.bat ${{ matrix.options }} ${{ matrix.scheduled }}