-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the godot cpp example to add a git workflow. Adjust file structur…
…e and SConstruct to fit its design.
- Loading branch information
Showing
11 changed files
with
308 additions
and
39 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Build GDExtension | ||
on: | ||
workflow_call: | ||
push: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- platform: linux | ||
arch: x86_64 | ||
os: ubuntu-20.04 | ||
- platform: windows | ||
arch: x86_32 | ||
os: windows-latest | ||
- platform: windows | ||
arch: x86_64 | ||
os: windows-latest | ||
- platform: macos | ||
arch: universal | ||
os: macos-latest | ||
- platform: android | ||
arch: arm64 | ||
os: ubuntu-20.04 | ||
- platform: android | ||
arch: arm32 | ||
os: ubuntu-20.04 | ||
- platform: android | ||
arch: x86_64 | ||
os: ubuntu-20.04 | ||
- platform: android | ||
arch: x86_32 | ||
os: ubuntu-20.04 | ||
- platform: ios | ||
arch: arm64 | ||
os: macos-latest | ||
- platform: web | ||
arch: wasm32 | ||
os: ubuntu-20.04 | ||
|
||
runs-on: ${{ matrix.os }} | ||
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: ${{ matrix.platform }} | ||
arch: ${{ matrix.arch }} | ||
float-precision: single | ||
build-target-type: 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 | ||
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: bin/macos/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@v3 | ||
with: | ||
name: GDExtension | ||
path: | | ||
${{ github.workspace }}/bin/** |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Ignore all files | ||
** | ||
|
||
# Add back .gitignore | ||
!.gitignore | ||
|
||
# Ensure directories themselves are not ignored, so that .gitkeep and Info.plist can be tracked | ||
!*/ | ||
|
||
# Add back .gitkeep files | ||
!**/*.gitkeep | ||
|
||
# Add back Info.plist files | ||
!**/Info.plist |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleExecutable</key> | ||
<string>libEXTENSION-NAME.macos.template_release</string> | ||
<key>CFBundleName</key> | ||
<string>NumDot</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>NumDot</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>de.ivorius.numdot</string> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>Unlicensed</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0.0</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>FMWK</string> | ||
<key>CSResourcesFileMapped</key> | ||
<true/> | ||
<key>DTPlatformName</key> | ||
<string>iphoneos</string> | ||
<key>MinimumOSVersion</key> | ||
<string>12.0</string> | ||
</dict> | ||
</plist> |
Empty file.
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleExecutable</key> | ||
<string>libEXTENSION-NAME.macos.template_release</string> | ||
<key>CFBundleName</key> | ||
<string>NumDot</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>NumDot</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>de.ivorius.numdot</string> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>Unlicensed</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0.0</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>FMWK</string> | ||
<key>CSResourcesFileMapped</key> | ||
<true/> | ||
<key>DTPlatformName</key> | ||
<string>macosx</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>10.12</string> | ||
</dict> | ||
</plist> |
Empty file.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
import sys | ||
from enum import Enum | ||
|
||
# Colors are disabled in non-TTY environments such as pipes. This means | ||
# that if output is redirected to a file, it won't contain color codes. | ||
# Colors are always enabled on continuous integration. | ||
_colorize = bool(sys.stdout.isatty() or os.environ.get("CI")) | ||
|
||
|
||
class ANSI(Enum): | ||
""" | ||
Enum class for adding ansi colorcodes directly into strings. | ||
Automatically converts values to strings representing their | ||
internal value, or an empty string in a non-colorized scope. | ||
""" | ||
|
||
RESET = "\x1b[0m" | ||
|
||
BOLD = "\x1b[1m" | ||
ITALIC = "\x1b[3m" | ||
UNDERLINE = "\x1b[4m" | ||
STRIKETHROUGH = "\x1b[9m" | ||
REGULAR = "\x1b[22;23;24;29m" | ||
|
||
BLACK = "\x1b[30m" | ||
RED = "\x1b[31m" | ||
GREEN = "\x1b[32m" | ||
YELLOW = "\x1b[33m" | ||
BLUE = "\x1b[34m" | ||
MAGENTA = "\x1b[35m" | ||
CYAN = "\x1b[36m" | ||
WHITE = "\x1b[37m" | ||
|
||
PURPLE = "\x1b[38;5;93m" | ||
PINK = "\x1b[38;5;206m" | ||
ORANGE = "\x1b[38;5;214m" | ||
GRAY = "\x1b[38;5;244m" | ||
|
||
def __str__(self) -> str: | ||
global _colorize | ||
return str(self.value) if _colorize else "" | ||
|
||
|
||
def print_warning(*values: object) -> None: | ||
"""Prints a warning message with formatting.""" | ||
print(f"{ANSI.YELLOW}{ANSI.BOLD}WARNING:{ANSI.REGULAR}", *values, ANSI.RESET, file=sys.stderr) | ||
|
||
|
||
def print_error(*values: object) -> None: | ||
"""Prints an error message with formatting.""" | ||
print(f"{ANSI.RED}{ANSI.BOLD}ERROR:{ANSI.REGULAR}", *values, ANSI.RESET, file=sys.stderr) |