GHA: Add a macOS build to test builds workflow
This commit is contained in:
parent
6bcffe712d
commit
56c3c26572
|
@ -10,6 +10,10 @@ on:
|
||||||
description: A tag, branch or commit hash in the LimboAI repository.
|
description: A tag, branch or commit hash in the LimboAI repository.
|
||||||
type: string
|
type: string
|
||||||
default: master
|
default: master
|
||||||
|
test-build:
|
||||||
|
description: Is this a test build? In other words, should we only build a classical editor?
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -21,6 +25,10 @@ on:
|
||||||
description: A tag, branch or commit hash in the LimboAI repository.
|
description: A tag, branch or commit hash in the LimboAI repository.
|
||||||
type: string
|
type: string
|
||||||
default: master
|
default: master
|
||||||
|
test-build:
|
||||||
|
description: Is this a test build? In other words, should we only build a classical editor?
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
|
|
||||||
# Global Settings
|
# Global Settings
|
||||||
|
@ -33,49 +41,55 @@ env:
|
||||||
jobs:
|
jobs:
|
||||||
macos-builds:
|
macos-builds:
|
||||||
runs-on: "macos-latest"
|
runs-on: "macos-latest"
|
||||||
name: ${{ matrix.name }}
|
name: ${{ matrix.opts.name }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
opts:
|
||||||
- name: Editor (x86_64, release)
|
- name: Editor (x86_64, release)
|
||||||
target: editor
|
target: editor
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
build-mono: false
|
build-mono: false
|
||||||
artifact-name: macos-editor
|
artifact-name: macos-editor
|
||||||
|
should-build: true
|
||||||
|
|
||||||
- name: Template (x86_64, release)
|
- name: Template (x86_64, release)
|
||||||
target: template_release
|
target: template_release
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
build-mono: false
|
build-mono: false
|
||||||
artifact-name: macos-templates
|
artifact-name: macos-templates
|
||||||
|
should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
- name: Template (x86_64, debug)
|
- name: Template (x86_64, debug)
|
||||||
target: template_debug
|
target: template_debug
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
build-mono: false
|
build-mono: false
|
||||||
artifact-name: macos-templates
|
artifact-name: macos-templates
|
||||||
|
should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
- name: Editor (arm64, release)
|
- name: Editor (arm64, release)
|
||||||
target: editor
|
target: editor
|
||||||
arch: arm64
|
arch: arm64
|
||||||
build-mono: false
|
build-mono: false
|
||||||
artifact-name: macos-editor
|
artifact-name: macos-editor
|
||||||
|
should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
- name: Template (arm64, release)
|
- name: Template (arm64, release)
|
||||||
target: template_release
|
target: template_release
|
||||||
arch: arm64
|
arch: arm64
|
||||||
build-mono: false
|
build-mono: false
|
||||||
artifact-name: macos-templates
|
artifact-name: macos-templates
|
||||||
|
should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
- name: Template (arm64, debug)
|
- name: Template (arm64, debug)
|
||||||
target: template_debug
|
target: template_debug
|
||||||
arch: arm64
|
arch: arm64
|
||||||
build-mono: false
|
build-mono: false
|
||||||
artifact-name: macos-templates
|
artifact-name: macos-templates
|
||||||
|
should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
# ! Disabled for now: .NET version fail to build
|
# ! Disabled for now: .NET version fails to build
|
||||||
|
|
||||||
# - name: .NET Editor (x86_64, release)
|
# - name: .NET Editor (x86_64, release)
|
||||||
# target: editor
|
# target: editor
|
||||||
|
@ -83,18 +97,21 @@ jobs:
|
||||||
# build-mono: true
|
# build-mono: true
|
||||||
# artifact-name: macos-mono-editor
|
# artifact-name: macos-mono-editor
|
||||||
# cache-name: macos-editor
|
# cache-name: macos-editor
|
||||||
|
# should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
# - name: .NET Template (x86_64, release)
|
# - name: .NET Template (x86_64, release)
|
||||||
# target: template_release
|
# target: template_release
|
||||||
# arch: x86_64
|
# arch: x86_64
|
||||||
# build-mono: true
|
# build-mono: true
|
||||||
# artifact-name: macos-mono-templates
|
# artifact-name: macos-mono-templates
|
||||||
|
# should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
# - name: .NET Template (x86_64, debug)
|
# - name: .NET Template (x86_64, debug)
|
||||||
# target: template_debug
|
# target: template_debug
|
||||||
# arch: x86_64
|
# arch: x86_64
|
||||||
# build-mono: true
|
# build-mono: true
|
||||||
# artifact-name: macos-mono-templates
|
# artifact-name: macos-mono-templates
|
||||||
|
# should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
# - name: .NET Editor (arm64, release)
|
# - name: .NET Editor (arm64, release)
|
||||||
# target: editor
|
# target: editor
|
||||||
|
@ -102,21 +119,27 @@ jobs:
|
||||||
# build-mono: true
|
# build-mono: true
|
||||||
# artifact-name: macos-mono-editor
|
# artifact-name: macos-mono-editor
|
||||||
# cache-name: macos-editor
|
# cache-name: macos-editor
|
||||||
|
# should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
# - name: .NET Template (arm64, release)
|
# - name: .NET Template (arm64, release)
|
||||||
# target: template_release
|
# target: template_release
|
||||||
# arch: arm64
|
# arch: arm64
|
||||||
# build-mono: true
|
# build-mono: true
|
||||||
# artifact-name: macos-mono-templates
|
# artifact-name: macos-mono-templates
|
||||||
|
# should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
# - name: .NET Template (arm64, debug)
|
# - name: .NET Template (arm64, debug)
|
||||||
# target: template_debug
|
# target: template_debug
|
||||||
# arch: arm64
|
# arch: arm64
|
||||||
# build-mono: true
|
# build-mono: true
|
||||||
# artifact-name: macos-mono-templates
|
# artifact-name: macos-mono-templates
|
||||||
|
# should-build: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
|
exclude:
|
||||||
|
- { opts: {should-build: false }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BIN: godot.macos.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
BIN: godot.macos.${{matrix.opts.target}}.${{matrix.opts.arch}}${{ matrix.opts.build-mono == true && '.mono' || '' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
@ -170,17 +193,17 @@ jobs:
|
||||||
env:
|
env:
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
||||||
run: |
|
run: |
|
||||||
scons -j2 platform=macos target=${{matrix.target}} arch=${{matrix.arch}} module_mono_enabled=${{matrix.build-mono}} ${{env.SCONSFLAGS}}
|
scons -j2 platform=macos target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.build-mono}} ${{env.SCONSFLAGS}}
|
||||||
|
|
||||||
# ! Disabled for now: .NET version fail to build
|
# ! Disabled for now: .NET version fail to build
|
||||||
|
|
||||||
# - name: Generate C# glue
|
# - name: Generate C# glue
|
||||||
# if: matrix.build-mono && matrix.target == 'editor'
|
# if: matrix.opts.build-mono && matrix.opts.target == 'editor'
|
||||||
# run: |
|
# run: |
|
||||||
# ./bin/$BIN --headless --generate-mono-glue ./modules/mono/glue || true
|
# ./bin/$BIN --headless --generate-mono-glue ./modules/mono/glue || true
|
||||||
|
|
||||||
# - name: Build .NET solutions
|
# - name: Build .NET solutions
|
||||||
# if: matrix.build-mono && matrix.target == 'editor'
|
# if: matrix.opts.build-mono && matrix.opts.target == 'editor'
|
||||||
# run: |
|
# run: |
|
||||||
# ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=macos
|
# ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=macos
|
||||||
|
|
||||||
|
@ -192,13 +215,14 @@ jobs:
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact-name }}
|
name: ${{ matrix.opts.artifact-name }}
|
||||||
path: bin/*
|
path: bin/*
|
||||||
|
|
||||||
make-macos-bundle:
|
make-macos-bundle:
|
||||||
runs-on: "macos-latest"
|
runs-on: "macos-latest"
|
||||||
name: Make macOS Bundles
|
name: Make macOS Bundles
|
||||||
needs: macos-builds
|
needs: macos-builds
|
||||||
|
if: ${{ !inputs.test-build }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
|
|
@ -122,3 +122,11 @@ jobs:
|
||||||
godot-treeish: ${{ inputs.godot-treeish }}
|
godot-treeish: ${{ inputs.godot-treeish }}
|
||||||
limboai-treeish: ${{ github.sha }}
|
limboai-treeish: ${{ github.sha }}
|
||||||
test-build: true
|
test-build: true
|
||||||
|
|
||||||
|
macos-build:
|
||||||
|
name: 🍎 macOS test build
|
||||||
|
uses: ./.github/workflows/macos.yml
|
||||||
|
with:
|
||||||
|
godot-treeish: ${{ inputs.godot-treeish }}
|
||||||
|
limboai-treeish: ${{ github.sha }}
|
||||||
|
test-build: true
|
||||||
|
|
Loading…
Reference in New Issue