-
Notifications
You must be signed in to change notification settings - Fork 0
313 lines (257 loc) · 10.2 KB
/
rebol-triangulate.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
name: 'Rebol/Triangulate'
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
paths:
- .github/workflows/rebol-triangulate.yml
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
OUT: ${{github.WORKSPACE}}/Release
REBOL_MODULES_DIR: ${{github.WORKSPACE}}/Release
jobs:
windows:
runs-on: windows-latest
if: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare output directory
shell: bash
run: mkdir $OUT
- name: Install Rebol
uses: oldes/[email protected]
with:
product: Bulk
- name: Build 32bit Rebol/Triangulate extension
shell: bash
run: ./rebol3 siskin.r3 rebol/triangulate --msvc -o $OUT/triangulate-windows-x86.rebx triangulate-x86
- name: Build 64bit Rebol/Triangulate extension
shell: bash
run: ./rebol3 siskin.r3 rebol/triangulate --msvc -o $OUT/triangulate-windows-x64.rebx triangulate-x64
- name: Minimal Rebol/Triangulate extension test
shell: bash
run: ./rebol3 ./tree/rebol/Rebol-Triangulate/ci-test.r3
- uses: actions/upload-artifact@v3
with:
name: Rebol-Triangulate-${{github.run_id}}
path: ${{env.OUT}}/triangulate*.rebx
linux:
runs-on: ubuntu-20.04
if: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare output directory
run: mkdir $OUT
- name: Install Rebol
uses: oldes/[email protected]
with:
product: Bulk
- name: Install GCC multilib
run: sudo apt-get install gcc-multilib
- name: Build 32bit Rebol/Triangulate extension
run: ./rebol3 siskin.r3 rebol/triangulate -o $OUT/triangulate-linux-x86.rebx triangulate-x86
- name: Build 64bit Rebol/Triangulate extension
run: ./rebol3 siskin.r3 rebol/triangulate -o $OUT/triangulate-linux-x64.rebx triangulate-x64
- name: Minimal Rebol/Triangulate extension test
run: ./rebol3 ./tree/rebol/Rebol-Triangulate/ci-test.r3
- name: Compress 32bit Rebol/Triangulate extension
run: gzip -9 $OUT/triangulate-linux-x86.rebx
- name: Compress 64bit Rebol/Triangulate extension
run: gzip -9 $OUT/triangulate-linux-x64.rebx
- uses: actions/upload-artifact@v3
with:
name: Rebol-Triangulate-${{github.run_id}}
path: ${{env.OUT}}/triangulate-linux-*.gz
macos:
runs-on: macos-latest
if: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare output directory
run: mkdir $OUT
- name: Install Rebol
uses: oldes/[email protected]
with:
product: Bulk
- name: Build Rebol/Triangulate extension (x64)
run: ./rebol3 siskin.r3 rebol/triangulate -o $OUT/triangulate-macos-x64.rebx triangulate-x64
- name: Build Rebol/Triangulate extension (arm64)
run: ./rebol3 siskin.r3 rebol/triangulate -o $OUT/triangulate-macos-arm64.rebx triangulate-arm64
- 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 $OUT/triangulate-macos-x64.rebx -v
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID $OUT/triangulate-macos-arm64.rebx -v
- name: Minimal Rebol/Triangulate extension test
run: ./rebol3 ./tree/rebol/Rebol-Triangulate/ci-test.r3
- name: Compress Rebol/Triangulate extensions
run: |
gzip -9 $OUT/triangulate-macos-x64.rebx
gzip -9 $OUT/triangulate-macos-arm64.rebx
- uses: actions/upload-artifact@v3
with:
name: Rebol-Triangulate-${{github.run_id}}
path: ${{env.OUT}}/triangulate-macos-*.gz
openbsd:
runs-on: ubuntu-latest
if: true
steps:
- uses: actions/checkout@v4
- name: Crosscompilation for OpenBSD
uses: vmactions/openbsd-vm@v1
with:
envs: 'OUT REBOL_MODULES_DIR'
usesh: true
prepare: |
pkg_add curl git
run: |
mkdir $OUT
curl https://github.com/Oldes/Rebol3/releases/download/3.17.0/rebol3-bulk-openbsd-x64.gz --output ./rebol3.gz --silent -L
gunzip ./rebol3.gz
chmod +x ./rebol3
./rebol3 -V
ls -la .
./rebol3 siskin.r3 rebol/triangulate -o $OUT/triangulate-openbsd-x64.rebx triangulate-x64
file $OUT/triangulate-openbsd-x64.rebx
./rebol3 ./tree/rebol/Rebol-Triangulate/ci-test.r3
- name: Compress 64bit Rebol/Triangulate extension
run: gzip -9 $OUT/triangulate-openbsd-x64.rebx
- uses: actions/upload-artifact@v3
with:
name: Rebol-Triangulate-${{github.run_id}}
path: ${{env.OUT}}/triangulate-openbsd-*.gz
freebsd:
runs-on: ubuntu-latest
if: true
steps:
- uses: actions/checkout@v4
- name: Crosscompilation for FreeBSD
uses: vmactions/freebsd-vm@v1
with:
envs: 'OUT REBOL_MODULES_DIR'
usesh: true
prepare: |
pkg install -y curl git
run: |
env
freebsd-version
mkdir $OUT
curl https://github.com/Oldes/Rebol3/releases/download/3.17.0/rebol3-bulk-freebsd-x64.gz --output ./rebol3.gz --silent -L
gunzip ./rebol3.gz
chmod +x ./rebol3
./rebol3 -V
ls -la .
./rebol3 siskin.r3 rebol/triangulate -o $OUT/triangulate-freebsd-x64.rebx triangulate-x64
file $OUT/triangulate-freebsd-x64.rebx
./rebol3 ./tree/rebol/Rebol-Triangulate/ci-test.r3
- name: Compress 64bit Rebol/Triangulate extension
run: gzip -9 $OUT/triangulate-freebsd-x64.rebx
- uses: actions/upload-artifact@v3
with:
name: Rebol-Triangulate-${{github.run_id}}
path: ${{env.OUT}}/triangulate-freebsd-*.gz
dragonflybsd:
runs-on: ubuntu-latest
if: true
steps:
- uses: actions/checkout@v4
- name: Crosscompilation for DragonFlyBSD
uses: vmactions/dragonflybsd-vm@v1
with:
envs: 'OUT REBOL_MODULES_DIR'
usesh: true
prepare: |
pkg install -y llvm16 libnghttp2 git
run: |
env
ln -s /usr/local/bin/clang16 /usr/local/bin/clang
clang --version
mkdir $OUT
curl https://github.com/Oldes/Rebol3/releases/download/3.17.0/rebol3-bulk-dragonflybsd-x64.gz --output ./rebol3.gz --silent -L
gunzip ./rebol3.gz
chmod +x ./rebol3
./rebol3 -V
ls -la .
./rebol3 siskin.r3 rebol/triangulate -o $OUT/triangulate-dragonflybsd-x64.rebx triangulate-x64
file $OUT/triangulate-dragonflybsd-x64.rebx
./rebol3 ./tree/rebol/Rebol-Triangulate/ci-test.r3
- name: Compress 64bit Rebol/Triangulate extension
run: gzip -9 $OUT/triangulate-dragonflybsd-x64.rebx
- uses: actions/upload-artifact@v3
with:
name: Rebol-Triangulate-${{github.run_id}}
path: ${{env.OUT}}/triangulate-dragonflybsd-*.gz
Haiku-x86:
runs-on: ubuntu-latest
if: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Download Haiku Rebol-dev container
run: docker pull docker.io/oldes/rebol-dev:haiku-x86
- name: Build all Rebol/Triangulate for Haiku OS x86
run: docker run --rm -v $PWD:/siskin oldes/rebol-dev:haiku-x86 bash -c 'cd /siskin; rebol siskin.r3 rebol/triangulate triangulate-x86'
- name: Compress result before uploading
run: |
mkdir $OUT
sudo mv ./tree/rebol/Rebol-Triangulate/build/triangulate-x86.so $OUT/triangulate-haiku-x86.rebx
sudo gzip -9 $OUT/triangulate-haiku-x86.rebx
- uses: actions/upload-artifact@v3
with:
name: Rebol-Triangulate-${{github.run_id}}
path: ${{env.OUT}}/triangulate-*.gz
Haiku-x64:
runs-on: ubuntu-latest
if: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Download Haiku Rebol-dev container
run: docker pull docker.io/oldes/rebol-dev:haiku-x64
- name: Build all Rebol/Triangulate for Haiku OS x64
run: docker run --rm -v $PWD:/siskin oldes/rebol-dev:haiku-x64 bash -c 'cd /siskin; rebol siskin.r3 rebol/triangulate triangulate-x64'
- name: Compress result before uploading
run: |
mkdir $OUT
sudo mv ./tree/rebol/Rebol-Triangulate/build/triangulate-x64.so $OUT/triangulate-haiku-x64.rebx
sudo gzip -9 $OUT/triangulate-haiku-x64.rebx
- uses: actions/upload-artifact@v3
with:
name: Rebol-Triangulate-${{github.run_id}}
path: ${{env.OUT}}/triangulate-*.gz