2023-07-29 21:16:10 +00:00
|
|
|
name: 🐧 Linux builds
|
2023-07-28 12:53:10 +00:00
|
|
|
on:
|
|
|
|
workflow_call:
|
2023-07-29 21:16:10 +00:00
|
|
|
inputs:
|
2024-03-10 16:23:59 +00:00
|
|
|
godot-ref:
|
2023-07-29 21:16:10 +00:00
|
|
|
description: A tag, branch or commit hash in the Godot repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
2024-03-10 16:23:59 +00:00
|
|
|
limboai-ref:
|
2023-07-29 21:16:10 +00:00
|
|
|
description: A tag, branch or commit hash in the LimboAI repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
2023-12-29 13:40:10 +00:00
|
|
|
test-build:
|
2023-12-29 14:22:33 +00:00
|
|
|
description: Should we perform only a limited number of test builds?
|
2023-12-29 13:40:10 +00:00
|
|
|
type: boolean
|
|
|
|
default: false
|
2023-07-28 12:53:10 +00:00
|
|
|
|
|
|
|
workflow_dispatch:
|
2023-07-29 21:16:10 +00:00
|
|
|
inputs:
|
2024-03-10 16:23:59 +00:00
|
|
|
godot-ref:
|
2023-07-29 21:16:10 +00:00
|
|
|
description: A tag, branch or commit hash in the Godot repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
2024-03-10 16:23:59 +00:00
|
|
|
limboai-ref:
|
2023-07-29 21:16:10 +00:00
|
|
|
description: A tag, branch or commit hash in the LimboAI repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
2023-12-29 13:40:10 +00:00
|
|
|
test-build:
|
2023-12-29 14:22:33 +00:00
|
|
|
description: Should we perform only a limited number of test builds?
|
2023-12-29 13:40:10 +00:00
|
|
|
type: boolean
|
|
|
|
default: false
|
2023-07-29 09:27:29 +00:00
|
|
|
|
2023-07-28 12:53:10 +00:00
|
|
|
# Global Settings
|
|
|
|
env:
|
|
|
|
SCONS_CACHE_LIMIT: 4096
|
2023-07-29 21:16:10 +00:00
|
|
|
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
|
2023-07-28 12:53:10 +00:00
|
|
|
DOTNET_NOLOGO: true
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
|
|
|
|
|
|
|
jobs:
|
2023-07-28 18:17:48 +00:00
|
|
|
linux-builds:
|
2023-07-28 12:53:10 +00:00
|
|
|
runs-on: "ubuntu-20.04"
|
2023-12-29 13:40:10 +00:00
|
|
|
name: ${{ matrix.opts.name }}
|
2023-07-28 12:53:10 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-12-29 13:40:10 +00:00
|
|
|
opts:
|
2024-07-30 12:16:01 +00:00
|
|
|
# * Standard x86_64
|
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
- name: Editor (x86_64, release)
|
2023-07-28 12:53:10 +00:00
|
|
|
target: editor
|
2023-07-28 17:17:40 +00:00
|
|
|
arch: x86_64
|
2024-03-10 16:23:59 +00:00
|
|
|
dotnet: false
|
2023-12-29 13:40:10 +00:00
|
|
|
should-build: true
|
2023-07-28 12:53:10 +00:00
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
- name: Template (x86_64, release)
|
2023-07-28 14:33:21 +00:00
|
|
|
target: template_release
|
2023-07-28 17:17:40 +00:00
|
|
|
arch: x86_64
|
2024-03-10 16:23:59 +00:00
|
|
|
dotnet: false
|
2023-12-29 13:40:10 +00:00
|
|
|
should-build: true
|
2023-07-28 14:33:21 +00:00
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
- name: Template (x86_64, debug)
|
2023-07-28 14:33:21 +00:00
|
|
|
target: template_debug
|
2023-07-28 17:17:40 +00:00
|
|
|
arch: x86_64
|
2024-03-10 16:23:59 +00:00
|
|
|
dotnet: false
|
2023-12-29 13:40:10 +00:00
|
|
|
should-build: ${{ !inputs.test-build }}
|
2023-07-28 14:33:21 +00:00
|
|
|
|
2024-07-30 12:16:01 +00:00
|
|
|
# * Standard x86_32
|
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
# - name: Editor (x86_32, release)
|
2023-07-28 17:17:40 +00:00
|
|
|
# target: editor
|
|
|
|
# arch: x86_32
|
2024-03-10 16:23:59 +00:00
|
|
|
# dotnet: false
|
2023-12-29 13:40:10 +00:00
|
|
|
# should-build: ${{ !inputs.test-build }}
|
2023-07-28 17:17:40 +00:00
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
- name: Template (x86_32, release)
|
2023-07-28 17:17:40 +00:00
|
|
|
target: template_release
|
|
|
|
arch: x86_32
|
2024-03-10 16:23:59 +00:00
|
|
|
dotnet: false
|
2023-12-29 13:40:10 +00:00
|
|
|
should-build: ${{ !inputs.test-build }}
|
2023-07-28 17:17:40 +00:00
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
- name: Template (x86_32, debug)
|
2023-07-28 17:17:40 +00:00
|
|
|
target: template_debug
|
|
|
|
arch: x86_32
|
2024-03-10 16:23:59 +00:00
|
|
|
dotnet: false
|
2023-12-29 13:40:10 +00:00
|
|
|
should-build: ${{ !inputs.test-build }}
|
2023-07-28 17:17:40 +00:00
|
|
|
|
2024-07-30 12:16:01 +00:00
|
|
|
# * Standard arm64
|
|
|
|
|
|
|
|
- name: Editor (arm64, release)
|
|
|
|
target: editor
|
|
|
|
arch: arm64
|
|
|
|
dotnet: false
|
|
|
|
should-build: ${{ !inputs.test-build }}
|
|
|
|
|
|
|
|
- name: Template (arm64, release)
|
|
|
|
target: template_release
|
|
|
|
arch: arm64
|
|
|
|
dotnet: false
|
|
|
|
should-build: ${{ !inputs.test-build }}
|
|
|
|
|
|
|
|
- name: Template (arm64, debug)
|
|
|
|
target: template_debug
|
|
|
|
arch: arm64
|
|
|
|
dotnet: false
|
|
|
|
should-build: ${{ !inputs.test-build }}
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
# * Standard arm32
|
|
|
|
|
|
|
|
- name: Template (arm32, release)
|
|
|
|
target: template_release
|
|
|
|
arch: arm32
|
|
|
|
dotnet: false
|
|
|
|
should-build: ${{ !inputs.test-build }}
|
|
|
|
|
|
|
|
- name: Template (arm32, debug)
|
|
|
|
target: template_debug
|
|
|
|
arch: arm32
|
|
|
|
dotnet: false
|
|
|
|
should-build: ${{ !inputs.test-build }}
|
|
|
|
|
2024-07-30 12:16:01 +00:00
|
|
|
# * .NET x86_64
|
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
- name: Editor .NET (x86_64, release)
|
2023-07-28 16:51:56 +00:00
|
|
|
target: editor
|
2023-07-28 17:17:40 +00:00
|
|
|
arch: x86_64
|
2024-03-10 16:23:59 +00:00
|
|
|
dotnet: true
|
2024-08-11 10:56:45 +00:00
|
|
|
should-build: true
|
2023-07-28 14:33:21 +00:00
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
- name: Template .NET (x86_64, release)
|
2023-07-28 16:51:56 +00:00
|
|
|
target: template_release
|
2023-07-28 17:17:40 +00:00
|
|
|
arch: x86_64
|
2024-03-10 16:23:59 +00:00
|
|
|
dotnet: true
|
2023-12-29 13:40:10 +00:00
|
|
|
should-build: ${{ !inputs.test-build }}
|
2023-07-28 12:53:10 +00:00
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
- name: Template .NET (x86_64, debug)
|
2023-07-28 16:51:56 +00:00
|
|
|
target: template_debug
|
2023-07-28 17:17:40 +00:00
|
|
|
arch: x86_64
|
2024-03-10 16:23:59 +00:00
|
|
|
dotnet: true
|
2023-12-29 13:40:10 +00:00
|
|
|
should-build: ${{ !inputs.test-build }}
|
2023-07-28 14:33:21 +00:00
|
|
|
|
2024-07-30 12:16:01 +00:00
|
|
|
# * .NET x86_32
|
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
# - name: Editor .NET (x86_32, release)
|
2023-07-28 17:17:40 +00:00
|
|
|
# target: editor
|
|
|
|
# arch: x86_32
|
2024-03-10 16:23:59 +00:00
|
|
|
# dotnet: true
|
2023-12-29 13:40:10 +00:00
|
|
|
# should-build: ${{ !inputs.test-build }}
|
2023-07-28 17:17:40 +00:00
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
- name: Template .NET (x86_32, release)
|
2023-07-28 17:17:40 +00:00
|
|
|
target: template_release
|
|
|
|
arch: x86_32
|
2024-03-10 16:23:59 +00:00
|
|
|
dotnet: true
|
2023-12-29 13:40:10 +00:00
|
|
|
should-build: ${{ !inputs.test-build }}
|
2023-07-28 17:17:40 +00:00
|
|
|
|
2023-07-29 21:29:21 +00:00
|
|
|
- name: Template .NET (x86_32, debug)
|
2023-07-28 17:17:40 +00:00
|
|
|
target: template_debug
|
|
|
|
arch: x86_32
|
2024-03-10 16:23:59 +00:00
|
|
|
dotnet: true
|
2023-12-29 13:40:10 +00:00
|
|
|
should-build: ${{ !inputs.test-build }}
|
|
|
|
|
2024-07-30 12:16:01 +00:00
|
|
|
# * .NET arm64
|
|
|
|
|
2024-07-31 08:43:56 +00:00
|
|
|
# ! FIXME: Needs a separate job for .NET glue generation since we can't execute arm64 binaries on x86_64.
|
|
|
|
# ! Alternatively, solution generation can be done as post-process job, taking the glue from x86_64, after all builds complete.
|
|
|
|
# - name: Editor .NET (arm64, release)
|
|
|
|
# target: editor
|
|
|
|
# arch: arm64
|
|
|
|
# dotnet: true
|
|
|
|
# should-build: ${{ !inputs.test-build }}
|
2024-07-30 12:16:01 +00:00
|
|
|
|
|
|
|
- name: Template .NET (arm64, release)
|
|
|
|
target: template_release
|
|
|
|
arch: arm64
|
|
|
|
dotnet: true
|
|
|
|
should-build: ${{ !inputs.test-build }}
|
|
|
|
|
|
|
|
- name: Template .NET (arm64, debug)
|
|
|
|
target: template_debug
|
|
|
|
arch: arm64
|
|
|
|
dotnet: true
|
|
|
|
should-build: ${{ !inputs.test-build }}
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
# * .NET arm32
|
|
|
|
|
|
|
|
- name: Template .NET (arm32, release)
|
|
|
|
target: template_release
|
|
|
|
arch: arm32
|
|
|
|
dotnet: true
|
|
|
|
should-build: ${{ !inputs.test-build }}
|
|
|
|
|
|
|
|
- name: Template .NET (arm32, debug)
|
|
|
|
target: template_debug
|
|
|
|
arch: arm32
|
|
|
|
dotnet: true
|
|
|
|
should-build: ${{ !inputs.test-build }}
|
|
|
|
|
2023-12-29 13:40:10 +00:00
|
|
|
exclude:
|
2024-03-10 13:24:56 +00:00
|
|
|
- { opts: { should-build: false } }
|
2023-07-29 09:27:29 +00:00
|
|
|
|
|
|
|
env:
|
2024-03-10 16:23:59 +00:00
|
|
|
BIN: godot.linuxbsd.${{matrix.opts.target}}.${{matrix.opts.arch}}${{ matrix.opts.dotnet == true && '.mono' || '' }}
|
2023-07-28 14:33:21 +00:00
|
|
|
|
2023-07-28 12:53:10 +00:00
|
|
|
steps:
|
2023-08-01 08:25:13 +00:00
|
|
|
- name: Clone Godot
|
2023-11-09 14:07:29 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-07-28 12:53:10 +00:00
|
|
|
with:
|
|
|
|
repository: godotengine/godot
|
2024-03-10 16:23:59 +00:00
|
|
|
ref: ${{ inputs.godot-ref }}
|
2023-07-28 12:53:10 +00:00
|
|
|
|
2023-08-01 08:25:13 +00:00
|
|
|
- name: Clone LimboAI module
|
2023-11-09 14:07:29 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-07-28 12:53:10 +00:00
|
|
|
with:
|
|
|
|
path: modules/limboai
|
2024-03-10 16:23:59 +00:00
|
|
|
ref: ${{ inputs.limboai-ref }}
|
2023-07-28 12:53:10 +00:00
|
|
|
|
2023-08-02 16:50:17 +00:00
|
|
|
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
|
|
|
|
- uses: ./modules/limboai/.github/actions/init-version
|
|
|
|
|
2024-05-25 08:16:40 +00:00
|
|
|
- name: Set up Linux toolchain
|
|
|
|
uses: ./modules/limboai/.github/actions/setup-linux-toolchain
|
|
|
|
with:
|
|
|
|
arch: ${{matrix.opts.arch}}
|
2023-07-28 18:17:48 +00:00
|
|
|
|
2024-07-01 12:58:05 +00:00
|
|
|
- name: Set up Wayland deps
|
|
|
|
run: |
|
|
|
|
sudo apt-get install libwayland-dev
|
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Set up scons cache
|
2024-03-10 13:24:56 +00:00
|
|
|
uses: actions/cache@v4
|
2023-07-31 20:45:24 +00:00
|
|
|
with:
|
|
|
|
path: ${{github.workspace}}/.scons_cache/
|
2024-03-10 16:23:59 +00:00
|
|
|
key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
|
2023-07-31 20:45:24 +00:00
|
|
|
restore-keys: |
|
2024-03-10 16:23:59 +00:00
|
|
|
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
|
|
|
|
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}
|
|
|
|
${{env.BIN}}-${{inputs.godot-ref}}
|
2023-07-31 20:45:24 +00:00
|
|
|
|
2023-07-28 16:51:56 +00:00
|
|
|
- name: Compilation
|
2023-07-28 12:53:10 +00:00
|
|
|
env:
|
|
|
|
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
|
|
run: |
|
2023-07-28 18:17:48 +00:00
|
|
|
PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH
|
2024-03-10 16:23:59 +00:00
|
|
|
scons platform=linuxbsd target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.dotnet}} ${{env.SCONSFLAGS}}
|
2023-07-28 16:51:56 +00:00
|
|
|
|
|
|
|
- name: Generate C# glue
|
2024-03-10 16:23:59 +00:00
|
|
|
if: matrix.opts.dotnet && matrix.opts.target == 'editor'
|
2023-08-02 22:17:50 +00:00
|
|
|
env:
|
|
|
|
GODOT_VERSION_STATUS: limboai
|
2023-07-28 16:51:56 +00:00
|
|
|
run: |
|
2023-07-29 09:27:29 +00:00
|
|
|
./bin/$BIN --headless --generate-mono-glue ./modules/mono/glue || true
|
2023-07-28 16:51:56 +00:00
|
|
|
|
|
|
|
- name: Build .NET solutions
|
2024-03-10 16:23:59 +00:00
|
|
|
if: matrix.opts.dotnet && matrix.opts.target == 'editor'
|
2023-08-02 22:17:50 +00:00
|
|
|
env:
|
|
|
|
GODOT_VERSION_STATUS: limboai
|
2023-07-28 16:51:56 +00:00
|
|
|
run: |
|
|
|
|
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
|
2023-07-28 12:53:10 +00:00
|
|
|
|
2023-07-28 18:17:48 +00:00
|
|
|
- name: Prepare artifact
|
2023-08-01 15:31:53 +00:00
|
|
|
env:
|
2023-12-29 13:40:10 +00:00
|
|
|
OUTDIR: ${{ startsWith(matrix.opts.target, 'template') && 'out/templates' || 'out/' }}
|
2023-07-28 18:17:48 +00:00
|
|
|
run: |
|
|
|
|
chmod +x ./bin/godot.*
|
2023-08-01 15:31:53 +00:00
|
|
|
mkdir -p ${{env.OUTDIR}}
|
2023-09-16 11:27:15 +00:00
|
|
|
mv bin/* ${{env.OUTDIR}}
|
2023-09-14 07:36:36 +00:00
|
|
|
ls -R out/
|
|
|
|
|
2023-12-16 13:03:34 +00:00
|
|
|
# Zipping the editor artifact to retain executable bit;
|
|
|
|
# workaround for: https://github.com/actions/upload-artifact/issues/38
|
|
|
|
- name: Zip the editor artifact
|
2023-12-29 13:40:10 +00:00
|
|
|
if: matrix.opts.target == 'editor'
|
2023-12-16 13:03:34 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
pushd out/
|
|
|
|
zip -r godot-limboai.editor.linux.zip *
|
|
|
|
rm godot.*
|
2024-03-11 12:46:48 +00:00
|
|
|
rm -rf GodotSharp/
|
2023-12-16 13:03:34 +00:00
|
|
|
echo -e "## Why another ZIP inside?\n\nWorkaround for: https://github.com/actions/upload-artifact/issues/38\n" > README.md
|
|
|
|
popd
|
|
|
|
|
2023-09-14 07:36:36 +00:00
|
|
|
- name: Rename templates
|
2023-12-29 13:40:10 +00:00
|
|
|
if: startsWith(matrix.opts.target, 'template')
|
2023-09-14 07:36:36 +00:00
|
|
|
env:
|
2023-12-29 13:40:10 +00:00
|
|
|
BUILD_TYPE: ${{ endsWith(matrix.opts.target, 'release') && 'release' || 'debug' }}
|
2023-09-14 07:36:36 +00:00
|
|
|
run: |
|
2023-12-29 13:40:10 +00:00
|
|
|
mv out/templates/${BIN} out/templates/linux_${BUILD_TYPE}.${{matrix.opts.arch}}
|
2023-11-29 13:32:30 +00:00
|
|
|
echo "${GODOT_VERSION}.limboai+${LIMBOAI_VERSION}" > out/templates/version.txt
|
2023-09-14 07:36:36 +00:00
|
|
|
ls -R out/
|
2023-07-28 18:17:48 +00:00
|
|
|
|
|
|
|
- name: Upload artifact
|
2024-03-10 16:23:59 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-07-28 12:53:10 +00:00
|
|
|
with:
|
2024-03-10 16:23:59 +00:00
|
|
|
name: ${{env.NAME_PREFIX}}${{matrix.opts.dotnet == true && '.dotnet' || ''}}.${{matrix.opts.target}}.linux.${{matrix.opts.arch}}
|
2023-08-01 15:31:53 +00:00
|
|
|
path: out/*
|