Merge branch 'github-workflows'

This commit is contained in:
Serhii Snitsaruk 2023-08-03 15:25:36 +02:00
commit f94dfe9365
7 changed files with 75 additions and 13 deletions

21
.github/actions/init-version/action.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Setup version
runs:
using: "composite"
steps:
- name: Set GODOT_VERSION & LIMBOAI_VERSION
shell: bash
run: |
echo "GODOT_VERSION=$( (git describe --tags --exact-match HEAD || git rev-parse --short HEAD) | sed 's/\(.*\)-\(.*\)/\1/g' )" >> "$GITHUB_ENV"
cd modules/limboai
echo "LIMBOAI_VERSION=$( (git describe --tags --exact-match HEAD || git rev-parse --short HEAD) | sed 's/\(.*\)-\(.*\)/\1/g' )" >> "$GITHUB_ENV"
- name: Set NAME_PREFIX
shell: bash
run: echo "NAME_PREFIX=godot-${GODOT_VERSION}.limboai+${LIMBOAI_VERSION}" >> "$GITHUB_ENV"
- name: Set GODOT_VERSION_STATUS & BUILD_NAME
shell: bash
run: |
echo "GODOT_VERSION_STATUS=limboai+${LIMBOAI_VERSION}" >> "$GITHUB_ENV"
echo "BUILD_NAME=gha" >> "$GITHUB_ENV"

View File

@ -28,7 +28,6 @@ env:
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}}
jobs:
android-builds:
@ -86,6 +85,9 @@ jobs:
path: modules/limboai
ref: ${{ inputs.limboai-treeish }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
- name: Set up Java 11
uses: actions/setup-java@v3
with:
@ -135,6 +137,15 @@ jobs:
repository: godotengine/godot
ref: ${{ inputs.godot-treeish }}
- name: Clone LimboAI module
uses: actions/checkout@v3
with:
path: modules/limboai
ref: ${{ inputs.limboai-treeish }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
- name: Download Android template builds
uses: actions/download-artifact@v3
with:

View File

@ -29,7 +29,6 @@ env:
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}}
jobs:
@ -90,6 +89,9 @@ jobs:
path: modules/limboai
ref: ${{ inputs.limboai-treeish }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
@ -146,6 +148,15 @@ jobs:
repository: godotengine/godot
ref: ${{ inputs.godot-treeish }}
- name: Clone LimboAI module
uses: actions/checkout@v3
with:
path: modules/limboai
ref: ${{ inputs.limboai-treeish }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
- name: Set up Vulkan SDK
run: |
sh misc/scripts/install_vulkan_sdk_macos.sh

View File

@ -28,7 +28,6 @@ env:
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}}
jobs:
linux-builds:
@ -102,12 +101,6 @@ jobs:
BIN: godot.linuxbsd.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
steps:
- name: Dump environment
env:
ENVI: ${{ toJson(env) }}
run: |
echo "$ENVI"
- name: Clone Godot
uses: actions/checkout@v3
with:
@ -120,6 +113,9 @@ jobs:
path: modules/limboai
ref: ${{ inputs.limboai-treeish }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
# About sed see: https://github.com/godotengine/buildroot/issues/6
- name: Set up buildroot x86_64
if: matrix.arch == 'x86_64'
@ -161,11 +157,15 @@ jobs:
- name: Generate C# glue
if: matrix.build-mono && matrix.target == 'editor'
env:
GODOT_VERSION_STATUS: limboai
run: |
./bin/$BIN --headless --generate-mono-glue ./modules/mono/glue || true
- name: Build .NET solutions
if: matrix.build-mono && matrix.target == 'editor'
env:
GODOT_VERSION_STATUS: limboai
run: |
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd

View File

@ -29,7 +29,6 @@ env:
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}}
jobs:
macos-builds:
@ -133,6 +132,9 @@ jobs:
path: modules/limboai
ref: ${{ inputs.limboai-treeish }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
@ -206,6 +208,15 @@ jobs:
repository: godotengine/godot
ref: ${{ inputs.godot-treeish }}
- name: Clone LimboAI module
uses: actions/checkout@v3
with:
path: modules/limboai
ref: ${{ inputs.limboai-treeish }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
- name: Download editor artifact
uses: actions/download-artifact@v3
with:

View File

@ -29,7 +29,6 @@ env:
SCONSFLAGS: use_static_cpp=yes debug_symbols=no lto=thin optimize=size verbose=yes warnings=extra werror=yes tests=no
EM_VERSION: 3.1.18
EM_CACHE_FOLDER: "emsdk-cache"
NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}}
jobs:
web-builds:
@ -71,6 +70,9 @@ jobs:
path: modules/limboai
ref: ${{ inputs.limboai-treeish }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
- name: Set up Emscripten latest
uses: mymindstorm/setup-emsdk@v12
with:

View File

@ -29,7 +29,6 @@ env:
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NAME_PREFIX: godot.${{inputs.godot-treeish}}.limboai+${{inputs.limboai-treeish}}
jobs:
windows-builds:
@ -115,6 +114,9 @@ jobs:
path: modules/limboai
ref: ${{ inputs.limboai-treeish }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
@ -149,13 +151,17 @@ jobs:
- name: Generate C# glue
if: matrix.build-mono && matrix.target == 'editor'
env:
GODOT_VERSION_STATUS: limboai
run: |
./bin/${{ env.BIN }} --headless --generate-mono-glue ./modules/mono/glue || true
- name: Build .NET solutions
if: matrix.build-mono && matrix.target == 'editor'
env:
GODOT_VERSION_STATUS: limboai
run: |
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
python ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
- name: Prepare artifact
shell: bash