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 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 }} cores=$(nproc) || cores=$(sysctl -n hw.ncpu) [[ -n "${{ inputs.flags }}" ]] && scons_flags="${{ inputs.flags }}" [[ ${{ inputs.target }} == "editor" ]] && scons_flags="${scons_flags//disable_3d=yes/}" # remove disable_3d=yes if editor scons -j$((cores+2)) p=${{ inputs.platform }} target=${{ inputs.target }} use_lto=yes udev=yes $scons_flags strip bin/* || true ls bin echo ::endgroup:: shell: bash