name: Build godot description: Builds godot with a certain version and certain flags inputs: platform: description: Platform to build for required: true flags: description: Flags to pass to the build script required: false target: description: Target (template_release, template_debug, editor) required: true tools: description: Tools! default: "no" runs: using: "composite" steps: - name: Setup uses: bend-n/godot-builds/.github/actions/setup@main with: ref: ${{ env.ref }} - name: Install linux dependencies if: inputs.platform == 'linuxbsd' run: | echo ::group::Dependencies sudo apt-get update -q sudo apt-get install -qqq \ 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 \ libspeechd-dev speech-dispatcher \ tree echo ::endgroup:: shell: bash - name: Setup 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="${{ env.flags }} ${{ inputs.flags }} tools=${{ inputs.tools }}" cores=$(nproc) || cores=$(sysctl -n hw.ncpu) [[ ${{ inputs.tools }} == "yes" ]] && scons_flags="${scons_flags//disable_3d=yes/}" # remove disable_3d=yes if editor [[ ${{ inputs.tools }} == "yes" ]] && scons_flags="$scons_flags debug_symbols=no" [[ ${{ inputs.target }} ]] && scons_flags="$scons_flags deprecated=no" scons -j$((cores+2)) p=${{ inputs.platform }} target=${{ inputs.target }} verbose=yes udev=yes dev_build=no lto=auto $scons_flags echo "compile done" [[ ${{ inputs.target}} != "editor" ]] && strip -v bin/* || true ls bin echo ::endgroup:: shell: bash