-
Notifications
You must be signed in to change notification settings - Fork 2
232 lines (201 loc) · 12.3 KB
/
linux4.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: 🐧 Linux Builds 4
on:
push:
pull_request:
schedule:
- cron: '0 23 * * *'
# Global Settings
env:
GODOT_BASE_BRANCH: master
SCONSFLAGS: dev_build=yes
jobs:
build-godot4:
runs-on: "ubuntu-22.04"
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: Editor Mono Sanitizers
cache-name: linux4-editor-mono-sanitizers
target: editor
sconsflags: module_mono_enabled=yes mono_glue=no use_ubsan=yes use_asan=yes tests=yes
build-mono: true
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64.san.mono
- name: Editor Sanitizers
cache-name: linux4-editor-sanitizers
target: editor
sconsflags: use_ubsan=yes use_asan=yes tests=yes
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64.san
- name: Editor Sanitizers Optimized
cache-name: linux4-editor-sanitizers-optimized
target: editor
sconsflags: use_ubsan=yes use_asan=yes tests=yes CCFLAGS="-O2"
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64.san
- name: Editor64 Sanitizers
cache-name: linux4-editor64-sanitizers
target: editor
sconsflags: use_ubsan=yes use_asan=yes tests=yes float=64
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64.san
- name: Template Release Sanitizers
cache-name: linux4-template-sanitizers
target: template_release
sconsflags: use_ubsan=yes use_asan=yes optimize=none
artifact: true
bin: godot.linuxbsd.template_release.dev.x86_64.san
- name: Editor Mono Normal
cache-name: linux4-editor-mono-normal
target: editor
sconsflags: module_mono_enabled=yes mono_glue=no tests=yes
build-mono: true
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64.mono
- name: Editor Normal
cache-name: linux4-editor-normal
target: editor
sconsflags: tests=yes CCFLAGS="-O2"
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64
- name: Editor64 Normal
cache-name: linux4-editor64-normal
target: editor
sconsflags: tests=yes float=64
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64
- name: Template Release Normal
cache-name: linux4-template-normal
target: template_release
sconsflags: optimize=none
artifact: true
bin: godot.linuxbsd.template_release.dev.x86_64
- name: Editor Minimal
cache-name: linux4-editor-minimal
target: editor
sconsflags: module_navigation_enabled=no module_gdscript_enabled=no module_basis_universal_enabled=no module_bmp_enabled=no module_camera_enabled=no module_csg_enabled=no module_cvtt_enabled=no module_dds_enabled=no module_denoise_enabled=no module_enet_enabled=no module_etcpak_enabled=no brotli=no module_glslang_enabled=no module_gltf_enabled=no module_gridmap_enabled=no module_hdr_enabled=no module_jpg_enabled=no module_jsonrpc_enabled=no module_lightmapper_rd_enabled=no module_mbedtls_enabled=no module_meshoptimizer_enabled=no module_minimp3_enabled=no module_mobile_vr_enabled=no module_msdfgen_enabled=no module_multiplayer_enabled=no module_noise_enabled=no module_ogg_enabled=no module_openxr_enabled=no module_raycast_enabled=no module_regex_enabled=no module_squish_enabled=no graphite=no module_text_server_adv_enabled=no module_tga_enabled=no module_theora_enabled=no module_tinyexr_enabled=no module_upnp_enabled=no module_vhacd_enabled=no module_vorbis_enabled=no module_webp_enabled=no module_webrtc_enabled=no module_websocket_enabled=no module_webxr_enabled=no module_xatlas_unwrap_enabled=no
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64
- name: Editor Minimal Sanitizers
cache-name: linux4-editor-minimal-sanitizers
target: editor
sconsflags: module_navigation_enabled=no module_gdscript_enabled=no module_basis_universal_enabled=no module_bmp_enabled=no module_camera_enabled=no module_csg_enabled=no module_cvtt_enabled=no module_dds_enabled=no module_denoise_enabled=no module_enet_enabled=no module_etcpak_enabled=no brotli=no module_glslang_enabled=no module_gltf_enabled=no module_gridmap_enabled=no module_hdr_enabled=no module_jpg_enabled=no module_jsonrpc_enabled=no module_lightmapper_rd_enabled=no module_mbedtls_enabled=no module_meshoptimizer_enabled=no module_minimp3_enabled=no module_mobile_vr_enabled=no module_msdfgen_enabled=no module_multiplayer_enabled=no module_noise_enabled=no module_ogg_enabled=no module_openxr_enabled=no module_raycast_enabled=no module_regex_enabled=no module_squish_enabled=no graphite=no module_text_server_adv_enabled=no module_tga_enabled=no module_theora_enabled=no module_tinyexr_enabled=no module_upnp_enabled=no module_vhacd_enabled=no module_vorbis_enabled=no module_webp_enabled=no module_webrtc_enabled=no module_websocket_enabled=no module_webxr_enabled=no module_xatlas_unwrap_enabled=no use_ubsan=yes use_asan=yes
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64.san
# module_navigation_enabled=no - crash
# module_gdscript_enabled=no, wanna to run scripts
# module_freetype_enabled=no - cannot compile editor without it
# brotli=no module_msdfgen_enabled=no graphite=no module_text_server_adv_enabled=no - text in editor
# module_svg_enabled=no - crashes when running - cannot be disabled in editor
- name: Editor Minimal Usable
cache-name: linux4-editor-minimal-usable
target: editor
sconsflags: module_basis_universal_enabled=no module_bmp_enabled=no module_camera_enabled=no module_csg_enabled=no module_cvtt_enabled=no module_dds_enabled=no module_denoise_enabled=no module_enet_enabled=no module_etcpak_enabled=no module_glslang_enabled=no module_gltf_enabled=no module_gridmap_enabled=no module_hdr_enabled=no module_jpg_enabled=no module_jsonrpc_enabled=no module_lightmapper_rd_enabled=no module_mbedtls_enabled=no module_meshoptimizer_enabled=no module_minimp3_enabled=no module_mobile_vr_enabled=no module_multiplayer_enabled=no module_noise_enabled=no module_ogg_enabled=no module_openxr_enabled=no module_raycast_enabled=no module_regex_enabled=no module_squish_enabled=no module_tga_enabled=no module_theora_enabled=no module_tinyexr_enabled=no module_upnp_enabled=no module_vhacd_enabled=no module_vorbis_enabled=no module_webp_enabled=no module_webrtc_enabled=no module_websocket_enabled=no module_webxr_enabled=no module_xatlas_unwrap_enabled=no
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64
- name: Editor Minimal Usable Sanitizers
cache-name: linux4-editor-minimal-usable-sanitizers
target: editor
sconsflags: module_basis_universal_enabled=no module_bmp_enabled=no module_camera_enabled=no module_csg_enabled=no module_cvtt_enabled=no module_dds_enabled=no module_denoise_enabled=no module_enet_enabled=no module_etcpak_enabled=no module_glslang_enabled=no module_gltf_enabled=no module_gridmap_enabled=no module_hdr_enabled=no module_jpg_enabled=no module_jsonrpc_enabled=no module_lightmapper_rd_enabled=no module_mbedtls_enabled=no module_meshoptimizer_enabled=no module_minimp3_enabled=no module_mobile_vr_enabled=no module_multiplayer_enabled=no module_noise_enabled=no module_ogg_enabled=no module_openxr_enabled=no module_raycast_enabled=no module_regex_enabled=no module_squish_enabled=no module_tga_enabled=no module_theora_enabled=no module_tinyexr_enabled=no module_upnp_enabled=no module_vhacd_enabled=no module_vorbis_enabled=no module_webp_enabled=no module_webrtc_enabled=no module_websocket_enabled=no module_webxr_enabled=no module_xatlas_unwrap_enabled=no use_ubsan=yes use_asan=yes
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64.san
- name: Editor Thread Sanitizer
cache-name: linux4-editor-thread-sanitizer
target: editor
sconsflags: tests=yes use_llvm=yes use_tsan=yes debug_symbols=yes module_lightmapper_rd_enabled=no module_mobile_vr_enabled=no module_webp_enabled=no module_raycast_enabled=no module_mobile_vr_enabled=no linker=gold CCFLAGS="-O2"
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64.llvm.san
- name: Editor Memory Sanitizer
cache-name: linux4-editor-memory-sanitizer
target: editor
sconsflags: use_llvm=yes use_msan=yes udev=no fontconfig=no linker=gold # Disable udev because memory sanitizer finds invalid memory usage inside udev library
artifact: true
bin: godot.linuxbsd.editor.dev.x86_64.llvm.san
# - name: Editor Mono Sanitizers LLVM
# cache-name: linux4-editor-mono-sanitizers-llvm
# target: editor
# tests: false
# sconsflags: module_mono_enabled=yes mono_glue=no use_ubsan=yes use_asan=yes use_llvm=yes
# build-mono: true
# bin: "./bin/godot.linuxbsd.tools.64.llvms.mono"
# artifact: true
#
# - name: Editor Sanitizers LLVM
# cache-name: linux4-editor-sanitizers-llvm
# target: editor
# tests: false
# sconsflags: use_ubsan=yes use_asan=yes use_llvm=yes
# artifact: true
#
# - name: Template Release Sanitizers LLVM
# cache-name: linux4-template-sanitizers-llvm
# target: template_release
# tests: false
# sconsflags: use_ubsan=yes use_asan=yes use_llvm=yes optimize=none
# artifact: true
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: godotengine/godot
ref: ${{ env.GODOT_BASE_BRANCH }}
path: godot
- name: Linux dependencies
shell: bash
run: |
# Azure repositories are not reliable, we need to prevent azure giving us packages.
# sudo rm -f /etc/apt/sources.list.d/*
# sudo cp -f misc/ci/sources.list /etc/apt/sources.list
sudo apt-get update
# The actual dependencies
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true
- name: Setup python and scons
uses: ./.github/actions/godot-deps
- name: Compilation
run: |
ls
cd godot
scons ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} target=${{ matrix.target }} -j2
cd ..
# Generate mono glue
- name: Mono Glue Generator
if: ${{ matrix.build-mono }}
run: |
cd godot
bin/${{ matrix.bin }} --headless --generate-mono-glue modules/mono/glue || true
cd ..
# Rebuild with mono
- name: Compilation Mono Glue
if: ${{ matrix.build-mono }}
run: |
cd godot
scons ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} target=${{ matrix.target }} mono_glue=yes -j2
ls bin/
cd ..
# - name: Upload artifact
# uses: ./.github/actions/upload-artifact
# if: ${{ matrix.artifact }}
# with:
# name: ${{ matrix.cache-name }}
# - name: Rename from bin to cache-name
- name: Pack files
run: |
cd godot/bin
time 7z a "${{ matrix.cache-name }}.7z" "${{ matrix.bin }}"
cd ../..
# mv "godot/bin/${{ matrix.bin }}" "godot/bin/${{ matrix.cache-name }}"
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: "Nightly"
# cacbin/${{ matrix.cache-name }}
files: "godot/bin/${{ matrix.cache-name }}.7z"