CI: Add `runner` workflow to call other workflows
parent
6facde3c29
commit
c1524f7c86
|
@ -3,19 +3,22 @@ description: Restore Godot build cache.
|
||||||
inputs:
|
inputs:
|
||||||
cache-name:
|
cache-name:
|
||||||
description: The cache base name (job name by default).
|
description: The cache base name (job name by default).
|
||||||
default: "${{github.job}}"
|
default: ${{ github.job }}
|
||||||
scons-cache:
|
scons-cache:
|
||||||
description: The scons cache path.
|
description: The SCons cache path.
|
||||||
default: "${{github.workspace}}/.scons-cache/"
|
default: ${{ github.workspace }}/.scons-cache/
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Restore .scons_cache directory
|
- name: Restore SCons cache directory
|
||||||
uses: actions/cache/restore@v3
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ inputs.scons-cache }}
|
path: ${{ inputs.scons-cache }}
|
||||||
key: ${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
|
key: ${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
|
||||||
|
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
|
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
|
||||||
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}
|
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}
|
||||||
|
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-refs/heads/${{ env.GODOT_BASE_BRANCH }}
|
||||||
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}
|
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}
|
||||||
|
|
|
@ -3,12 +3,13 @@ description: Save Godot build cache.
|
||||||
inputs:
|
inputs:
|
||||||
cache-name:
|
cache-name:
|
||||||
description: The cache base name (job name by default).
|
description: The cache base name (job name by default).
|
||||||
default: "${{github.job}}"
|
default: ${{ github.job }}
|
||||||
scons-cache:
|
scons-cache:
|
||||||
description: The SCons cache path.
|
description: The SCons cache path.
|
||||||
default: "${{github.workspace}}/.scons-cache/"
|
default: ${{ github.workspace }}/.scons-cache/
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Save SCons cache directory
|
- name: Save SCons cache directory
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
name: Continuous integration
|
name: Continuous integration
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Only used for the cache key. Increment version to force clean build.
|
# Only used for the cache key. Increment version to force clean build.
|
||||||
|
@ -91,7 +92,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
|
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
|
||||||
EM_VERSION: 3.1.39
|
EM_VERSION: 3.1.39
|
||||||
EM_CACHE_FOLDER: "emsdk-cache"
|
EM_CACHE_FOLDER: emsdk-cache
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -108,24 +109,24 @@ jobs:
|
||||||
- name: Set up Python (for SCons)
|
- name: Set up Python (for SCons)
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: 3.x
|
||||||
|
|
||||||
- name: Android dependencies
|
- name: Android dependencies
|
||||||
if: ${{ matrix.platform == 'android' }}
|
if: matrix.platform == 'android'
|
||||||
uses: nttld/setup-ndk@v1
|
uses: nttld/setup-ndk@v1
|
||||||
with:
|
with:
|
||||||
ndk-version: r23c
|
ndk-version: r23c
|
||||||
link-to-sdk: true
|
link-to-sdk: true
|
||||||
|
|
||||||
- name: Web dependencies
|
- name: Web dependencies
|
||||||
if: ${{ matrix.platform == 'web' }}
|
if: matrix.platform == 'web'
|
||||||
uses: mymindstorm/setup-emsdk@v14
|
uses: mymindstorm/setup-emsdk@v14
|
||||||
with:
|
with:
|
||||||
version: ${{ env.EM_VERSION }}
|
version: ${{ env.EM_VERSION }}
|
||||||
actions-cache-folder: ${{ env.EM_CACHE_FOLDER }}
|
actions-cache-folder: ${{ env.EM_CACHE_FOLDER }}
|
||||||
|
|
||||||
- name: Setup MinGW for Windows/MinGW build
|
- name: Setup MinGW for Windows/MinGW build
|
||||||
if: ${{ matrix.platform == 'windows' && matrix.flags == 'use_mingw=yes' }}
|
if: matrix.platform == 'windows' && matrix.flags == 'use_mingw=yes'
|
||||||
uses: egor-tensin/setup-mingw@v2
|
uses: egor-tensin/setup-mingw@v2
|
||||||
with:
|
with:
|
||||||
version: 12.2.0
|
version: 12.2.0
|
||||||
|
@ -161,7 +162,7 @@ jobs:
|
||||||
|
|
||||||
- name: Download latest Godot artifacts
|
- name: Download latest Godot artifacts
|
||||||
uses: dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
|
uses: dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
|
||||||
if: ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
|
if: matrix.run-tests && env.GODOT_TEST_VERSION == 'master'
|
||||||
with:
|
with:
|
||||||
repo: godotengine/godot
|
repo: godotengine/godot
|
||||||
branch: master
|
branch: master
|
||||||
|
@ -175,13 +176,13 @@ jobs:
|
||||||
path: godot-artifacts
|
path: godot-artifacts
|
||||||
|
|
||||||
- name: Prepare Godot artifacts for testing
|
- name: Prepare Godot artifacts for testing
|
||||||
if: ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
|
if: matrix.run-tests && env.GODOT_TEST_VERSION == 'master'
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono
|
chmod +x ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono
|
||||||
echo "GODOT=$(pwd)/godot-artifacts/godot.linuxbsd.editor.x86_64.mono" >> $GITHUB_ENV
|
echo "GODOT=$(pwd)/godot-artifacts/godot.linuxbsd.editor.x86_64.mono" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Download requested Godot version for testing
|
- name: Download requested Godot version for testing
|
||||||
if: ${{ matrix.run-tests && env.GODOT_TEST_VERSION != 'master' }}
|
if: matrix.run-tests && env.GODOT_TEST_VERSION != 'master'
|
||||||
run: |
|
run: |
|
||||||
wget "https://github.com/godotengine/godot-builds/releases/download/${GODOT_TEST_VERSION}/Godot_v${GODOT_TEST_VERSION}_linux.x86_64.zip" -O Godot.zip
|
wget "https://github.com/godotengine/godot-builds/releases/download/${GODOT_TEST_VERSION}/Godot_v${GODOT_TEST_VERSION}_linux.x86_64.zip" -O Godot.zip
|
||||||
unzip -a Godot.zip
|
unzip -a Godot.zip
|
||||||
|
@ -189,7 +190,7 @@ jobs:
|
||||||
echo "GODOT=$(pwd)/Godot_v${GODOT_TEST_VERSION}_linux.x86_64" >> $GITHUB_ENV
|
echo "GODOT=$(pwd)/Godot_v${GODOT_TEST_VERSION}_linux.x86_64" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
if: ${{ matrix.run-tests }}
|
if: matrix.run-tests
|
||||||
run: |
|
run: |
|
||||||
$GODOT --headless --version
|
$GODOT --headless --version
|
||||||
cd test
|
cd test
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
name: 🔗 GHA
|
||||||
|
on: [push, pull_request, merge_group]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-runner
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# First stage: Only static checks, fast and prevent expensive builds from running.
|
||||||
|
|
||||||
|
static-checks:
|
||||||
|
if: '!vars.DISABLE_GODOT_CI'
|
||||||
|
name: 📊 Static Checks
|
||||||
|
uses: ./.github/workflows/static_checks.yml
|
||||||
|
|
||||||
|
# Second stage: Run all the builds and some of the tests.
|
||||||
|
|
||||||
|
ci:
|
||||||
|
name: 🛠️ Continuous Integration
|
||||||
|
needs: static-checks
|
||||||
|
uses: ./.github/workflows/ci.yml
|
|
@ -1,5 +1,6 @@
|
||||||
name: 📊 Static Checks
|
name: 📊 Static Checks
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-static
|
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-static
|
||||||
|
|
Loading…
Reference in New Issue