generated from nathanfranke/gdextension
-
Notifications
You must be signed in to change notification settings - Fork 135
125 lines (108 loc) · 3.47 KB
/
build.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
name: 🛠️ Build All
on:
push:
branches: [ main ]
pull_request:
paths: [ '**' ]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.name }} ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
identifier: [linux, windows, macos, ios, android-arm32, android-arm64]
target: [debug, release]
include:
- identifier: linux
platform: linux
name: 🐧 Linux
runner: ubuntu-20.04
arch: x86_64
- identifier: windows
platform: windows
name: 🪟 Windows
runner: ubuntu-20.04
arch: x86_64
- identifier: macos
platform: macos
name: 🍎 macOS
runner: macos-latest
arch: universal
- identifier: ios
platform: ios
name: 🍏 iOS
runner: macos-latest
arch: universal
- identifier: android-arm64
platform: android
name: 🤖 Android Arm64
runner: ubuntu-20.04
arch: arm64
- identifier: android-arm32
platform: android
name: 🤖 Android Arm32
runner: ubuntu-20.04
arch: arm32
steps:
- name: Checkout Terrain3D
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Windows Dependencies
if: ${{ matrix.platform == 'windows' }}
uses: ./.github/actions/windows-deps
- name: Setup Android Dependencies
if: ${{ matrix.platform == 'android' }}
uses: nttld/setup-ndk@v1
with:
ndk-version: r23c
link-to-sdk: true
- name: Setup Base Dependencies
uses: ./.github/actions/base-deps
- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.identifier }}-${{ matrix.target }}
continue-on-error: true
- name: Build Terrain3D
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
ARCH: '${{ matrix.arch }}'
shell: sh
run: |
scons target=$TARGET platform='${{ matrix.platform }}' arch=$ARCH debug_symbols=no -j2
- name: Strip Libraries (Windows/Linux)
if: ${{ matrix.platform == 'windows' || matrix.platform == 'linux' }}
shell: sh
run: |
ls -l project/addons/terrain_3d/bin/
strip project/addons/terrain_3d/bin/libterrain.*
ls -l project/addons/terrain_3d/bin/
- name: Include Files
shell: sh
run: |
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE.txt' ${{ github.workspace }}/project/addons/terrain_3d/
- name: Upload Package
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: t3d-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.target }}
path: |
${{ github.workspace }}/project/
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
include-hidden-files: true
name: ${{ github.event.repository.name }}
pattern: t3d-*
delete-merged: true