OverviewFilesCommitsIssuesDocsReleasesPeers

nvidia-rtx-godot / .github / actions / godot-build / action.yml

43 lines · yaml ref:
name: Build Godot
description: Build Godot with the provided options.

inputs:
  target:
    description: Build target (editor, template_release, template_debug).
    default: editor
    type: choice
    options: [editor, template_debug, template_release]
  platform:
    description: Target platform.
    type: string
  scons-flags:
    description: Additional SCons flags.
    type: string
  scons-cache:
    description: The SCons cache path.
    default: ${{ github.workspace }}/.scons_cache/
    type: string

runs:
  using: composite
  steps:
    - name: SCons Build
      shell: sh
      run: |
        echo "Building with flags:" platform=${{ inputs.platform }} target=${{ inputs.target }} ${{ inputs.scons-flags }} "cache_path=${{ inputs.scons-cache }}" redirect_build_objects=no

        if [ "${{ inputs.target }}" != "editor" ]; then
          # Ensure we don't include editor code in export template builds.
          rm -rf editor
        fi

        if [ "${{ github.event.number }}" != "" ]; then
          # Set build identifier with pull request number if available. This is displayed throughout the editor.
          export BUILD_NAME="gh-${{ github.event.number }}"
        else
          export BUILD_NAME="gh"
        fi

        scons platform=${{ inputs.platform }} target=${{ inputs.target }} ${{ inputs.scons-flags }} "cache_path=${{ inputs.scons-cache }}" redirect_build_objects=no
        ls -l bin/