builds godot
Diffstat (limited to '.github/actions/build-godot/action.yml')
-rw-r--r--.github/actions/build-godot/action.yml29
1 files changed, 18 insertions, 11 deletions
diff --git a/.github/actions/build-godot/action.yml b/.github/actions/build-godot/action.yml
index 8c84607..e30436e 100644
--- a/.github/actions/build-godot/action.yml
+++ b/.github/actions/build-godot/action.yml
@@ -2,10 +2,6 @@ name: Build godot
description: Builds godot with a certain version and certain flags
inputs:
- url:
- description: Godot git url
- default: https://github.com/godotengine/godot
- required: true
platform:
description: Platform to build for
required: true
@@ -13,21 +9,21 @@ inputs:
description: Flags to pass to the build script
required: false
target:
- description: Target (release, release_debug, debug)
+ description: Target (template_release, template_debug, editor)
required: true
runs:
using: "composite"
steps:
- name: Setup
- uses: bend-n/godot-builds/.github/actions/setup@main
+ uses: bend-n/godot-builds/.github/actions/[email protected]
with:
ref: ${{ env.ref }}
- name: Install linux dependencies
- if: ${{ inputs.platform }} == "x11"
+ if: inputs.platform == 'linuxbsd'
run: |
- [[ ${{ inputs.platform }} != "x11" ]] && exit 0
+ echo ::group::Dependencies
sudo apt-get update -q
sudo apt-get install -qqq \
build-essential pkg-config libx11-dev libxcursor-dev \
@@ -35,19 +31,30 @@ runs:
libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm \
libspeechd-dev speech-dispatcher \
tree
+ echo ::endgroup::
shell: bash
- name: Setup scons
- run: pip install scons
+ run: pip install --force-reinstall -v "scons==4.4.0"
shell: bash
+ - name: Download more ram
+ if: runner.os == 'Linux'
+ uses: pierotofy/set-swap-space@master
+ with:
+ swap-size-gb: 10
+
- name: Build Godot
run: |
+ echo ::group::Compilation
cd godot
- scons_flags=$flags
+ scons_flags=${{ env.flags }}
cores=$(nproc) || cores=$(sysctl -n hw.ncpu)
[[ -n "${{ inputs.flags }}" ]] && scons_flags="${{ inputs.flags }}"
- scons -j$((cores+2)) p=${{ inputs.platform }} tools=$tools target=${{ inputs.target }} use_lto=yes udev=yes $scons_flags
+ [[ ${{ env.tools }} == "yes" ]] && scons_flags="${scons_flags//disable_3d=yes/}" # remove disable_3d=yes if editor
+ echo "Running `scons -j$((cores+2)) p=${{ inputs.platform }} target=${{ inputs.target }} use_lto=yes udev=yes tools=${{ env.tools }} $scons_flags`"
+ scons -j$((cores+2)) p=${{ inputs.platform }} target=${{ inputs.target }} use_lto=yes udev=yes "tools=${{ env.tools }}" $scons_flags
strip bin/* || true
ls bin
+ echo ::endgroup::
shell: bash