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 flags: description: Flags to pass to the build script required: false target: description: Target (release, release_debug, debug) 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 }} == "x11" run: | [[ ${{ inputs.platform }} != "x11" ]] && exit 0 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 shell: bash - name: Setup scons run: pip install scons shell: bash - name: Build Godot run: | cd godot scons_flags=$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 strip bin/* || true ls bin shell: bash