-
Notifications
You must be signed in to change notification settings - Fork 158
232 lines (209 loc) · 8.65 KB
/
all_builds.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
name: Build Editor and Standalone
on:
push:
paths:
- "**"
- "!**.md"
- "!LICENSE"
- "!.scripts/clang_format.sh"
- "!.github/**"
- "!.vscode/**"
- ".github/actions/**"
- ".github/workflows/all_builds.yml"
pull_request:
paths:
- "**"
- "!**.md"
- "!LICENSE"
- "!.scripts/clang_format.sh"
- "!.github/**"
- "!.vscode/**"
- ".github/actions/**"
- ".github/workflows/all_builds.yml"
# Global Settings
# SCONS_CACHE for windows must be set in the build environment
env:
GODOT_BASE_BRANCH: master
# Change the README too
GODOT_MAIN_SYNC_REF: daeb1c7292cbb426fd45c5ca98b1c7da40b390ba
SCONSFLAGS: verbose=yes warnings=all werror=no module_text_server_fb_enabled=yes minizip=yes debug_symbols=no deprecated=yes
SCONSFLAGS_TEMPLATE: no_editor_splash=yes module_camera_enabled=no module_mbedtls_enabled=no module_enet_enabled=no module_mobile_vr_enabled=no module_upnp_enabled=no module_noise_enabled=no module_websocket_enabled=no use_static_cpp=yes builtin_freetype=yes builtin_libpng=yes builtin_zlib=yes builtin_libwebp=yes builtin_libvorbis=yes builtin_libogg=yes module_csg_enabled=yes module_gridmap_enabled=yes disable_3d=no
SCONS_CACHE_MSVC_CONFIG: true
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
cancel-in-progress: true
jobs:
build:
# Windows 10 with latest image
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: "Windows"
os: "windows-latest"
platform: windows
sconsflags-template: ""
command-export: ${env:GITHUB_WORKSPACE}\bin\godot.windows.editor.x86_64.exe
export-preset: "Windows Desktop"
export-name: .export\gdre_tools.exe
- name: "🐧 Linux"
os: "ubuntu-20.04"
platform: linux
sconsflags-template: optimize=size use_lto=yes
command-export: ${env:GITHUB_WORKSPACE}/bin/godot.linuxbsd.editor.x86_64
export-preset: "Linux/X11"
export-name: .export/gdre_tools.x86_64
- name: "🍎 macOS"
os: "macos-latest"
platform: macos
sconsflags: use_volk=no vulkan_sdk_path=$VULKAN_SDK_PATH
sconsflags-template: optimize=size use_lto=yes use_volk=no vulkan_sdk_path=$VULKAN_SDK_PATH
command-export: ${env:GITHUB_WORKSPACE}/bin/godot.macos.editor.x86_64
export-preset: "macOS"
export-name: .export/gdre_tools.universal.zip
steps:
- name: checkout-godot
uses: actions/checkout@v3
with:
repository: godotengine/godot
ref: ${{env.GODOT_MAIN_SYNC_REF}}
- name: checkout-gdsdecomp
uses: actions/checkout@v3
with:
path: modules/gdsdecomp
fetch-depth: 0
- name: copy actions
shell: bash
run: |
cp -R modules/gdsdecomp/.github/actions/* .github/actions/
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
with:
cache-name: ${{ matrix.platform }}-editor-and-standalone
# Azure repositories are not reliable, we need to prevent azure giving us packages.
- name: Install Linux deps
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
libudev-dev libxi-dev libxrandr-dev yasm clang-format-8
- name: Setup python and scons
uses: ./.github/actions/godot-deps
- name: Install Vulkan SDK
uses: ./.github/actions/install-swiftshader
if: matrix.platform == 'macos'
with:
install_vulkan_sdk: true
install_swiftshader: false
- name: Compilation
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
platform: ${{ matrix.platform }}
target: editor
tests: false
scons-cache-limit: 4096
- name: Prepare artifact
uses: ./.github/actions/godot-prepare-artifact
- uses: actions/upload-artifact@v3
with:
name: GDRE_tools-editor-${{ matrix.platform }}
path: ${{github.workspace}}/bin/*
retention-days: 90
- name: Compile godot export template (x86_64)
uses: ./.github/actions/godot-build
with:
sconsflags: arch=x86_64 ${{ env.SCONSFLAGS }} ${{ env.SCONSFLAGS_TEMPLATE }} ${{ matrix.sconsflags-template }}
platform: ${{ matrix.platform }}
target: template_release
tests: false
scons-cache-limit: 4096
- name: Compile godot export template for macos arm64
uses: ./.github/actions/godot-build
if: matrix.platform == 'macos'
with:
sconsflags: arch=arm64 ${{ env.SCONSFLAGS }} ${{ env.SCONSFLAGS_TEMPLATE }} ${{ matrix.sconsflags-template }}
platform: ${{ matrix.platform }}
target: template_release
tests: false
scons-cache-limit: 4096
- name: Prepare template artifact
uses: ./.github/actions/godot-prepare-artifact
- name: Make macOS template
if: matrix.platform == 'macos'
run: |
mkdir -p "bin/macos_template.app/Contents/MacOS"
lipo -create bin/godot.macos.template_release.x86_64 bin/godot.macos.template_release.arm64 -output bin/godot.macos.template_release.universal
cp "bin/godot.macos.template_release.universal" "bin/macos_template.app/Contents/MacOS/godot_macos_debug.universal"
cp "bin/godot.macos.template_release.universal" "bin/macos_template.app/Contents/MacOS/godot_macos_release.universal"
cd bin/
zip -r9 "macos.zip" "macos_template.app/"
cd ..
- name: Download rcedit.exe
uses: robinraju/[email protected]
if: matrix.platform == 'windows'
with:
repository: electron/rcedit
latest: true
fileName: rcedit-x64.exe
out-file-path: ${{ runner.tool_cache }}/rcedit
- name: Setup rcedit
if: matrix.platform == 'windows'
run: |
Rename-Item ${{ runner.tool_cache }}\rcedit\rcedit-x64.exe ${{ runner.tool_cache }}\rcedit\rcedit.exe
echo "${{ runner.tool_cache }}\rcedit" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Export standalone GDRE Tools
shell: pwsh
run: |
cd ${{github.workspace}}/modules/gdsdecomp/standalone
mkdir .export
$proc = Start-Process -NoNewWindow -PassThru -FilePath "${{ matrix.command-export }}" -ArgumentList '--headless -e --quit'
Wait-Process -Id $proc.id -Timeout 300
$proc = Start-Process -NoNewWindow -PassThru -FilePath "${{ matrix.command-export }}" -ArgumentList '--headless --export-release "${{ matrix.export-preset }}" ${{ matrix.export-name }}'
Wait-Process -Id $proc.id -Timeout 300
- uses: actions/upload-artifact@v3
with:
name: GDRE_tools-standalone-${{ matrix.platform }}
path: ${{github.workspace}}/modules/gdsdecomp/standalone/.export/*
retention-days: 90
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: "ubuntu-20.04"
permissions:
contents: write
needs: build
steps:
- name: Download Linux artifact
uses: actions/download-artifact@v3
with:
name: GDRE_tools-standalone-linux
path: artifacts/linux
- name: Download MacOS artifact
uses: actions/download-artifact@v3
with:
name: GDRE_tools-standalone-macos
path: artifacts/macos
- name: Download Windows artifact
uses: actions/download-artifact@v3
with:
name: GDRE_tools-standalone-windows
path: artifacts/windows
- name: Zip artifacts
run: |
ls -la artifacts/*
cd artifacts/windows
zip -r9 "../GDRE_tools-${{ github.ref_name }}-windows.zip" *
cd ../..
mv "artifacts/macos/gdre_tools.universal.zip" "artifacts/GDRE_tools-${{ github.ref_name }}-macos.zip"
cd artifacts/linux
zip -r9 "../GDRE_tools-${{ github.ref_name }}-linux.zip" *
- name: Release
uses: nikitalita/[email protected]
with:
files: |
artifacts/GDRE_tools-${{ github.ref_name }}-windows.zip
artifacts/GDRE_tools-${{ github.ref_name }}-macos.zip
artifacts/GDRE_tools-${{ github.ref_name }}-linux.zip