In the github runner, deprecate float-precision and build-target-type parameters in favour of scons-arguments and cache-key parameters. This allows the runner to be used when passing more arguments that aren't covered explicitly, making it more future-proof.
parent
c85d165399
commit
36dd577585
|
@ -8,12 +8,20 @@ inputs:
|
||||||
arch:
|
arch:
|
||||||
required: true
|
required: true
|
||||||
description: Target architecture.
|
description: Target architecture.
|
||||||
|
scons-arguments:
|
||||||
|
default: ''
|
||||||
|
description: Additional space-separated arguments to pass to the scons build command.
|
||||||
|
cache-key:
|
||||||
|
default: ''
|
||||||
|
description: Key to use for caches. This input is used in paths and should not contain POSIX incompatible characters.
|
||||||
float-precision:
|
float-precision:
|
||||||
default: 'single'
|
|
||||||
description: Float precision (single or double).
|
description: Float precision (single or double).
|
||||||
|
required: false
|
||||||
|
deprecationMessage: Use the scons-arguments (and cache-key) parameters instead. This parameter will continue to work until removed.
|
||||||
build-target-type:
|
build-target-type:
|
||||||
default: 'template_debug'
|
required: false
|
||||||
description: Build type (template_debug or template_release).
|
description: Build type (template_debug or template_release).
|
||||||
|
deprecationMessage: Use the scons-arguments (and cache-key) parameters instead. This parameter will continue to work until removed.
|
||||||
scons-cache:
|
scons-cache:
|
||||||
default: '.scons-cache/'
|
default: '.scons-cache/'
|
||||||
description: Scons cache folder name, relative to each scons directory. Must not contain relative path signifiers (. or ..). Must be a transparent path part (empty or 'path/to/directory/', ending in a slash).
|
description: Scons cache folder name, relative to each scons directory. Must not contain relative path signifiers (. or ..). Must be a transparent path part (empty or 'path/to/directory/', ending in a slash).
|
||||||
|
@ -70,7 +78,7 @@ runs:
|
||||||
uses: mymindstorm/setup-emsdk@v13
|
uses: mymindstorm/setup-emsdk@v13
|
||||||
with:
|
with:
|
||||||
version: ${{ inputs.em_version }}
|
version: ${{ inputs.em_version }}
|
||||||
actions-cache-folder: ${{ inputs.em-cache-directory }}.${{ inputs.float-precision }}.${{ inputs.build-target-type }}
|
actions-cache-folder: ${{ inputs.em-cache-directory }}.${{ inputs.float-precision }}.${{ inputs.build-target-type }}${{ inputs.cache-key }}
|
||||||
- name: Web - Verify Emscripten setup
|
- name: Web - Verify Emscripten setup
|
||||||
if: ${{ inputs.platform == 'web' }}
|
if: ${{ inputs.platform == 'web' }}
|
||||||
shell: sh
|
shell: sh
|
||||||
|
@ -103,12 +111,12 @@ runs:
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
${{ github.workspace }}/${{ inputs.gdextension-directory }}${{ inputs.scons-cache }}
|
${{ github.workspace }}/${{ inputs.gdextension-directory }}${{ inputs.scons-cache }}
|
||||||
key: ${{ inputs.platform }}_${{ inputs.arch }}_${{ inputs.float-precision }}_${{ inputs.build-target-type }}_cache
|
key: ${{ inputs.platform }}_${{ inputs.arch }}_${{ inputs.float-precision }}_${{ inputs.build-target-type }}${{ inputs.cache-key }}_cache
|
||||||
# Build gdextension
|
# Build gdextension
|
||||||
- name: Build GDExtension Debug Build
|
- name: Build GDExtension Debug Build
|
||||||
shell: sh
|
shell: sh
|
||||||
env:
|
env:
|
||||||
SCONS_CACHE: ${{ github.workspace }}/${{ inputs.gdextension-directory }}${{ inputs.scons-cache }}
|
SCONS_CACHE: ${{ github.workspace }}/${{ inputs.gdextension-directory }}${{ inputs.scons-cache }}
|
||||||
run: |
|
run: |
|
||||||
scons target=${{ inputs.build-target-type }} platform=${{ inputs.platform }} arch=${{ inputs.arch }} precision=${{ inputs.float-precision }}
|
scons platform=${{ inputs.platform }} arch=${{ inputs.arch }} ${{ inputs.float-precision && 'precision=' || '' }}${{ inputs.float-precision }} ${{ inputs.build-target-type && 'target=' || '' }}${{ inputs.build-target-type }} ${{ inputs.scons-arguments }}
|
||||||
working-directory: ${{ inputs.gdextension-directory }}
|
working-directory: ${{ inputs.gdextension-directory }}
|
||||||
|
|
|
@ -14,247 +14,247 @@ jobs:
|
||||||
include:
|
include:
|
||||||
# Debug templates
|
# Debug templates
|
||||||
- platform: linux
|
- platform: linux
|
||||||
float-precision: single
|
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
target-type: template_debug
|
scons-arguments: target=template_debug
|
||||||
|
cache-key: .template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: windows
|
- platform: windows
|
||||||
float-precision: single
|
|
||||||
arch: x86_32
|
arch: x86_32
|
||||||
target-type: template_debug
|
scons-arguments: target=template_debug
|
||||||
|
cache-key: .template_debug
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
||||||
- platform: windows
|
- platform: windows
|
||||||
float-precision: single
|
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
target-type: template_debug
|
scons-arguments: target=template_debug
|
||||||
|
cache-key: .template_debug
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
||||||
- platform: macos
|
- platform: macos
|
||||||
float-precision: single
|
|
||||||
arch: universal
|
arch: universal
|
||||||
target-type: template_debug
|
scons-arguments: target=template_debug
|
||||||
|
cache-key: .template_debug
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: single
|
|
||||||
arch: arm64
|
arch: arm64
|
||||||
target-type: template_debug
|
scons-arguments: target=template_debug
|
||||||
|
cache-key: .template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: single
|
|
||||||
arch: arm32
|
arch: arm32
|
||||||
target-type: template_debug
|
scons-arguments: target=template_debug
|
||||||
|
cache-key: .template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: single
|
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
target-type: template_debug
|
scons-arguments: target=template_debug
|
||||||
|
cache-key: .template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: single
|
|
||||||
arch: x86_32
|
arch: x86_32
|
||||||
target-type: template_debug
|
scons-arguments: target=template_debug
|
||||||
|
cache-key: .template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: ios
|
- platform: ios
|
||||||
float-precision: single
|
|
||||||
arch: arm64
|
arch: arm64
|
||||||
target-type: template_debug
|
scons-arguments: target=template_debug
|
||||||
|
cache-key: .template_debug
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
|
|
||||||
- platform: web
|
- platform: web
|
||||||
float-precision: single
|
|
||||||
arch: wasm32
|
arch: wasm32
|
||||||
target-type: template_debug
|
scons-arguments: target=template_debug
|
||||||
|
cache-key: .template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
# Release templates
|
# Release templates
|
||||||
- platform: linux
|
- platform: linux
|
||||||
float-precision: single
|
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
target-type: template_release
|
scons-arguments: target=template_release
|
||||||
|
cache-key: .template_release
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
# - platform: windows
|
# - platform: windows
|
||||||
# float-precision: single
|
|
||||||
# arch: x86_32
|
# arch: x86_32
|
||||||
# target-type: template_release
|
# scons-arguments: target=template_release
|
||||||
|
# cache-key: .template_release
|
||||||
# os: windows-latest
|
# os: windows-latest
|
||||||
|
|
||||||
# - platform: windows
|
# - platform: windows
|
||||||
# float-precision: single
|
|
||||||
# arch: x86_64
|
# arch: x86_64
|
||||||
# target-type: template_release
|
# scons-arguments: target=template_release
|
||||||
|
# cache-key: .template_release
|
||||||
# os: windows-latest
|
# os: windows-latest
|
||||||
|
|
||||||
# - platform: macos
|
# - platform: macos
|
||||||
# float-precision: single
|
|
||||||
# arch: universal
|
# arch: universal
|
||||||
# target-type: template_release
|
# scons-arguments: target=template_release
|
||||||
|
# cache-key: .template_release
|
||||||
# os: macos-latest
|
# os: macos-latest
|
||||||
|
|
||||||
# - platform: android
|
# - platform: android
|
||||||
# float-precision: single
|
|
||||||
# arch: arm64
|
# arch: arm64
|
||||||
# target-type: template_release
|
# scons-arguments: target=template_release
|
||||||
|
# cache-key: .template_release
|
||||||
# os: ubuntu-20.04
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
# - platform: android
|
# - platform: android
|
||||||
# float-precision: single
|
|
||||||
# arch: arm32
|
# arch: arm32
|
||||||
# target-type: template_release
|
# scons-arguments: target=template_release
|
||||||
|
# cache-key: .template_release
|
||||||
# os: ubuntu-20.04
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
# - platform: android
|
# - platform: android
|
||||||
# float-precision: single
|
|
||||||
# arch: x86_64
|
# arch: x86_64
|
||||||
# target-type: template_release
|
# scons-arguments: target=template_release
|
||||||
|
# cache-key: .template_release
|
||||||
# os: ubuntu-20.04
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
# - platform: android
|
# - platform: android
|
||||||
# float-precision: single
|
|
||||||
# arch: x86_32
|
# arch: x86_32
|
||||||
# target-type: template_release
|
# scons-arguments: target=template_release
|
||||||
|
# cache-key: .template_release
|
||||||
# os: ubuntu-20.04
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
# - platform: ios
|
# - platform: ios
|
||||||
# float-precision: single
|
|
||||||
# arch: arm64
|
# arch: arm64
|
||||||
# target-type: template_release
|
# scons-arguments: target=template_release
|
||||||
|
# cache-key: .template_release
|
||||||
# os: macos-latest
|
# os: macos-latest
|
||||||
|
|
||||||
# - platform: web
|
# - platform: web
|
||||||
# float-precision: single
|
|
||||||
# arch: wasm32
|
# arch: wasm32
|
||||||
# target-type: template_release
|
# scons-arguments: target=template_release
|
||||||
|
# cache-key: .template_release
|
||||||
# os: ubuntu-20.04
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
# Double precision templates
|
# Double precision templates
|
||||||
# Double precision debug templates
|
# Double precision debug templates
|
||||||
- platform: linux
|
- platform: linux
|
||||||
float-precision: double
|
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
target-type: template_debug
|
scons-arguments: precision=double target=template_debug
|
||||||
|
cache-key: .double.template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: windows
|
- platform: windows
|
||||||
float-precision: double
|
|
||||||
arch: x86_32
|
arch: x86_32
|
||||||
target-type: template_debug
|
scons-arguments: precision=double target=template_debug
|
||||||
|
cache-key: .double.template_debug
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
||||||
- platform: windows
|
- platform: windows
|
||||||
float-precision: double
|
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
target-type: template_debug
|
scons-arguments: precision=double target=template_debug
|
||||||
|
cache-key: .double.template_debug
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
||||||
- platform: macos
|
- platform: macos
|
||||||
float-precision: double
|
|
||||||
arch: universal
|
arch: universal
|
||||||
target-type: template_debug
|
scons-arguments: precision=double target=template_debug
|
||||||
|
cache-key: .double.template_debug
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: double
|
|
||||||
arch: arm64
|
arch: arm64
|
||||||
target-type: template_debug
|
scons-arguments: precision=double target=template_debug
|
||||||
|
cache-key: .double.template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: double
|
|
||||||
arch: arm32
|
arch: arm32
|
||||||
target-type: template_debug
|
scons-arguments: precision=double target=template_debug
|
||||||
|
cache-key: .double.template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: double
|
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
target-type: template_debug
|
scons-arguments: precision=double target=template_debug
|
||||||
|
cache-key: .double.template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: double
|
|
||||||
arch: x86_32
|
arch: x86_32
|
||||||
target-type: template_debug
|
scons-arguments: precision=double target=template_debug
|
||||||
|
cache-key: .double.template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: ios
|
- platform: ios
|
||||||
float-precision: double
|
|
||||||
arch: arm64
|
arch: arm64
|
||||||
target-type: template_debug
|
scons-arguments: precision=double target=template_debug
|
||||||
|
cache-key: .double.template_debug
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
|
|
||||||
- platform: web
|
- platform: web
|
||||||
float-precision: double
|
|
||||||
arch: wasm32
|
arch: wasm32
|
||||||
target-type: template_debug
|
scons-arguments: precision=double target=template_debug
|
||||||
|
cache-key: .double.template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
# Double precision release templates
|
# Double precision release templates
|
||||||
- platform: linux
|
- platform: linux
|
||||||
float-precision: double
|
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
target-type: template_release
|
scons-arguments: precision=double target=template_release
|
||||||
|
cache-key: .double.template_release
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
# - platform: windows
|
# - platform: windows
|
||||||
# float-precision: double
|
|
||||||
# arch: x86_32
|
# arch: x86_32
|
||||||
# target-type: template_release
|
# scons-arguments: precision=double target=template_release
|
||||||
|
# cache-key: .double.template_release
|
||||||
# os: windows-latest
|
# os: windows-latest
|
||||||
|
|
||||||
# - platform: windows
|
# - platform: windows
|
||||||
# float-precision: double
|
|
||||||
# arch: x86_64
|
# arch: x86_64
|
||||||
# target-type: template_release
|
# scons-arguments: precision=double target=template_release
|
||||||
|
# cache-key: .double.template_release
|
||||||
# os: windows-latest
|
# os: windows-latest
|
||||||
|
|
||||||
# - platform: macos
|
# - platform: macos
|
||||||
# float-precision: double
|
|
||||||
# arch: universal
|
# arch: universal
|
||||||
# target-type: template_release
|
# scons-arguments: precision=double target=template_release
|
||||||
|
# cache-key: .double.template_release
|
||||||
# os: macos-latest
|
# os: macos-latest
|
||||||
|
|
||||||
# - platform: android
|
# - platform: android
|
||||||
# float-precision: double
|
|
||||||
# arch: arm64
|
# arch: arm64
|
||||||
# target-type: template_release
|
# scons-arguments: precision=double target=template_release
|
||||||
|
# cache-key: .double.template_release
|
||||||
# os: ubuntu-20.04
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
# - platform: android
|
# - platform: android
|
||||||
# float-precision: double
|
|
||||||
# arch: arm32
|
# arch: arm32
|
||||||
# target-type: template_release
|
# scons-arguments: precision=double target=template_release
|
||||||
|
# cache-key: .double.template_release
|
||||||
# os: ubuntu-20.04
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
# - platform: android
|
# - platform: android
|
||||||
# float-precision: double
|
|
||||||
# arch: x86_64
|
# arch: x86_64
|
||||||
# target-type: template_release
|
# scons-arguments: precision=double target=template_release
|
||||||
|
# cache-key: .double.template_release
|
||||||
# os: ubuntu-20.04
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
# - platform: android
|
# - platform: android
|
||||||
# float-precision: double
|
|
||||||
# arch: x86_32
|
# arch: x86_32
|
||||||
# target-type: template_release
|
# scons-arguments: precision=double target=template_release
|
||||||
|
# cache-key: .double.template_release
|
||||||
# os: ubuntu-20.04
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
# - platform: ios
|
# - platform: ios
|
||||||
# float-precision: double
|
|
||||||
# arch: arm64
|
# arch: arm64
|
||||||
# target-type: template_release
|
# scons-arguments: precision=double target=template_release
|
||||||
|
# cache-key: .double.template_release
|
||||||
# os: macos-latest
|
# os: macos-latest
|
||||||
|
|
||||||
# - platform: web
|
# - platform: web
|
||||||
# float-precision: double
|
|
||||||
# arch: wasm32
|
# arch: wasm32
|
||||||
# target-type: template_release
|
# scons-arguments: precision=double target=template_release
|
||||||
|
# cache-key: .double.template_release
|
||||||
# os: ubuntu-20.04
|
# os: ubuntu-20.04
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -279,8 +279,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
platform: ${{ matrix.platform }}
|
platform: ${{ matrix.platform }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
float-precision: ${{ matrix.float-precision }}
|
scons-arguments: ${{ matrix.scons-arguments }}
|
||||||
build-target-type: ${{ matrix.target-type }}
|
cache-key: ${{ matrix.cache-key }}
|
||||||
|
|
||||||
# Sign
|
# Sign
|
||||||
- name: Mac Sign
|
- name: Mac Sign
|
||||||
|
@ -306,7 +306,7 @@ jobs:
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: godot-cpp-template-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }}
|
name: godot-cpp-template-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.cache-key }}
|
||||||
path: |
|
path: |
|
||||||
${{ github.workspace }}/bin/**
|
${{ github.workspace }}/bin/**
|
||||||
|
|
||||||
|
|
15
README.md
15
README.md
|
@ -86,15 +86,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
platform: ${{ matrix.platform }}
|
platform: ${{ matrix.platform }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
float-precision: single
|
scons-arguments: target=template_release
|
||||||
build-target-type: template_release
|
cache-key: .template_release
|
||||||
- name: 🔗 GDExtension Build
|
|
||||||
uses: ./.github/actions/build
|
|
||||||
with:
|
|
||||||
platform: ${{ matrix.platform }}
|
|
||||||
arch: ${{ matrix.arch }}
|
|
||||||
float-precision: ${{ matrix.float-precision }}
|
|
||||||
build-target-type: template_debug
|
|
||||||
- name: Mac Sign
|
- name: Mac Sign
|
||||||
if: ${{ matrix.platform == 'macos' && env.APPLE_CERT_BASE64 }}
|
if: ${{ matrix.platform == 'macos' && env.APPLE_CERT_BASE64 }}
|
||||||
env:
|
env:
|
||||||
|
@ -135,8 +128,8 @@ uses: godotengine/godot-cpp-template/.github/actions/build@main
|
||||||
with:
|
with:
|
||||||
platform: ${{ matrix.platform }}
|
platform: ${{ matrix.platform }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
float-precision: single
|
scons-arguments: target=template_release
|
||||||
build-target-type: template_release
|
cache-key: .template_release
|
||||||
```
|
```
|
||||||
with the parameters from the matrix.
|
with the parameters from the matrix.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue