Skip to content

GH-43 Port to GDExtension (Godot 4.2+) #43

GH-43 Port to GDExtension (Godot 4.2+)

GH-43 Port to GDExtension (Godot 4.2+) #43

Workflow file for this run

name: 🛠️ Build All
on:
push:
pull_request:
workflow_dispatch:
inputs:
build_type:
type: choice
description: "The type of build"
required: false
default: "release"
options:
- "debug"
- "release"
- "both"
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- identifier: linux-debug
name: 🐧 Linux (Debug)
build_type: Debug
runner: ubuntu-latest
target: template_debug
platform: linux
arch: x86_64
- identifier: linux-release
name: 🐧 Linux (Release)
build_type: Release
runner: ubuntu-latest
target: template_release
platform: linux
arch: x86_64
- identifier: windows-debug
name: 🪟 Windows (Debug)
build_type: Debug
runner: windows-latest
target: template_debug
platform: windows
arch: x86_64
- identifier: windows-release
name: 🪟 Windows (Release)
build_type: Release
runner: windows-latest
target: template_release
platform: windows
arch: x86_64
- identifier: macos-debug
name: 🍎 MacOS (Debug)
build_type: Debug
runner: macos-latest
target: template_debug
platform: macos
- identifier: macos-release
name: 🍎 MacOS (Release)
build_type: Release
runner: macos-latest
target: template_release
platform: macos
runs-on: ${{ matrix.runner }}
name: ${{ matrix.name }}
outputs:
job_build_type: ${{ steps.set-env.outputs.JOB_BUILD_TYPE }}
steps:
- name: Set JOB_BUILD_TYPE
id: set-env
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "JOB_BUILD_TYPE=${{ github.event.inputs.build_type }}" >> $GITHUB_ENV
echo "::set-output name=JOB_BUILD_TYPE::${{ github.event.inputs.build_type }}"
else
echo "JOB_BUILD_TYPE=release" >> $GITHUB_ENV
echo "::set-output name=JOB_BUILD_TYPE::release"
fi
- name: Checkout project
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Linux Dependencies
if: startsWith(matrix.identifier, 'linux-')
uses: ./.github/actions/linux-deps
- name: Setup Windows Dependencies
if: startsWith(matrix.identifier, 'windows-')
uses: ./.github/actions/windows-deps
- name: Setup MacOS Dependencies
if: startsWith(matrix.identifier, 'macos-')
uses: ./.github/actions/macos-deps
- name: Setup Base Dependencies
uses: ./.github/actions/base-deps
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache-${{ matrix.identifier }}
- name: Configure CMake (Linux/MacOS)
if: startsWith(matrix.identifier, 'linux-') || startsWith(matrix.identifier, 'macos-')
shell: sh
run: |
cmake -B ${{ github.workspace }}/.out-${{ matrix.identifier }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -S ${{ github.workspace }} -G Ninja
- name: Configure CMake (Windows)
if: startsWith(matrix.identifier, 'windows-')
run: |
cmake -B ${{ github.workspace }}/.out-${{ matrix.identifier }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -S ${{ github.workspace }} -G Ninja
- name: Build Orchestrator
if: ${{ env.JOB_BUILD_TYPE == 'both' }} || endsWith(matrix.identifier, env.JOB_BUILD_TYPE)
run: |
cmake --build ${{ github.workspace }}/.out-${{ matrix.identifier }} --target orchestrator -j 18
- name: Prepare addon files
if: ${{ env.JOB_BUILD_TYPE == 'both' }} || endsWith(matrix.identifier, env.JOB_BUILD_TYPE)
shell: bash
run: |
cp '${{ github.workspace }}/AUTHORS.md' '${{ github.workspace }}/project/addons/orchestrator/'
cp '${{ github.workspace }}/CHANGELOG.md' '${{ github.workspace }}/project/addons/orchestrator/'
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/project/addons/orchestrator/'
cp '${{ github.workspace }}/LICENSE' '${{ github.workspace }}/project/addons/orchestrator/'
- name: Upload artifact
if: ${{ env.JOB_BUILD_TYPE == 'both' }} || endsWith(matrix.identifier, env.JOB_BUILD_TYPE)
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-$${ matrix.build_type }}
retention-days: 1
path: |
${{ github.workspace }}/project/