forked from SpartanJ/eepp
-
Notifications
You must be signed in to change notification settings - Fork 0
519 lines (505 loc) · 18.8 KB
/
ecode-nightly.yml
File metadata and controls
519 lines (505 loc) · 18.8 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
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
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
name: Build Nightly
on:
push:
branches:
- 'develop'
workflow_dispatch:
permissions: write-all
jobs:
release:
name: Create Nightly Release
runs-on: ubuntu-22.04
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.tag.outputs.version }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Set Tag
id: tag
run: |
echo "version=nightly" >> "$GITHUB_OUTPUT"
- name: Update Tag
uses: richardsimko/update-tag@v1
with:
tag_name: ${{ steps.tag.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ steps.tag.outputs.version }}
name: ecode ${{ steps.tag.outputs.version }}
draft: false
prerelease: true
generate_release_notes: true
body: >
Builds that include most recent changes as they happen. For stable releases check the whole list of [releases](https://github.com/SpartanJ/ecode/releases).
build_linux_x86_64:
name: Linux x86_64 Nightly
needs: release
strategy:
matrix:
config:
- arch: x86_64
container: ubuntu-22.04
runs-on: ${{ matrix.config.container }}
container:
image: ubuntu:20.04
env:
CC: gcc
CXX: g++
steps:
- name: Install essentials
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y --no-install-recommends software-properties-common build-essential git ca-certificates
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive', set-safe-directory: true }
- name: Set Environment Variables
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
echo "RARCH=$(uname -m)" >> "$GITHUB_ENV"
echo $(ldd --version)
- name: Mark Git directory as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Patch commit number
run: |
bash projects/scripts/patch_commit_number.sh
- name: Install dependencies
run: |
apt-get install -y curl libfuse2 fuse premake4 mesa-common-dev libgl1-mesa-dev sudo file appstream
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
apt-get install -y nodejs
add-apt-repository -y universe
add-apt-repository -y multiverse
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y gcc-13 g++-13 libdw-dev
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 10
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
update-alternatives --set cc /usr/bin/gcc
update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
update-alternatives --set c++ /usr/bin/g++
update-alternatives --config gcc
update-alternatives --config g++
bash projects/linux/scripts/install_sdl2.sh
- name: Build ecode
run: |
bash projects/linux/ecode/build.app.sh --with-static-cpp --version ${{ env.INSTALL_REF }} --arch ${{ matrix.config.arch }}
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
projects/linux/ecode/ecode-linux-${{ env.INSTALL_REF }}-${{ env.RARCH }}.AppImage
projects/linux/ecode/ecode-linux-${{ env.INSTALL_REF }}-${{ env.RARCH }}.tar.gz
build_linux_arm64:
name: Linux arm64 Nightly
needs: release
strategy:
matrix:
config:
- arch: aarch64
container: ubuntu-22.04
runs-on: ${{ matrix.config.container }}
env:
CC: gcc
CXX: g++
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Set Environment Variables
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "/usr/lib/ccache" >> "$GITHUB_PATH"
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
echo "CC=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
echo "CXX=aarch64-linux-gnu-g++" >> "$GITHUB_ENV"
echo "AR=aarch64-linux-gnu-ar" >> "$GITHUB_ENV"
echo "RANLIB=aarch64-linux-gnu-ranlib" >> "$GITHUB_ENV"
echo "STRIP=aarch64-linux-gnu-strip" >> "$GITHUB_ENV"
echo "RARCH=arm64" >> "$GITHUB_ENV" >> "$GITHUB_ENV"
echo $(ldd --version)
echo $(gcc --version)
- name: Update Packages
run: |
codename=$(lsb_release -cs)
url="http://ports.ubuntu.com/ubuntu-ports"
repos="main restricted universe multiverse"
echo "deb [arch=arm64] $url $codename $repos" > arm64.list
echo "deb [arch=arm64] $url $codename-backports $repos" >> arm64.list
echo "deb [arch=arm64] $url $codename-security $repos" >> arm64.list
echo "deb [arch=arm64] $url $codename-updates $repos" >> arm64.list
sudo mv arm64.list /etc/apt/sources.list.d/
sudo apt-get update
sudo dpkg --add-architecture arm64
- name: Install dependencies
run: |
sudo apt-get install -y premake4 libfuse2 fuse gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
bash projects/linux/scripts/install_sdl2.sh --aarch64
- name: Build ecode
run: |
bash projects/scripts/patch_commit_number.sh
bash projects/linux/ecode/build.app.sh --version ${{ env.INSTALL_REF }} --arch ${{ matrix.config.arch }}
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
projects/linux/ecode/ecode-linux-${{ env.INSTALL_REF }}-${{ env.RARCH }}.AppImage
projects/linux/ecode/ecode-linux-${{ env.INSTALL_REF }}-${{ env.RARCH }}.tar.gz
build_windows_cross:
name: Windows x86_64 Nightly
needs: release
strategy:
matrix:
config:
- compiler: default
arch: x86_64
container: ubuntu-22.04
runs-on: ${{ matrix.config.container }}
env:
CC: gcc
CXX: g++
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Set Environment Variables
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
echo "RARCH=$(uname -m)" >> "$GITHUB_ENV"
- name: Update Packages
run: |
sudo add-apt-repository -y universe
sudo add-apt-repository -y multiverse
sudo apt-get update
- name: Install dependencies
run: |
sudo apt-get install -y premake4 libfuse2 fuse mingw-w64 gcc-12 g++-12
wget https://cdn.ensoft.dev/eepp-assets/premake-5.0.0-beta6-linux.tar.gz
tar xvzf premake-5.0.0-beta6-linux.tar.gz
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 10
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
- name: Build ecode
run: |
bash projects/scripts/patch_commit_number.sh
bash projects/mingw32/ecode/build.app.sh --version ${{ env.INSTALL_REF }}
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
projects/mingw32/ecode/ecode-windows-${{ env.INSTALL_REF }}-${{ env.RARCH }}.zip
build_windows_arm64_cross:
name: Windows arm64 Nightly
needs: release
strategy:
matrix:
config:
- compiler: default
arch: arm64
container: ubuntu-22.04
runs-on: ${{ matrix.config.container }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Set Environment Variables
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
- name: Update Packages
run: |
sudo add-apt-repository -y universe
sudo add-apt-repository -y multiverse
sudo apt-get update
- name: Install dependencies
run: |
sudo apt-get install -y libfuse2 fuse
wget https://cdn.ensoft.dev/eepp-assets/premake-5.0.0-beta6-linux.tar.gz
tar xvzf premake-5.0.0-beta6-linux.tar.gz
- name: Build ecode
run: |
bash projects/scripts/patch_commit_number.sh
bash projects/mingw32/ecode/build.app.sh --arch=arm64 --version ${{ env.INSTALL_REF }}
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
projects/mingw32/ecode/ecode-windows-${{ env.INSTALL_REF }}-arm64.zip
build_macos:
name: macOS arm64 Nightly
needs: release
runs-on: macos-14
strategy:
matrix:
arch: [arm64]
env:
CC: clang
CXX: clang++
MACOS_CERTIFICATE_P12_B64: ${{ secrets.MACOS_CERTIFICATE_P12_B64 }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
MACOS_APPLE_ID: ${{ secrets.MACOS_APPLE_ID }}
MACOS_NOTARIZATION_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
MACOS_TEAM_ID: ${{ secrets.MACOS_TEAM_ID }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: System Information
run: |
system_profiler SPSoftwareDataType
bash --version
gcc -v
xcodebuild -version
uname -a
- name: Set Environment Variables
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
- name: Install Dependencies
run: |
brew install bash sdl2 create-dmg premake p7zip
- name: Build
run: |
bash projects/scripts/patch_commit_number.sh
bash projects/macos/ecode/build.app.sh --version ${{ env.INSTALL_REF }}
- name: Sign Application
if: env.MACOS_CERTIFICATE_P12_B64 != ''
working-directory: projects/macos/ecode
run: |
bash ./sign.sh ecode.app
- name: Create DMG Image
run: |
bash projects/macos/ecode/create.dmg.sh --version ${{ env.INSTALL_REF }}
- name: Notarize DMG
if: env.MACOS_CERTIFICATE_P12_B64 != ''
working-directory: projects/macos/ecode
run: |
DMG_NAME="ecode-macos-${{ env.INSTALL_REF }}-arm64.dmg"
bash ./sign.sh "$DMG_NAME"
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
projects/macos/ecode/ecode-macos-${{ env.INSTALL_REF }}-arm64.dmg
build_macos_cross:
name: macOS x86_64 Nightly
needs: release
runs-on: macos-14
strategy:
matrix:
arch: [arm64]
env:
CC: clang
CXX: clang++
MACOS_CERTIFICATE_P12_B64: ${{ secrets.MACOS_CERTIFICATE_P12_B64 }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
MACOS_APPLE_ID: ${{ secrets.MACOS_APPLE_ID }}
MACOS_NOTARIZATION_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
MACOS_TEAM_ID: ${{ secrets.MACOS_TEAM_ID }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: System Information
run: |
system_profiler SPSoftwareDataType
bash --version
gcc -v
xcodebuild -version
uname -a
- name: Set Environment Variables
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
- name: Install Dependencies
run: |
brew install bash create-dmg premake p7zip
curl -OL https://github.com/libsdl-org/SDL/releases/download/release-2.32.10/SDL2-2.32.10.dmg
hdiutil attach SDL2-2.32.10.dmg
sudo cp -r /Volumes/SDL2/SDL2.framework /Library/Frameworks/
hdiutil detach /Volumes/SDL2
- name: Build
run: |
bash projects/scripts/patch_commit_number.sh
bash projects/macos/ecode/cross.build.app.sh --version ${{ env.INSTALL_REF }}
- name: Sign Application
if: env.MACOS_CERTIFICATE_P12_B64 != ''
working-directory: projects/macos/ecode
run: |
bash ./sign.sh ecode.app
- name: Create DMG Image
run: |
bash projects/macos/ecode/cross.create.dmg.sh --version ${{ env.INSTALL_REF }}
- name: Notarize DMG
if: env.MACOS_CERTIFICATE_P12_B64 != ''
working-directory: projects/macos/ecode
run: |
DMG_NAME="ecode-macos-${{ env.INSTALL_REF }}-x86_64.dmg"
bash ./sign.sh "$DMG_NAME"
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
projects/macos/ecode/ecode-macos-${{ env.INSTALL_REF }}-x86_64.dmg
build_freebsd_x86_64:
name: FreeBSD x86_64 Nightly
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Set Environment Variables
run: |
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
echo "RARCH=$(uname -m)" >> "$GITHUB_ENV"
- uses: vmactions/freebsd-vm@v1
env:
INSTALL_REF: ${{ needs.release.outputs.version }}
with:
release: '14.1'
envs: 'INSTALL_REF'
sync: sshfs
usesh: true
mem: 8192
disable-cache: true
prepare: |
pkg upgrade -y
pkg install -y bash git sdl2 curl premake5 gsed gmake
run: |
export CC=clang
export CXX=clang++
git config --global --add safe.directory "$GITHUB_WORKSPACE"
bash projects/scripts/patch_commit_number.sh
sh projects/freebsd/ecode/build.app.sh --version ${{ env.INSTALL_REF }}
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
projects/freebsd/ecode/ecode-freebsd-${{ env.INSTALL_REF }}-x86_64.tar.gz
build_haiku_x86_64:
name: Haiku x86_64 Nightly
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Set Environment Variables
run: |
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
echo "RARCH=$(uname -m)" >> "$GITHUB_ENV"
- uses: vmactions/haiku-vm@v1
env:
INSTALL_REF: ${{ needs.release.outputs.version }}
with:
envs: 'INSTALL_REF'
usesh: true
mem: 8192
disable-cache: true
prepare: |
pkgman install -y libsdl2 libsdl2_devel git gcc premake5
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
bash projects/scripts/patch_commit_number.sh
sh projects/haiku/ecode/build.app.sh --version ${{ env.INSTALL_REF }}
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
projects/haiku/ecode/ecode-haiku-${{ env.INSTALL_REF }}-x86_64.tar.gz
build_windows_msvc:
name: Windows x86_64 MSVC Nightly
needs: release
runs-on: windows-latest
env:
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin
steps:
- name: Configure Git
shell: pwsh
run: |
git config --system core.autocrlf false
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Build
shell: pwsh
run: |
.\projects\scripts\patch_commit_number.ps1
.\projects\windows\ecode\build.app.ps1
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
./projects/windows/ecode/ecode-windows-nightly-msvc-x86_64.zip
./projects/windows/ecode/ecode-windows-nightly-msvc-x86_64-pdb.zip
build_windows_arm64_msvc:
name: Windows arm64 MSVC Nightly
needs: release
runs-on: windows-latest
env:
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin
steps:
- name: Configure Git
shell: pwsh
run: |
git config --system core.autocrlf false
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Build
shell: pwsh
run: |
.\projects\scripts\patch_commit_number.ps1
.\projects\windows\ecode\build.app.ps1 -arch arm64
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
./projects/windows/ecode/ecode-windows-nightly-msvc-arm64.zip
./projects/windows/ecode/ecode-windows-nightly-msvc-arm64-pdb.zip