GH: Refactor workflows to use inputs and better artifact names

This commit is contained in:
Serhii Snitsaruk 2023-07-29 23:16:10 +02:00
parent a195266dde
commit db1bf6a0e0
4 changed files with 67 additions and 35 deletions

View File

@ -1,21 +1,32 @@
name: 🐧 Linux Builds
name: 🐧 Linux builds
on:
workflow_call:
inputs:
godot_treeish:
description: A tag, branch or commit hash in the Godot repository.
type: string
default: master
limboai_treeish:
description: A tag, branch or commit hash in the LimboAI repository.
type: string
default: master
workflow_dispatch:
# push:
# branches: [ github-workflows ]
inputs:
godot_treeish:
description: A tag, branch or commit hash in the Godot repository.
type: string
default: master
limboai_treeish:
description: A tag, branch or commit hash in the LimboAI repository.
type: string
default: master
# Global Settings
env:
GODOT_TREEISH: 4.1.1-stable
LIMBOAI_TREEISH: v0.4.1-stable
VERSION_STRING: 4.1.1-limboai+v0.4.1
SCONS_CACHE_LIMIT: 4096
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
@ -95,13 +106,13 @@ jobs:
- uses: actions/checkout@v3
with:
repository: godotengine/godot
ref: ${{ env.GODOT_TREEISH }}
ref: ${{ inputs.godot_treeish }}
# Clone limboai module
- uses: actions/checkout@v3
with:
path: modules/limboai
ref: ${{ env.LIMBOAI_TREEISH }}
ref: ${{ inputs.limboai_treeish }}
# About sed see: https://github.com/godotengine/buildroot/issues/6
- name: Setup buildroot x86_64
@ -150,7 +161,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.BIN }}
name: godot.limboai.${{matrix.target}}.linux.${{matrix.arch}}
path: bin/*

View File

@ -1,4 +1,4 @@
name: 🍎 macOS
name: 🍎 macOS builds
on:
workflow_call:
inputs:
@ -25,9 +25,8 @@ on:
# Global Settings
env:
SCONS_CACHE_MSVC_CONFIG: true
SCONS_CACHE_LIMIT: 4096
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
@ -192,11 +191,6 @@ jobs:
steps:
# ! REMOVE ME
- name: Test
run: |
ls -l
- name: Clone Godot
uses: actions/checkout@v3
with:
@ -220,6 +214,7 @@ jobs:
mkdir -p out/editor/Godot.app/Contents/MacOS
cp bin/godot.macos.editor.universal out/editor/Godot.app/Contents/MacOS/Godot
chmod +x out/editor/Godot.app/Contents/MacOS/Godot
ls out/editor/
- name: Upload editor bundle
uses: actions/upload-artifact@v3
@ -249,6 +244,7 @@ jobs:
rm bin/*
mkdir -p out/templates/
mv macos.zip out/templates/macos.zip
ls out/templates/
- name: Upload templates bundle
uses: actions/upload-artifact@v3

View File

@ -1,10 +1,15 @@
name: 🔗 GHA
on:
workflow_dispatch:
# push:
# branches: [ github-workflows ]
inputs:
godot_treeish:
description: A tag, branch or commit hash in the Godot repository.
type: string
default: master
limboai_treeish:
description: A tag, branch or commit hash in the LimboAI repository.
type: string
default: master
jobs:
# android-build:
@ -18,14 +23,23 @@ jobs:
linux-build:
name: 🐧 Linux
uses: ./.github/workflows/linux.yml
with:
godot_treeish: ${{ inputs.godot_treeish }}
limboai_treeish: ${{ inputs.limboai_treeish }}
macos-build:
name: 🍎 macOS
uses: ./.github/workflows/macos.yml
with:
godot_treeish: ${{ inputs.godot_treeish }}
limboai_treeish: ${{ inputs.limboai_treeish }}
windows-build:
name: 🪟 Windows
uses: ./.github/workflows/windows.yml
with:
godot_treeish: ${{ inputs.godot_treeish }}
limboai_treeish: ${{ inputs.limboai_treeish }}
# web-build:
# name: 🌐 Web

View File

@ -1,21 +1,32 @@
name: 🪟 Windows builds
on:
workflow_call:
inputs:
godot_treeish:
description: A tag, branch or commit hash in the Godot repository.
type: string
default: master
limboai_treeish:
description: A tag, branch or commit hash in the LimboAI repository.
type: string
default: master
workflow_dispatch:
# push:
# branches: [ github-workflows ]
inputs:
godot_treeish:
description: A tag, branch or commit hash in the Godot repository.
type: string
default: master
limboai_treeish:
description: A tag, branch or commit hash in the LimboAI repository.
type: string
default: master
# Global Settings
env:
GODOT_TREEISH: 4.1.1-stable
LIMBOAI_TREEISH: master
VERSION_STRING: 4.1.1-limboai+dev
SCONS_CACHE_MSVC_CONFIG: true
SCONS_CACHE_LIMIT: 4096
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
@ -95,13 +106,13 @@ jobs:
- uses: actions/checkout@v3
with:
repository: godotengine/godot
ref: ${{ env.GODOT_TREEISH }}
ref: ${{ inputs.godot_treeish }}
# Clone LimboAI module
- uses: actions/checkout@v3
with:
path: modules/limboai
ref: ${{ env.LIMBOAI_TREEISH }}
ref: ${{ inputs.limboai_treeish }}
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
@ -145,5 +156,5 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.BIN }}
name: godot.limboai.${{matrix.target}}.windows.${{matrix.arch}}
path: bin/*