GH: Refactor workflows and use better artifact naming

This commit is contained in:
Serhii Snitsaruk 2023-08-01 17:31:53 +02:00
parent 74bb5ead32
commit fdc0cda9c4
6 changed files with 58 additions and 55 deletions

View File

@ -91,7 +91,14 @@ jobs:
distribution: temurin
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
with:
path: ${{github.workspace}}/.scons_cache/
@ -101,13 +108,6 @@ jobs:
${{env.BIN}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{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
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
@ -152,7 +152,7 @@ jobs:
python-version: 3.x
architecture: x64
- name: Setup scons
- name: Set up scons
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
@ -170,7 +170,8 @@ jobs:
mv bin/android_* out/templates/
ls -l out/*
- uses: geekyeggo/delete-artifact@v2
- name: Delete Android template builds
uses: geekyeggo/delete-artifact@v2
with:
name: android-templates
failOnError: false

View File

@ -93,7 +93,7 @@ jobs:
python-version: '3.x'
architecture: 'x64'
- name: Setup scons
- name: Set up scons
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
@ -104,12 +104,11 @@ jobs:
scons --version
dotnet --info
- name: Setup Vulkan SDK
- name: Set up Vulkan SDK
run: |
sh misc/scripts/install_vulkan_sdk_macos.sh
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
- name: Set up scons cache
uses: actions/cache@v3
with:
path: ${{github.workspace}}/.scons_cache/
@ -144,11 +143,11 @@ jobs:
repository: godotengine/godot
ref: ${{ inputs.godot_treeish }}
- name: Setup Vulkan SDK
- name: Set up Vulkan SDK
run: |
sh misc/scripts/install_vulkan_sdk_macos.sh
- name: Fetch templates artifact
- name: Download templates artifact
uses: actions/download-artifact@v3
with:
name: ios-templates
@ -177,13 +176,14 @@ jobs:
ls -l ${{github.workspace}}/out/*
- name: Upload templates bundle
- name: Upload template bundle
uses: actions/upload-artifact@v3
with:
name: godot.limboai.export-templates
path: out/*
- uses: geekyeggo/delete-artifact@v2
- name: Delete templates artifact
uses: geekyeggo/delete-artifact@v2
with:
name: ios-templates
failOnError: false

View File

@ -136,8 +136,7 @@ jobs:
./relocate-sdk.sh
cd ..
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
- name: Set up scons cache
uses: actions/cache@v3
with:
path: ${{github.workspace}}/.scons_cache/
@ -165,12 +164,18 @@ jobs:
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
- name: Prepare artifact
env:
OUTDIR: ${{ startsWith(matrix.target, 'template') && 'out/templates' || 'out/' }}
run: |
strip ./bin/godot.*
chmod +x ./bin/godot.*
mkdir -p ${{env.OUTDIR}}
mv ./bin/godot.* ${{env.OUTDIR}}
- name: Upload artifact
uses: actions/upload-artifact@v3
env:
BUILD_NAME: godot.limboai.${{matrix.target}}.linux.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
with:
name: godot.limboai.${{matrix.target}}.linux.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
path: bin/*
name: ${{ startsWith(matrix.target, 'template') && 'godot.limboai.export_templates' || env.BUILD_NAME }}
path: out/*

View File

@ -121,28 +121,25 @@ jobs:
steps:
# Clone Godot
- uses: actions/checkout@v3
- name: Clone Godot
uses: actions/checkout@v3
with:
repository: godotengine/godot
ref: ${{ inputs.godot_treeish }}
# Clone LimboAI module
- uses: actions/checkout@v3
- name: Clone LimboAI module
uses: actions/checkout@v3
with:
path: modules/limboai
ref: ${{ inputs.limboai_treeish }}
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
- name: Setup scons
- name: Set up scons
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
@ -153,12 +150,11 @@ jobs:
scons --version
dotnet --info
- name: Setup Vulkan SDK
- name: Set up Vulkan SDK
run: |
sh misc/scripts/install_vulkan_sdk_macos.sh
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
- name: Set up scons cache
uses: actions/cache@v3
with:
path: ${{github.workspace}}/.scons_cache/
@ -210,7 +206,7 @@ jobs:
repository: godotengine/godot
ref: ${{ inputs.godot_treeish }}
- name: Fetch editor artifact
- name: Download editor artifact
uses: actions/download-artifact@v3
with:
name: macos-editor
@ -235,7 +231,7 @@ jobs:
name: godot.limboai.editor.macos.universal
path: out/editor/*
- name: Fetch templates artifact
- name: Download templates artifact
uses: actions/download-artifact@v3
with:
name: macos-templates
@ -243,6 +239,7 @@ jobs:
- name: Make templates bundle
run: |
rm -rf out/
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_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
uses: actions/upload-artifact@v3
with:
name: godot.limboai.templates.macos.universal
path: out/templates/*
name: godot.limboai.export-templates
path: out/*

View File

@ -80,15 +80,14 @@ jobs:
run: |
emcc -v
- name: Setup scons
- name: Set up scons
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
python --version
scons --version
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
- name: Set up scons cache
uses: actions/cache@v3
with:
path: ${{github.workspace}}/.scons_cache/
@ -116,5 +115,5 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: godot.limboai.${{matrix.target}}.web
path: out/templates/*
name: godot.limboai.export-templates
path: out/*

View File

@ -102,39 +102,35 @@ jobs:
BIN: godot.windows.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
steps:
# Clone Godot
- uses: actions/checkout@v3
- name: Clone Godot
uses: actions/checkout@v3
with:
repository: godotengine/godot
ref: ${{ inputs.godot_treeish }}
# Clone LimboAI module
- uses: actions/checkout@v3
- name: Clone LimboAI module
uses: actions/checkout@v3
with:
path: modules/limboai
ref: ${{ inputs.limboai_treeish }}
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
- name: Setup scons
- 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: Setup MSVC problem matcher
- name: Set up MSVC problem matcher
uses: ammaraskar/msvc-problem-matcher@master
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
- name: Set up scons cache
uses: actions/cache@v3
with:
path: ${{github.workspace}}/.scons_cache/
@ -161,11 +157,16 @@ jobs:
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
- name: Prepare artifact
env:
OUTDIR: ${{ startsWith(matrix.target, 'template') && 'out/templates' || 'out/' }}
run: |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
Move-Item -Path bin/* -Destination ${{env.OUTDIR}}
- name: Upload artifact
uses: actions/upload-artifact@v3
env:
BUILD_NAME: godot.limboai.${{matrix.target}}.windows.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
with:
name: godot.limboai.${{matrix.target}}.windows.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
path: bin/*
name: ${{ startsWith(matrix.target, 'template') && 'godot.limboai.export_templates' || env.BUILD_NAME }}
path: out/*