forked from gambit/gambit
-
Notifications
You must be signed in to change notification settings - Fork 0
212 lines (175 loc) · 7.4 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
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@v2
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"
msystem: ${{ matrix.msystem }}
- name: Build
run: |
./configure --enable-debug --enable-debug-c-backtrace
echo "#undef HAVE_CLOCK_GETTIME" >> include/config.h
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
run: |
mkdir dist
./configure --prefix=$(pwd)/dist
echo "#undef HAVE_CLOCK_GETTIME" >> include/config.h
make -j`nproc` core
make modules
make install
- name: Upload Build Artifact
uses: actions/upload-artifact@v1
with:
name: gambit-win-mingw-${{ matrix.arch }}
path: dist/
- name: Report Failure to Gitter
run: curl --data-urlencode "message=${{ github.job }} build of CI run [$GITHUB_RUN_ID](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID) failed" -d level=error ${{ secrets.GITTER_URL }}
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@v2
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"
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-debug --enable-debug-c-backtrace CC='cl' && make -j%NUMBER_OF_PROCESSORS% core"
- name: Test
shell: cmd
run: |
msys2 -c "make check"
- name: Build vstudio.bat
shell: cmd
run: |
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
run: |
mkdir dist
msys2 -c "./configure --enable-single-host --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist CC='cl' && make -j%NUMBER_OF_PROCESSORS% core && make modules && make install"
- name: Upload Build Artifact
uses: actions/upload-artifact@v1
with:
name: gambit-win-msvc-x86_64
path: dist/
- name: Report Failure to Gitter
run: curl --data-urlencode "message=${{ github.job }} build of CI run [$GITHUB_RUN_ID](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID) failed" -d level=error ${{ secrets.GITTER_URL }}
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@v2
with:
fetch-depth: 0 # Checkout history and tags
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install texinfo
- name: Build and Test
run: |
export PROCS=`nproc`
./configure --enable-debug --enable-debug-c-backtrace --enable-multiple-threaded-vms && make clean && make -j$PROCS core && make check && make clean && ./configure --enable-debug --enable-debug-c-backtrace --enable-multiple-threaded-vms --enable-cplusplus && make -j$PROCS core && make check && make clean && ./configure --enable-ansi-c && 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
run: |
mkdir dist
./configure --enable-single-host --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist && 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
with:
name: gambit-linux-x86_64
path: gambit-linux-x86_64.tgz
- name: Package Source
run: make dist-boot
- name: Upload Source
uses: actions/upload-artifact@v1
with:
name: boot
path: boot.tgz
- name: Report Failure to Gitter
run: curl --data-urlencode "message=${{ github.job }} build of CI run [$GITHUB_RUN_ID](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID) failed" -d level=error ${{ secrets.GITTER_URL }}
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@v2
with:
fetch-depth: 0 # Checkout history and tags
- name: Build and Test
run: |
export CC=gcc-9
export CXX=g++-9
export PROCS=`sysctl -n hw.physicalcpu`
./configure --enable-debug --enable-debug-c-backtrace --enable-multiple-threaded-vms && make clean && make -j$PROCS core && make check && make clean && ./configure --enable-debug --enable-debug-c-backtrace --enable-multiple-threaded-vms --enable-cplusplus && make -j$PROCS core && make check && make clean && ./configure --enable-ansi-c && 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
run: |
mkdir dist
export CC=gcc-9
export CXX=g++-9
./configure --enable-single-host --enable-gambitdir=~~execdir/.. --prefix=$(pwd)/dist && 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
with:
name: gambit-macos-x86_64
path: gambit-macos-x86_64.tgz
- name: Report Failure to Gitter
run: curl --data-urlencode "message=${{ github.job }} build of CI run [$GITHUB_RUN_ID](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID) failed" -d level=error ${{ secrets.GITTER_URL }}
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 to Gitter
run: curl --data-urlencode "message=CI run [$GITHUB_RUN_ID](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID) passed" ${{ secrets.GITTER_URL }}
if: success() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)