Skip to content

Commit

Permalink
Linux4 ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin committed May 29, 2024
1 parent ef23ca1 commit 826fef3
Show file tree
Hide file tree
Showing 2 changed files with 233 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/linux4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
# Global Settings
env:
GODOT_BASE_BRANCH: master
SCONSFLAGS: dev_build=yes CCFLAGS="-fpie" LINKFLAGS="-no-pie"
SCONSFLAGS: dev_build=yes

jobs:
build-godot4:
Expand Down
232 changes: 232 additions & 0 deletions .github/workflows/linux44.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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-24.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"

0 comments on commit 826fef3

Please sign in to comment.