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: on:
workflow_call: 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: workflow_dispatch:
inputs:
# push: godot_treeish:
# branches: [ github-workflows ] 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 # Global Settings
env: 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 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_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_CLI_TELEMETRY_OPTOUT: true
@ -95,13 +106,13 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
repository: godotengine/godot repository: godotengine/godot
ref: ${{ env.GODOT_TREEISH }} ref: ${{ inputs.godot_treeish }}
# Clone limboai module # Clone limboai module
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
path: modules/limboai path: modules/limboai
ref: ${{ env.LIMBOAI_TREEISH }} ref: ${{ inputs.limboai_treeish }}
# About sed see: https://github.com/godotengine/buildroot/issues/6 # About sed see: https://github.com/godotengine/buildroot/issues/6
- name: Setup buildroot x86_64 - name: Setup buildroot x86_64
@ -150,7 +161,7 @@ jobs:
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ env.BIN }} name: godot.limboai.${{matrix.target}}.linux.${{matrix.arch}}
path: bin/* path: bin/*

View File

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

View File

@ -1,10 +1,15 @@
name: 🔗 GHA name: 🔗 GHA
on: on:
workflow_dispatch: workflow_dispatch:
inputs:
# push: godot_treeish:
# branches: [ github-workflows ] 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: jobs:
# android-build: # android-build:
@ -18,14 +23,23 @@ jobs:
linux-build: linux-build:
name: 🐧 Linux name: 🐧 Linux
uses: ./.github/workflows/linux.yml uses: ./.github/workflows/linux.yml
with:
godot_treeish: ${{ inputs.godot_treeish }}
limboai_treeish: ${{ inputs.limboai_treeish }}
macos-build: macos-build:
name: 🍎 macOS name: 🍎 macOS
uses: ./.github/workflows/macos.yml uses: ./.github/workflows/macos.yml
with:
godot_treeish: ${{ inputs.godot_treeish }}
limboai_treeish: ${{ inputs.limboai_treeish }}
windows-build: windows-build:
name: 🪟 Windows name: 🪟 Windows
uses: ./.github/workflows/windows.yml uses: ./.github/workflows/windows.yml
with:
godot_treeish: ${{ inputs.godot_treeish }}
limboai_treeish: ${{ inputs.limboai_treeish }}
# web-build: # web-build:
# name: 🌐 Web # name: 🌐 Web

View File

@ -1,21 +1,32 @@
name: 🪟 Windows builds name: 🪟 Windows builds
on: on:
workflow_call: 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: workflow_dispatch:
inputs:
# push: godot_treeish:
# branches: [ github-workflows ] 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 # Global Settings
env: env:
GODOT_TREEISH: 4.1.1-stable
LIMBOAI_TREEISH: master
VERSION_STRING: 4.1.1-limboai+dev
SCONS_CACHE_MSVC_CONFIG: true SCONS_CACHE_MSVC_CONFIG: true
SCONS_CACHE_LIMIT: 4096 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_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_CLI_TELEMETRY_OPTOUT: true
@ -95,13 +106,13 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
repository: godotengine/godot repository: godotengine/godot
ref: ${{ env.GODOT_TREEISH }} ref: ${{ inputs.godot_treeish }}
# Clone LimboAI module # Clone LimboAI module
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
path: modules/limboai path: modules/limboai
ref: ${{ env.LIMBOAI_TREEISH }} ref: ${{ inputs.limboai_treeish }}
# Use python 3.x release (works cross platform) # Use python 3.x release (works cross platform)
- name: Set up Python 3.x - name: Set up Python 3.x
@ -145,5 +156,5 @@ jobs:
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ env.BIN }} name: godot.limboai.${{matrix.target}}.windows.${{matrix.arch}}
path: bin/* path: bin/*