Build GDExtension #72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build GDExtension | |
on: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
define-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix-include: ${{ steps.make_matrix.outputs.include }} | |
steps: | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Load Matrix | |
id: make_matrix | |
run: | | |
echo 'include='$(python3 make_github_runner_config.py) >> "$GITHUB_OUTPUT" | |
build: | |
needs: define-matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJSON(needs.define-matrix.outputs.matrix-include) }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup godot-cpp | |
uses: Ivorforce/godot-cpp-template/.github/actions/setup-godot-cpp@action-setup-separate | |
with: | |
platform: ${{ matrix.platform }} | |
em-version: '3.1.55' # FIXME Doesn't compile on the newest, xtensor has problems | |
em-cache-directory: emsdk-cache.${{ matrix.float_precision }}.${{ matrix.build_target_type }} | |
- name: Cache .scons_cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ github.workspace }}/.scons_cache | |
key: ${{ matrix.platform }}_${{ matrix.arch }}_${{ matrix.float_precision }}_${{ matrix.build_target_type }}_cache | |
- name: Build GDExtension Debug Build | |
shell: sh | |
env: | |
SCONS_CACHE: ${{ github.workspace }}/.scons_cache | |
run: | | |
scons target=${{ matrix.build_target_type }} platform=${{ matrix.platform }} arch=${{ matrix.arch }} precision=${{ matrix.float_precision }} scu=yes | |
- name: Mac Sign | |
if: ${{ matrix.platform == 'macos' && env.APPLE_CERT_BASE64 }} | |
env: | |
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }} | |
uses: godotengine/godot-cpp-template/.github/actions/sign@main | |
with: | |
FRAMEWORK_PATH: build/addons/numdot/macos/numdot-macos.framework | |
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }} | |
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }} | |
APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }} | |
APPLE_DEV_ID: ${{ secrets.APPLE_DEV_ID }} | |
APPLE_DEV_TEAM_ID: ${{ secrets.APPLE_DEV_TEAM_ID }} | |
APPLE_DEV_APP_ID: ${{ secrets.APPLE_DEV_APP_ID }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: GDExtension-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.float_precision }}-${{ matrix.build_target_type }} | |
path: | | |
${{ github.workspace }}/build/** | |
merge: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Merge Artifacts | |
uses: actions/upload-artifact/merge@v4 | |
with: | |
name: GDExtension-all | |
pattern: GDExtension-* | |
delete-merged: true |