GHA: Fix inputs in test_builds.yml

This commit is contained in:
Serhii Snitsaruk 2024-01-13 19:25:38 +01:00
parent c875f9d5d6
commit 46cd946d35
1 changed files with 30 additions and 27 deletions

View File

@ -10,15 +10,6 @@ on:
- "**/*.png" - "**/*.png"
- "demo/*" - "demo/*"
- "doc/*" - "doc/*"
inputs:
godot-treeish:
description: A tag, branch or commit hash in the Godot repository.
type: string
default: 4.2.1-stable
godot-cpp-version:
description: Ref in the godot-cpp repository.
type: string
default: 4.2
pull_request: pull_request:
branches: [ master ] branches: [ master ]
@ -28,15 +19,11 @@ on:
- "**/*.png" - "**/*.png"
- "demo/*" - "demo/*"
- "doc/*" - "doc/*"
inputs:
godot-treeish: # Global Settings.
description: A tag, branch or commit hash in the Godot repository. env:
type: string GODOT_REF: "4.2.1-stable"
default: 4.2.1-stable GODOT_CPP_REF: "4.2"
godot-cpp-version:
description: Ref in the godot-cpp repository.
type: string
default: 4.2
jobs: jobs:
unit-tests: unit-tests:
@ -54,7 +41,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: godotengine/godot repository: godotengine/godot
ref: ${{ inputs.godot-treeish }} ref: ${{ env.GODOT_REF }}
- name: Clone LimboAI module - name: Clone LimboAI module
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -76,11 +63,11 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
key: ${{env.BIN}}-${{inputs.godot-treeish}}-${{github.ref}}-${{github.sha}} key: ${{env.BIN}}-${{env.GODOT_REF}}-${{github.ref}}-${{github.sha}}
restore-keys: | restore-keys: |
${{env.BIN}}-${{inputs.godot-treeish}}-${{github.ref}}-${{github.sha}} ${{env.BIN}}-${{env.GODOT_REF}}-${{github.ref}}-${{github.sha}}
${{env.BIN}}-${{inputs.godot-treeish}}-${{github.ref}} ${{env.BIN}}-${{env.GODOT_REF}}-${{github.ref}}
${{env.BIN}}-${{inputs.godot-treeish}} ${{env.BIN}}-${{env.GODOT_REF}}
continue-on-error: true continue-on-error: true
- name: Set up Python 3.x - name: Set up Python 3.x
@ -116,34 +103,50 @@ jobs:
run: | run: |
bin/${{ env.BIN }} --test --headless bin/${{ env.BIN }} --test --headless
cache-env:
runs-on: ubuntu-latest
outputs:
godot-ref: ${{ steps.cache-env.outputs.godot-ref }}
godot-cpp-ref: ${{ steps.cache-env.outputs.godot-cpp-ref }}
steps:
- name: Cache env
id: cache-env
run: |
echo "godot-ref=${GODOT_REF}" >> "$GITHUB_OUTPUT"
echo "godot-cpp-ref=${GODOT_CPP_REF}" >> "$GITHUB_OUTPUT"
linux-test-build: linux-test-build:
name: 🐧 Linux name: 🐧 Linux
needs: cache-env
uses: ./.github/workflows/linux.yml uses: ./.github/workflows/linux.yml
with: with:
godot-treeish: ${{ inputs.godot-treeish }} godot-treeish: ${{ needs.cache-env.outputs.godot-ref }}
limboai-treeish: ${{ github.sha }} limboai-treeish: ${{ github.sha }}
test-build: true test-build: true
windows-test-build: windows-test-build:
name: 🪟 Windows name: 🪟 Windows
needs: cache-env
uses: ./.github/workflows/windows.yml uses: ./.github/workflows/windows.yml
with: with:
godot-treeish: ${{ inputs.godot-treeish }} godot-treeish: ${{ needs.cache-env.outputs.godot-ref }}
limboai-treeish: ${{ github.sha }} limboai-treeish: ${{ github.sha }}
test-build: true test-build: true
macos-test-build: macos-test-build:
name: 🍎 macOS name: 🍎 macOS
needs: cache-env
uses: ./.github/workflows/macos.yml uses: ./.github/workflows/macos.yml
with: with:
godot-treeish: ${{ inputs.godot-treeish }} godot-treeish: ${{ needs.cache-env.outputs.godot-ref }}
limboai-treeish: ${{ github.sha }} limboai-treeish: ${{ github.sha }}
test-build: true test-build: true
gdextension: gdextension:
name: 🔌 GDExtension name: 🔌 GDExtension
needs: cache-env
uses: ./.github/workflows/gdextension.yml uses: ./.github/workflows/gdextension.yml
with: with:
godot-cpp-treeish: 4.2 godot-cpp-treeish: ${{ needs.cache-env.outputs.godot-cpp-ref }}
limboai-treeish: ${{ github.sha }} limboai-treeish: ${{ github.sha }}
test-build: true test-build: true