forked from rebolsource/r3
-
-
Notifications
You must be signed in to change notification settings - Fork 8
356 lines (305 loc) · 13.1 KB
/
build-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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
name: 'Build Rebol'
on:
# Triggers the workflow on push or pull request events but only for the master branch
#push:
# branches: [ master ]
#pull_request:
# branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
windows:
strategy:
fail-fast: true
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Siskin Builder
uses: oldes/install-siskin@v0.13.0
- name: Build 64bit Rebol/Base using MSVC
run: |
./siskin.exe make/rebol3.nest --msvc %rebol3-base-windows-x64
MOVE ./msvc/Release-x64/rebol3-base-windows-x64.exe ./
./rebol3-base-windows-x64.exe -v
- name: Build 64bit Rebol/Core using MSVC
run: |
./siskin.exe make/rebol3.nest --msvc %rebol3-core-windows-x64
MOVE ./msvc/Release-x64/rebol3-core-windows-x64.exe ./
./rebol3-core-windows-x64.exe -v
- name: Build 64bit Rebol/Bulk using MSVC
run: |
./siskin.exe make/rebol3.nest --msvc %rebol3-bulk-windows-x64
MOVE ./msvc/Release-x64/rebol3-bulk-windows-x64.exe ./
./rebol3-bulk-windows-x64.exe -v
- name: Build 32bit Rebol/Base using MSVC
run: |
./siskin.exe make/rebol3.nest --msvc %rebol3-base-windows-x86
MOVE ./msvc/Release-Win32/rebol3-base-windows-x86.exe ./
./rebol3-base-windows-x86.exe -v
- name: Build 32bit Rebol/Core using MSVC
run: |
./siskin.exe make/rebol3.nest --msvc %rebol3-core-windows-x86
MOVE ./msvc/Release-Win32/rebol3-core-windows-x86.exe ./
./rebol3-core-windows-x86.exe -v
- name: Build 32bit Rebol/Bulk using MSVC
run: |
./siskin.exe make/rebol3.nest --msvc %rebol3-bulk-windows-x86
MOVE ./msvc/Release-Win32/rebol3-bulk-windows-x86.exe ./
./rebol3-bulk-windows-x86.exe -v
###############################################################################
# Building Rebol as a shared library...
- name: Build 32bit Rebol/Core as a shared library using MSVC
run: ./siskin.exe make/rebol3.nest --msvc %lib-rebol3-core-windows-x86
- name: Build 64bit Rebol/Core as a shared library using MSVC
run: ./siskin.exe make/rebol3.nest --msvc %lib-rebol3-core-windows-x64
###############################################################################
# Building sample host applications using Rebol as a shared library...
- name: Build 32bit Rebol/Core as a host application using MSVC
run: ./siskin.exe make/rebol3.nest --msvc %host-core-windows-x86
- name: Build 64bit Rebol/Core as a host application using MSVC
run: ./siskin.exe make/rebol3.nest --msvc %host-core-windows-x64
- name: Move library and host files into root
run: |
MOVE ./msvc/Release-Win32/lib-rebol3-core-windows-x86.dll ./
MOVE ./msvc/Release-Win32/lib-rebol3-core-windows-x86.lib ./
MOVE ./msvc/Release-Win32/host-core-windows-x86.exe ./
MOVE ./msvc/Release-x64/lib-rebol3-core-windows-x64.dll ./
MOVE ./msvc/Release-x64/lib-rebol3-core-windows-x64.lib ./
MOVE ./msvc/Release-x64/host-core-windows-x64.exe ./
###############################################################################
# Collecting 32bit build artifacts...
- uses: actions/upload-artifact@v3
with:
name: Rebol-32bit-Windows-${{github.run_id}}
path: ./rebol3-*-x86.exe
# and lib/host variant...
- uses: actions/upload-artifact@v3
with:
name: Rebol-32bit-Windows-lib-${{github.run_id}}
path: ./lib-*-x86.dll
- uses: actions/upload-artifact@v3
with:
name: Rebol-32bit-Windows-lib-${{github.run_id}}
path: ./lib-*-x86.lib
- uses: actions/upload-artifact@v3
with:
name: Rebol-32bit-Windows-lib-${{github.run_id}}
path: ./host-*-x86.exe
# Collecting 64bit build artifacts...
- uses: actions/upload-artifact@v3
with:
name: Rebol-64bit-Windows-${{github.run_id}}
path: ./rebol3-*-x64.exe
# and lib/host variant...
- uses: actions/upload-artifact@v3
with:
name: Rebol-64bit-Windows-lib-${{github.run_id}}
path: ./lib-*-x64.dll
- uses: actions/upload-artifact@v3
with:
name: Rebol-64bit-Windows-lib-${{github.run_id}}
path: ./lib-*-x64.lib
- uses: actions/upload-artifact@v3
with:
name: Rebol-64bit-Windows-lib-${{github.run_id}}
path: ./host-*-x64.exe
linux:
strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04]
#os: [ubuntu-20.04, ubuntu-18.04]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Siskin Builder
uses: oldes/install-siskin@v0.13.0
- name: Install GCC multilib
run: sudo apt-get install gcc-multilib
- name: Build 32bit Rebol/Base using gcc
run: ./siskin make/rebol3.nest %rebol3-base-linux-x86
- name: Build 32bit Rebol/Core using gcc
run: ./siskin make/rebol3.nest %rebol3-core-linux-x86
- name: Build 32bit Rebol/Bulk using gcc
run: ./siskin make/rebol3.nest %rebol3-bulk-linux-x86
- name: Build 64bit Rebol/Base using gcc
run: ./siskin make/rebol3.nest %rebol3-base-linux-x64
- name: Build 64bit Rebol/Core using gcc
run: ./siskin make/rebol3.nest %rebol3-core-linux-x64
- name: Build 64bit Rebol/Bulk using gcc
run: ./siskin make/rebol3.nest %rebol3-bulk-linux-x64
# - name: Build 64bit Rebol/Base using clang
# run: ./siskin make/rebol3.nest %rebol3-base-x64-libc-clang
# - name: Build 64bit Rebol/Core using clang
# run: ./siskin make/rebol3.nest %rebol3-core-x64-libc-clang
# - name: Build 64bit Rebol/Bulk using clang
# run: ./siskin make/rebol3.nest %rebol3-bulk-x64-libc-clang
- name: Test 64bit linux versions
run: |
./build/rebol3-base-linux-x64 -v
./build/rebol3-core-linux-x64 -v
./build/rebol3-bulk-linux-x64 -v
- name: Prepare 32bit Rebol/Base for upload
run: |
mv ./build/rebol3-base-linux-x86 ./
gzip -9 ./rebol3-base-linux-x86
- name: Prepare 32bit Rebol/Core for upload
run: |
mv ./build/rebol3-core-linux-x86 ./
gzip -9 ./rebol3-core-linux-x86
- name: Prepare 32bit Rebol/Bulk for upload
run: |
mv ./build/rebol3-bulk-linux-x86 ./
gzip -9 ./rebol3-bulk-linux-x86
- uses: actions/upload-artifact@v3
with:
name: Rebol-32bit-Linux-${{github.run_id}}
path: ./rebol3-*-x86.gz
- name: Prepare 64bit Rebol/Base for upload
run: |
mv ./build/rebol3-base-linux-x64 ./rebol3-base-linux-x64
gzip -9 ./rebol3-base-linux-x64
- name: Prepare 64bit Rebol/Core for upload
run: |
mv ./build/rebol3-core-linux-x64 ./rebol3-core-linux-x64
gzip -9 ./rebol3-core-linux-x64
- name: Prepare 64bit Rebol/Bulk for upload
run: |
mv ./build/rebol3-bulk-linux-x64 ./rebol3-bulk-linux-x64
gzip -9 ./rebol3-bulk-linux-x64
- uses: actions/upload-artifact@v3
with:
name: Rebol-64bit-Linux-${{github.run_id}}
path: ./rebol3-*-x64.gz
# musl versions...
##################
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Download Rebol-dev container
run: docker pull oldes/rebol-dev:alpine
- name: Build all Rebol Alpine (musl) x64 versions
run: |
cd .github/workflows/alpine/
chmod +x ./build-all-alpine.sh
docker run -v $PWD:/out/ oldes/rebol-dev:alpine /out/build-all-alpine.sh
- uses: actions/upload-artifact@v3
with:
name: Rebol-64bit-Linux-musl-${{github.run_id}}
path: .github/workflows/alpine/*.gz
macos:
runs-on: macos-12
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Siskin Builder
uses: oldes/install-siskin@v0.13.0
- name: Build 64bit Rebol/Base using clang
run: |
./siskin make/rebol3.nest %rebol3-base-macos-x64
file ./build/rebol3-base-macos-x64
- name: Build 64bit Rebol/Core using clang
run: |
./siskin make/rebol3.nest %rebol3-core-macos-x64
file ./build/rebol3-core-macos-x64
- name: Build 64bit Rebol/Bulk using clang
run: |
./siskin make/rebol3.nest %rebol3-bulk-macos-x64
file ./build/rebol3-bulk-macos-x64
- name: Build ARM64 Rebol/Base using clang
run: |
./siskin make/rebol3.nest %rebol3-base-macos-arm64
file ./build/rebol3-base-macos-arm64
- name: Build ARM64 Rebol/Core using clang
run: |
./siskin make/rebol3.nest %rebol3-core-macos-arm64
file ./build/rebol3-core-macos-arm64
- name: Build ARM64 Rebol/Bulk using clang
run: |
./siskin make/rebol3.nest %rebol3-bulk-macos-arm64
file ./build/rebol3-bulk-macos-arm64
# - name: Build 64bit Rebol/Core as a shared library
# run: ./siskin make/rebol3.nest %lib-rebol3-core-macos-x64
# - name: Build 64bit Rebol/Core as a host application
# run: ./siskin make/rebol3.nest %host-core-macos-x64
- name: Install the Apple certificate
# https://docs.github.com/en/actions/guides/installing-an-apple-certificate-on-macos-runners-for-xcode-development
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.MACOS_CERTIFICATE }}
P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# list available codesigning identities
security find-identity -v -p codesigning
- name: Codesign executables
env:
MACOS_IDENTITY_ID: ${{ secrets.MACOS_IDENTITY_ID }}
run: |
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-base-macos-x64 -v
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-core-macos-x64 -v
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-bulk-macos-x64 -v
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-base-macos-arm64 -v
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-core-macos-arm64 -v
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-bulk-macos-arm64 -v
continue-on-error: true
- name: Test x64 macOS versions
run: |
./build/rebol3-base-macos-x64 -v
./build/rebol3-core-macos-x64 -v
./build/rebol3-bulk-macos-x64 -v
- name: Prepare 64bit Rebol/Base for upload
run: |
mv ./build/rebol3-base-macos-x64 ./
gzip -9 ./rebol3-base-macos-x64
- name: Prepare 64bit Rebol/Core for upload
run: |
mv ./build/rebol3-core-macos-x64 ./
gzip -9 ./rebol3-core-macos-x64
- name: Prepare 64bit Rebol/Bulk for upload
run: |
mv ./build/rebol3-bulk-macos-x64 ./
gzip -9 ./rebol3-bulk-macos-x64
- name: Prepare ARM64 Rebol/Base for upload
run: |
mv ./build/rebol3-base-macos-arm64 ./
gzip -9 ./rebol3-base-macos-arm64
- name: Prepare ARM64 Rebol/Core for upload
run: |
mv ./build/rebol3-core-macos-arm64 ./
gzip -9 ./rebol3-core-macos-arm64
- name: Prepare ARM64 Rebol/Bulk for upload
run: |
mv ./build/rebol3-bulk-macos-arm64 ./
gzip -9 ./rebol3-bulk-macos-arm64
# - name: Prepare 64bit Rebol/Core as a shared library for upload
# run: |
# mv ./build/lib-rebol3-core-macos-x64 ./lib-rebol3-core-macos-x64
# gzip -9 ./lib-rebol3-core-macos-x64
# - name: Prepare 64bit Rebol/Core as a host application for upload
# run: |
# mv ./build/host-core-macos-x64 ./host-core-macos-x64
# gzip -9 ./host-core-macos-x64
- uses: actions/upload-artifact@v3
with:
name: Rebol-64bit-macOS-intel-${{github.run_id}}
path: ./*-x64.gz
- uses: actions/upload-artifact@v3
with:
name: Rebol-64bit-macOS-arm-${{github.run_id}}
path: ./*-arm64.gz