generated from nathanfranke/gdextension
-
Notifications
You must be signed in to change notification settings - Fork 135
108 lines (98 loc) · 3.33 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
name: 🛠️ Build All
on: [push, workflow_dispatch]
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- identifier: linux-debug
name: Linux Debug
runner: ubuntu-20.04
target: template_debug
platform: linux
arch: x86_64
- identifier: linux-release
name: Linux Release
runner: ubuntu-20.04
target: template_release
platform: linux
arch: x86_64
- identifier: windows-debug
name: Windows Debug
runner: ubuntu-20.04
target: template_debug
platform: windows
arch: x86_64
- identifier: windows-release
name: Windows Release
runner: ubuntu-20.04
target: template_release
platform: windows
arch: x86_64
- identifier: macos-debug
name: macOS Debug
runner: macos-latest
target: template_debug
platform: macos
- identifier: macos-release
name: macOS Release
runner: macos-latest
target: template_release
platform: macos
# - identifier: android-debug
# name: Android Debug
# runner: ubuntu-20.04
# target: template_debug
# platform: android
# arch: arm64
# - identifier: android-release
# name: Android Release
# runner: ubuntu-20.04
# target: template_release
# platform: android
# arch: arm64
steps:
- name: Checkout Terrain3D
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Windows Dependencies
if: startsWith(matrix.identifier, 'windows-')
uses: ./.github/actions/windows-deps
- name: Setup Android Dependencies
if: startsWith(matrix.identifier, 'android-')
uses: ./.github/actions/android-deps
- name: Setup Base Dependencies
uses: ./.github/actions/base-deps
- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.identifier }}
continue-on-error: true
- name: Build Terrain3D
shell: sh
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
SCONS_CACHE_LIMIT: 7168
run: |
scons target='${{ matrix.target }}' platform='${{ matrix.platform }}' arch='${{ matrix.arch }}' debug_symbols=no -j2
- name: Strip Libraries (Windows/Linux)
if: startsWith(matrix.identifier, 'windows-') || startsWith(matrix.identifier, '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@v3
with:
name: ${{ github.event.repository.name }}
path: |
${{ github.workspace }}/project/