GH: Refactor workflows and use better artifact naming
This commit is contained in:
parent
74bb5ead32
commit
fdc0cda9c4
|
@ -91,7 +91,14 @@ jobs:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 11
|
java-version: 11
|
||||||
|
|
||||||
- name: Set up cache
|
- name: Set up scons
|
||||||
|
run: |
|
||||||
|
python -c "import sys; print(sys.version)"
|
||||||
|
python -m pip install scons==4.4.0
|
||||||
|
python --version
|
||||||
|
scons --version
|
||||||
|
|
||||||
|
- name: Set up scons cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
path: ${{github.workspace}}/.scons_cache/
|
||||||
|
@ -101,13 +108,6 @@ jobs:
|
||||||
${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||||
${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}
|
${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}
|
||||||
|
|
||||||
- name: Set up scons
|
|
||||||
run: |
|
|
||||||
python -c "import sys; print(sys.version)"
|
|
||||||
python -m pip install scons==4.4.0
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
- name: Compilation
|
- name: Compilation
|
||||||
env:
|
env:
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
||||||
|
@ -170,7 +170,8 @@ jobs:
|
||||||
mv bin/android_* out/templates/
|
mv bin/android_* out/templates/
|
||||||
ls -l out/*
|
ls -l out/*
|
||||||
|
|
||||||
- uses: geekyeggo/delete-artifact@v2
|
- name: Delete Android template builds
|
||||||
|
uses: geekyeggo/delete-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: android-templates
|
name: android-templates
|
||||||
failOnError: false
|
failOnError: false
|
||||||
|
|
|
@ -108,8 +108,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sh misc/scripts/install_vulkan_sdk_macos.sh
|
sh misc/scripts/install_vulkan_sdk_macos.sh
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
- name: Set up scons cache
|
||||||
- name: Load .scons_cache directory
|
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
path: ${{github.workspace}}/.scons_cache/
|
||||||
|
@ -148,7 +147,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sh misc/scripts/install_vulkan_sdk_macos.sh
|
sh misc/scripts/install_vulkan_sdk_macos.sh
|
||||||
|
|
||||||
- name: Fetch templates artifact
|
- name: Download templates artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ios-templates
|
name: ios-templates
|
||||||
|
@ -177,13 +176,14 @@ jobs:
|
||||||
|
|
||||||
ls -l ${{github.workspace}}/out/*
|
ls -l ${{github.workspace}}/out/*
|
||||||
|
|
||||||
- name: Upload templates bundle
|
- name: Upload template bundle
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: godot.limboai.export-templates
|
name: godot.limboai.export-templates
|
||||||
path: out/*
|
path: out/*
|
||||||
|
|
||||||
- uses: geekyeggo/delete-artifact@v2
|
- name: Delete templates artifact
|
||||||
|
uses: geekyeggo/delete-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ios-templates
|
name: ios-templates
|
||||||
failOnError: false
|
failOnError: false
|
||||||
|
|
|
@ -136,8 +136,7 @@ jobs:
|
||||||
./relocate-sdk.sh
|
./relocate-sdk.sh
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
- name: Set up scons cache
|
||||||
- name: Load .scons_cache directory
|
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
path: ${{github.workspace}}/.scons_cache/
|
||||||
|
@ -165,12 +164,18 @@ jobs:
|
||||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
|
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
|
||||||
|
|
||||||
- name: Prepare artifact
|
- name: Prepare artifact
|
||||||
|
env:
|
||||||
|
OUTDIR: ${{ startsWith(matrix.target, 'template') && 'out/templates' || 'out/' }}
|
||||||
run: |
|
run: |
|
||||||
strip ./bin/godot.*
|
strip ./bin/godot.*
|
||||||
chmod +x ./bin/godot.*
|
chmod +x ./bin/godot.*
|
||||||
|
mkdir -p ${{env.OUTDIR}}
|
||||||
|
mv ./bin/godot.* ${{env.OUTDIR}}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
env:
|
||||||
|
BUILD_NAME: godot.limboai.${{matrix.target}}.linux.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
||||||
with:
|
with:
|
||||||
name: godot.limboai.${{matrix.target}}.linux.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
name: ${{ startsWith(matrix.target, 'template') && 'godot.limboai.export_templates' || env.BUILD_NAME }}
|
||||||
path: bin/*
|
path: out/*
|
||||||
|
|
|
@ -121,25 +121,22 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Clone Godot
|
- name: Clone Godot
|
||||||
- uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: godotengine/godot
|
repository: godotengine/godot
|
||||||
ref: ${{ inputs.godot_treeish }}
|
ref: ${{ inputs.godot_treeish }}
|
||||||
|
|
||||||
# Clone LimboAI module
|
- name: Clone LimboAI module
|
||||||
- uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: modules/limboai
|
path: modules/limboai
|
||||||
ref: ${{ inputs.limboai_treeish }}
|
ref: ${{ inputs.limboai_treeish }}
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform)
|
|
||||||
- name: Set up Python 3.x
|
- name: Set up Python 3.x
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
architecture: 'x64'
|
||||||
|
|
||||||
- name: Set up scons
|
- name: Set up scons
|
||||||
|
@ -157,8 +154,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sh misc/scripts/install_vulkan_sdk_macos.sh
|
sh misc/scripts/install_vulkan_sdk_macos.sh
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
- name: Set up scons cache
|
||||||
- name: Load .scons_cache directory
|
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
path: ${{github.workspace}}/.scons_cache/
|
||||||
|
@ -210,7 +206,7 @@ jobs:
|
||||||
repository: godotengine/godot
|
repository: godotengine/godot
|
||||||
ref: ${{ inputs.godot_treeish }}
|
ref: ${{ inputs.godot_treeish }}
|
||||||
|
|
||||||
- name: Fetch editor artifact
|
- name: Download editor artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: macos-editor
|
name: macos-editor
|
||||||
|
@ -235,7 +231,7 @@ jobs:
|
||||||
name: godot.limboai.editor.macos.universal
|
name: godot.limboai.editor.macos.universal
|
||||||
path: out/editor/*
|
path: out/editor/*
|
||||||
|
|
||||||
- name: Fetch templates artifact
|
- name: Download templates artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: macos-templates
|
name: macos-templates
|
||||||
|
@ -243,6 +239,7 @@ jobs:
|
||||||
|
|
||||||
- name: Make templates bundle
|
- name: Make templates bundle
|
||||||
run: |
|
run: |
|
||||||
|
rm -rf out/
|
||||||
ls bin/
|
ls bin/
|
||||||
lipo -create bin/godot.macos.template_release.x86_64 bin/godot.macos.template_release.arm64 -output bin/godot.macos.template_release.universal
|
lipo -create bin/godot.macos.template_release.x86_64 bin/godot.macos.template_release.arm64 -output bin/godot.macos.template_release.universal
|
||||||
lipo -create bin/godot.macos.template_debug.x86_64 bin/godot.macos.template_debug.arm64 -output bin/godot.macos.template_debug.universal
|
lipo -create bin/godot.macos.template_debug.x86_64 bin/godot.macos.template_debug.arm64 -output bin/godot.macos.template_debug.universal
|
||||||
|
@ -268,5 +265,5 @@ jobs:
|
||||||
- name: Upload templates bundle
|
- name: Upload templates bundle
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: godot.limboai.templates.macos.universal
|
name: godot.limboai.export-templates
|
||||||
path: out/templates/*
|
path: out/*
|
||||||
|
|
|
@ -87,8 +87,7 @@ jobs:
|
||||||
python --version
|
python --version
|
||||||
scons --version
|
scons --version
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
- name: Set up scons cache
|
||||||
- name: Load .scons_cache directory
|
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
path: ${{github.workspace}}/.scons_cache/
|
||||||
|
@ -116,5 +115,5 @@ jobs:
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: godot.limboai.${{matrix.target}}.web
|
name: godot.limboai.export-templates
|
||||||
path: out/templates/*
|
path: out/*
|
||||||
|
|
|
@ -102,25 +102,22 @@ jobs:
|
||||||
BIN: godot.windows.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
BIN: godot.windows.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Clone Godot
|
- name: Clone Godot
|
||||||
- uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: godotengine/godot
|
repository: godotengine/godot
|
||||||
ref: ${{ inputs.godot_treeish }}
|
ref: ${{ inputs.godot_treeish }}
|
||||||
|
|
||||||
# Clone LimboAI module
|
- name: Clone LimboAI module
|
||||||
- uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: modules/limboai
|
path: modules/limboai
|
||||||
ref: ${{ inputs.limboai_treeish }}
|
ref: ${{ inputs.limboai_treeish }}
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform)
|
|
||||||
- name: Set up Python 3.x
|
- name: Set up Python 3.x
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
architecture: 'x64'
|
||||||
|
|
||||||
- name: Set up scons
|
- name: Set up scons
|
||||||
|
@ -133,8 +130,7 @@ jobs:
|
||||||
- name: Set up MSVC problem matcher
|
- name: Set up MSVC problem matcher
|
||||||
uses: ammaraskar/msvc-problem-matcher@master
|
uses: ammaraskar/msvc-problem-matcher@master
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
- name: Set up scons cache
|
||||||
- name: Load .scons_cache directory
|
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
path: ${{github.workspace}}/.scons_cache/
|
||||||
|
@ -161,11 +157,16 @@ jobs:
|
||||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
|
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
|
||||||
|
|
||||||
- name: Prepare artifact
|
- name: Prepare artifact
|
||||||
|
env:
|
||||||
|
OUTDIR: ${{ startsWith(matrix.target, 'template') && 'out/templates' || 'out/' }}
|
||||||
run: |
|
run: |
|
||||||
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
||||||
|
Move-Item -Path bin/* -Destination ${{env.OUTDIR}}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
env:
|
||||||
|
BUILD_NAME: godot.limboai.${{matrix.target}}.windows.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
||||||
with:
|
with:
|
||||||
name: godot.limboai.${{matrix.target}}.windows.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
name: ${{ startsWith(matrix.target, 'template') && 'godot.limboai.export_templates' || env.BUILD_NAME }}
|
||||||
path: bin/*
|
path: out/*
|
||||||
|
|
Loading…
Reference in New Issue