forked from gambit/gambit
-
Notifications
You must be signed in to change notification settings - Fork 1
324 lines (276 loc) · 11.4 KB
/
Copy pathci.yml
File metadata and controls
324 lines (276 loc) · 11.4 KB
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
315
316
317
318
319
320
321
322
323
324
name: Gambit
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
windows-mingw:
name: "windows - ${{ matrix.msystem }}"
runs-on: windows-latest
strategy:
matrix:
include:
- msystem: "MINGW64"
arch: "x86_64"
- msystem: "MINGW32"
arch: "i686"
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Checkout history and tags
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
install: "autoconf git make tar texinfo mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-make mingw-w64-${{ matrix.arch }}-libwinpthread-git tmate"
msystem: ${{ matrix.msystem }}
- name: Build
run: |
./configure --enable-c-opt=-O0 --enable-c-opt-rts=-O0 --enable-debug --enable-debug-c-backtrace --enable-multiple-threaded-vms
echo "#undef HAVE_CLOCK_GETTIME" >> include/config.h
make clean
make -j`nproc` core
# Only run tests for MinGW64 for now
- name: Test
if: ${{ matrix.msystem == 'MINGW64' }}
run: make check
- name: Build Gambit for Use
if: github.event_name == 'push'
run: |
mkdir dist
./configure --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist
echo "#undef HAVE_CLOCK_GETTIME" >> include/config.h
make clean
make -j`nproc` core
make modules
make install
- name: Upload Build Artifact
uses: actions/upload-artifact@v1
if: github.event_name == 'push'
with:
name: gambit-win-mingw-${{ matrix.arch }}
path: dist/
- name: Build Gambit for Use (--enable-multiple-threaded-vms)
if: github.event_name == 'push'
run: |
mkdir dist-mt
./configure --enable-multiple-threaded-vms --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist-mt
echo "#undef HAVE_CLOCK_GETTIME" >> include/config.h
make clean
make -j`nproc` core
make modules
make install
- name: Upload Build Artifact (--enable-multiple-threaded-vms)
uses: actions/upload-artifact@v1
if: github.event_name == 'push'
with:
name: gambit-win-mingw-${{ matrix.arch }}-mt
path: dist-mt/
- name: Debug with tmate on failure
run: |
: tmate -F -k ${{ secrets.TMATE_API_KEY }} -n ${{ secrets.TMATE_SESSION_PREFIX }}-${{ matrix.msystem }} > /dev/null 2>&1
if: failure() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
windows-msvc:
name: "windows - MSVC"
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Checkout history and tags
- name: Install MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
install: "autoconf make patch tar texinfo tmate"
path-type: inherit
msystem: MSYS
- name: Build
shell: cmd
run: |
set PATH=%RUNNER_TEMP%\msys\msys64\usr\bin;%PATH%
msys2 -c "./configure --enable-c-opt=-Od --enable-c-opt-rts=-Od --enable-debug --enable-debug-c-backtrace CC='cl' && make clean && make -j%NUMBER_OF_PROCESSORS% core"
- name: Test
shell: cmd
run: |
msys2 -c "make check"
- name: Build vstudio.bat
shell: cmd
if: github.event_name == 'push'
run: |
msys2 -c "make clean"
call misc\vstudio.bat
cd tests
..\gsc\gsc -f -warnings -c -nb-gvm-regs 5 -nb-arg-regs 3 mix.scm
echo n | comp mix.c test5.ok
- name: Build Gambit for Use
shell: cmd
if: github.event_name == 'push'
run: |
mkdir dist
msys2 -c "./configure --enable-single-host --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist CC='cl' && make clean && make -j%NUMBER_OF_PROCESSORS% core && make modules && make install"
- name: Upload Build Artifact
uses: actions/upload-artifact@v1
if: github.event_name == 'push'
with:
name: gambit-win-msvc-x86_64
path: dist/
- name: Build Gambit for Use (--enable-multiple-threaded-vms)
shell: cmd
if: github.event_name == 'push'
run: |
mkdir dist-mt
msys2 -c "./configure --enable-single-host --enable-multiple-threaded-vms --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist-mt CC='cl' && make clean && make -j%NUMBER_OF_PROCESSORS% core && make modules && make install"
- name: Upload Build Artifact (--enable-multiple-threaded-vms)
uses: actions/upload-artifact@v1
if: github.event_name == 'push'
with:
name: gambit-win-msvc-x86_64-mt
path: dist-mt/
- name: Debug with tmate on failure
run: |
msys2 -c ": tmate -F -k ${{ secrets.TMATE_API_KEY }} -n ${{ secrets.TMATE_SESSION_PREFIX }}-MSVC > /dev/null 2>&1"
if: failure() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Checkout history and tags
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install texinfo autoconf2.69
sudo ln -s -f `which autoconf2.69` `which autoconf`
- name: Build and Test with C compiler
run: |
export PROCS=`nproc`
./configure --enable-c-opt=-O0 --enable-c-opt-rts=-O0 --enable-debug --enable-debug-c-backtrace --enable-multiple-threaded-vms && make clean && make -j$PROCS core && make check
- name: Build and Test with C++ compiler
if: github.event_name == 'push'
run: |
export PROCS=`nproc`
./configure --enable-c-opt=-O0 --enable-c-opt-rts=-O0 --enable-debug --enable-debug-c-backtrace --enable-multiple-threaded-vms --enable-cplusplus && make clean && make -j$PROCS core && make check
- name: Build and Test with C compiler and --enable-ansi-c
if: github.event_name == 'push'
run: |
export PROCS=`nproc`
./configure --enable-c-opt=-O0 --enable-c-opt-rts=-O0 --enable-ansi-c && make clean && make -j$PROCS core && (cd tests; make test1) && (cd tests; make test2) && (cd tests; make test3) && (cd tests; make test4) && (cd tests; make test5)
- name: Build Gambit for Use
if: github.event_name == 'push'
run: |
mkdir dist
./configure --enable-single-host --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist && make clean && make -j`nproc` core && make modules && make install
cd dist/
tar -cvzf ../gambit-linux-x86_64.tgz ./
cd ..
- name: Upload Build Artifact
uses: actions/upload-artifact@v1
if: github.event_name == 'push'
with:
name: gambit-linux-x86_64
path: gambit-linux-x86_64.tgz
- name: Build Gambit for Use (--enable-multiple-threaded-vms)
if: github.event_name == 'push'
run: |
mkdir dist-mt
./configure --enable-single-host --enable-multiple-threaded-vms --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist-mt && make clean && make -j`nproc` core && make modules && make install
cd dist-mt/
tar -cvzf ../gambit-linux-x86_64-mt.tgz ./
cd ..
- name: Upload Build Artifact (--enable-multiple-threaded-vms)
uses: actions/upload-artifact@v1
if: github.event_name == 'push'
with:
name: gambit-linux-x86_64-mt
path: gambit-linux-x86_64-mt.tgz
- name: Package Source
run: make dist-boot
- name: Upload Source
uses: actions/upload-artifact@v1
with:
name: boot
path: boot.tgz
- name: Debug with tmate on failure
run: |
sudo apt-get install tmate
tmate -F -k ${{ secrets.TMATE_API_KEY }} -n ${{ secrets.TMATE_SESSION_PREFIX }}-linux > /dev/null 2>&1
if: failure() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Checkout history and tags
- name: Build and Test with C compiler
run: |
export CC=gcc-11
export CXX=g++-11
export PROCS=`sysctl -n hw.physicalcpu`
./configure --enable-c-opt=-O0 --enable-c-opt-rts=-O0 --enable-debug --enable-debug-c-backtrace --enable-multiple-threaded-vms && make clean && make -j$PROCS core && make check
- name: Build and Test with C++ compiler
if: github.event_name == 'push'
run: |
export CC=gcc-11
export CXX=g++-11
export PROCS=`sysctl -n hw.physicalcpu`
./configure --enable-c-opt=-O0 --enable-c-opt-rts=-O0 --enable-debug --enable-debug-c-backtrace --enable-multiple-threaded-vms --enable-cplusplus && make clean && make -j$PROCS core && make check
- name: Build and Test with C compiler and --enable-ansi-c
if: github.event_name == 'push'
run: |
export CC=gcc-11
export CXX=g++-11
export PROCS=`sysctl -n hw.physicalcpu`
./configure --enable-c-opt=-O0 --enable-c-opt-rts=-O0 --enable-ansi-c && make clean && make -j$PROCS core && (cd tests; make test1) && (cd tests; make test2) && (cd tests; make test3) && (cd tests; make test4) && (cd tests; make test5)
- name: Build Gambit for Use
if: github.event_name == 'push'
run: |
mkdir dist
export CC=gcc-11
export CXX=g++-11
./configure --enable-single-host --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist && make clean && make -j`sysctl -n hw.physicalcpu` core && make modules && make install
cd dist/
tar -cvzf ../gambit-macos-x86_64.tgz ./
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@v1
if: github.event_name == 'push'
with:
name: gambit-macos-x86_64
path: gambit-macos-x86_64.tgz
- name: Build Gambit for Use (--enable-multiple-threaded-vms)
if: github.event_name == 'push'
run: |
mkdir dist-mt
export CC=gcc-11
export CXX=g++-11
./configure --enable-single-host --enable-multiple-threaded-vms --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist-mt && make clean && make -j`sysctl -n hw.physicalcpu` core && make modules && make install
cd dist-mt/
tar -cvzf ../gambit-macos-x86_64-mt.tgz ./
cd ..
- name: Upload Artifact (--enable-multiple-threaded-vms)
uses: actions/upload-artifact@v1
if: github.event_name == 'push'
with:
name: gambit-macos-x86_64-mt
path: gambit-macos-x86_64-mt.tgz
- name: Debug with tmate on failure
run: |
brew install tmate
: tmate -F -k ${{ secrets.TMATE_API_KEY }} -n ${{ secrets.TMATE_SESSION_PREFIX }}-macos > /dev/null 2>&1
if: failure() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
ReportResult:
runs-on: ubuntu-latest
needs: [windows-mingw, windows-msvc, linux, macos]
if: ${{ success() }}
steps:
- name: Report Success
run: curl -XPOST -d '{"msgtype":"m.text", "body":"https://github.com/${{ github.repository }}/commit/${{ github.sha }}"}' "https://matrix.org/_matrix/client/r0/rooms/${{ secrets.GITTER_ROOM }}/send/m.room.message?access_token=${{ secrets.GITTER_ACCESS_TOKEN }}"
if: success() && github.event_name == 'push'