Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make this a gdextension #10

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build Android
on:
workflow_dispatch:
workflow_call:

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- precision: single
arch: arm64
- precision: single
arch: arm32
- precision: single
arch: x86_64
- precision: single
arch: x86_32

- precision: double
arch: arm64
- precision: double
arch: arm32
- precision: double
arch: x86_64
- precision: double
arch: x86_32
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0

- name: 🔗 GDExtension Build
uses: godotengine/godot-cpp-template/.github/actions/build@main
with:
platform: android
arch: ${{ matrix.arch }}
float-precision: ${{ matrix.precision }}
build-target-type: template_release

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Godot_Speech
path: |
${{ github.workspace }}/bin/**/*.so
if-no-files-found: error
40 changes: 40 additions & 0 deletions .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build iOS
on:
workflow_dispatch:
workflow_call:

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- precision: single
arch: arm64
ios_precision_extension:
- precision: double
arch: arm64
ios_precision_extension: .double
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0

- name: 🔗 GDExtension Build
uses: godotengine/godot-cpp-template/.github/actions/build@main
with:
platform: ios
arch: ${{ matrix.arch }}
float-precision: ${{ matrix.precision }}
build-target-type: template_release

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Godot_Speech
path: |
${{ github.workspace }}/bin/**/libgodot_speech.ios.template_release${{ matrix.ios_precision_extension }}.arm64.framework/**
if-no-files-found: error
39 changes: 39 additions & 0 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Linux
on:
workflow_dispatch:
workflow_call:

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- precision: single
arch: x86_64
- precision: double
arch: x86_64

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0

- name: 🔗 GDExtension Build
uses: godotengine/godot-cpp-template/.github/actions/build@main
with:
platform: linux
arch: ${{ matrix.arch }}
float-precision: ${{ matrix.precision }}
build-target-type: template_release

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Godot_Speech
path: |
${{ github.workspace }}/bin/**/*.so
if-no-files-found: error
63 changes: 63 additions & 0 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build MacOS
on:
workflow_dispatch:
workflow_call:
secrets:
APPLE_CERT_BASE64:
required: true
APPLE_CERT_PASSWORD:
required: true
APPLE_DEV_PASSWORD:
required: true
APPLE_DEV_ID:
required: true
APPLE_DEV_TEAM_ID:
required: true
APPLE_DEV_APP_ID:
required: true

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- precision: single
mac_precision_extension:
arch: universal
- precision: double
mac_precision_extension: .double
arch: universal
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: 🔗 GDExtension Build
uses: godotengine/godot-cpp-template/.github/actions/build@main
with:
platform: macos
arch: ${{ matrix.arch }}
float-precision: ${{ matrix.precision }}
build-target-type: template_release

- name: Mac Sign
uses: godotengine/godot-cpp-template/.github/actions/sign@main
with:
FRAMEWORK_PATH: bin/addons/godot_speech/bin/libgodot_speech.macos.template_release${{ matrix.mac_precision_extension }}.universal.framework
SIGN_FLAGS: "--deep"
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@v3
with:
name: Godot_Speech
path: |
${{ github.workspace }}/bin/**/libgodot_speech.macos.template_release${{ matrix.mac_precision_extension }}.universal.framework/**
if-no-files-found: error
38 changes: 38 additions & 0 deletions .github/workflows/build_web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Web
on:
workflow_dispatch:
workflow_call:

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- precision: single
arch: wasm32
- precision: double
arch: wasm32
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0

- name: 🔗 GDExtension Build
uses: godotengine/godot-cpp-template/.github/actions/build@main
with:
platform: web
arch: ${{ matrix.arch }}
float-precision: ${{ matrix.precision }}
build-target-type: template_release

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Godot_Speech
path: |
${{ github.workspace }}/bin/**/*.wasm
if-no-files-found: error
47 changes: 47 additions & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build Windows
on:
workflow_dispatch:
workflow_call:

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- precision: single
arch: x86_32
opencl_arch: Win32
- precision: single
arch: x86_64
opencl_arch: x64
- precision: double
arch: x86_32
opencl_arch: Win32
- precision: double
arch: x86_64
opencl_arch: x64
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0

- name: 🔗 GDExtension Build
uses: godotengine/godot-cpp-template/.github/actions/build@main
with:
platform: windows
arch: ${{ matrix.arch }}
float-precision: ${{ matrix.precision }}
build-target-type: template_release

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Godot_Speech
path: |
${{ github.workspace }}/bin/**/*.dll
${{ github.workspace }}/bin/addons/godot_speech/godot_speech.gdextension
if-no-files-found: error
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint
on:
workflow_dispatch:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup clang-format
shell: bash
run: |
python -m pip install clang-format
- name: Run clang-format
shell: bash
run: |
clang-format --style=file:.clang-format *.cpp *.h --dry-run --Werror
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release
on:
workflow_call:

jobs:
release:
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: Godot_Speech
path: godot-speech
- name: Delete draft release(s)
uses: hugo19941994/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive
shell: sh
run: zip -r "Godot_Speech.zip" godot-speech
- name: Release
uses: softprops/action-gh-release@v1
with:
name: Godot Speech
files: Godot_Speech.zip
generate_release_notes: true
draft: true
prerelease: true
fail_on_unmatched_files: true
44 changes: 44 additions & 0 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Builds

on:
workflow_dispatch:
pull_request:
push:
branches:
- "main"

jobs:
lint:
uses: ./.github/workflows/lint.yml
build_android:
needs: [lint]
uses: ./.github/workflows/build_android.yml
build_ios:
needs: [lint]
uses: ./.github/workflows/build_ios.yml
build_linux:
needs: [lint]
uses: ./.github/workflows/build_linux.yml
build_macos:
needs: [lint]
uses: ./.github/workflows/build_macos.yml
secrets:
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 }}
build_windows:
needs: [lint]
uses: ./.github/workflows/build_windows.yml
build_web:
needs: [lint]
uses: ./.github/workflows/build_web.yml

release:
name: Create Release
permissions:
contents: write
needs: [build_android, build_ios, build_linux, build_macos, build_windows, build_web]
uses: ./.github/workflows/release.yml
Loading
Loading