mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-01 05:48:37 +03:00
Compare commits
8 Commits
godot-4.5-
...
godot-3.4-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68ce78179f | ||
|
|
c12e9a3195 | ||
|
|
1070a29d77 | ||
|
|
8366761930 | ||
|
|
de89011ca4 | ||
|
|
a1337a2dd7 | ||
|
|
99e9dd1d93 | ||
|
|
68372606b5 |
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@@ -108,7 +108,7 @@ jobs:
|
||||
|
||||
macos:
|
||||
name: Build (macOS, Clang)
|
||||
runs-on: macos-10.15
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@@ -133,45 +133,18 @@ jobs:
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: godot-cpp-macos-x86_64-release
|
||||
name: godot-cpp-macos-universal-release
|
||||
path: bin/libgodot-cpp.osx.release.64.a
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Build test GDNative library
|
||||
run: |
|
||||
scons target=release platform=osx bits=64 -j $(sysctl -n hw.logicalcpu) -C test
|
||||
scons target=release platform=osx bits=64 macos_arch=universal -j $(sysctl -n hw.logicalcpu) -C test
|
||||
|
||||
- name: Run test GDNative library
|
||||
run: |
|
||||
./Godot.app/Contents/MacOS/Godot --path test -s script.gd
|
||||
|
||||
macos-arm64:
|
||||
name: Build (macOS, Clang, cross-compile arm64)
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Python (for SCons)
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install scons
|
||||
|
||||
- name: Build godot-cpp
|
||||
run: |
|
||||
# The default SDK in github the actions environemnt seems to have problems compiling for arm64.
|
||||
# Use the latest 11.x SDK.
|
||||
SDK_BASE=/Library/Developer/CommandLineTools/SDKs
|
||||
SDK_VER=$(ls $SDK_BASE | grep "MacOSX11." | sort -r | head -n1)
|
||||
echo $SDK_BASE/$SDK_VER/
|
||||
scons target=release generate_bindings=yes macos_arch=arm64 macos_deployment_target=10.15 macos_sdk_path="$SDK_BASE/$SDK_VER/" -j $(sysctl -n hw.logicalcpu)
|
||||
|
||||
static-checks:
|
||||
name: Static Checks (clang-format)
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
# Misc
|
||||
logs/*
|
||||
*.log
|
||||
|
||||
# Binaries
|
||||
*.o
|
||||
|
||||
19
SConstruct
19
SConstruct
@@ -151,8 +151,8 @@ opts.Add(
|
||||
opts.Add(EnumVariable(
|
||||
'macos_arch',
|
||||
'Target macOS architecture',
|
||||
'x86_64',
|
||||
['x86_64', 'arm64']
|
||||
'universal',
|
||||
['universal', 'x86_64', 'arm64']
|
||||
))
|
||||
opts.Add(EnumVariable(
|
||||
'ios_arch',
|
||||
@@ -228,7 +228,14 @@ elif env['platform'] == 'osx':
|
||||
'Only 64-bit builds are supported for the macOS target.'
|
||||
)
|
||||
|
||||
env.Append(CCFLAGS=['-std=c++14', '-arch', env['macos_arch']])
|
||||
if env["macos_arch"] == "universal":
|
||||
env.Append(LINKFLAGS=["-arch", "x86_64", "-arch", "arm64"])
|
||||
env.Append(CCFLAGS=["-arch", "x86_64", "-arch", "arm64"])
|
||||
else:
|
||||
env.Append(LINKFLAGS=["-arch", env["macos_arch"]])
|
||||
env.Append(CCFLAGS=["-arch", env["macos_arch"]])
|
||||
|
||||
env.Append(CCFLAGS=['-std=c++14'])
|
||||
|
||||
if env['macos_deployment_target'] != 'default':
|
||||
env.Append(CCFLAGS=['-mmacosx-version-min=' + env['macos_deployment_target']])
|
||||
@@ -239,8 +246,6 @@ elif env['platform'] == 'osx':
|
||||
env.Append(LINKFLAGS=['-isysroot', env['macos_sdk_path']])
|
||||
|
||||
env.Append(LINKFLAGS=[
|
||||
'-arch',
|
||||
env['macos_arch'],
|
||||
'-framework',
|
||||
'Cocoa',
|
||||
'-Wl,-undefined,dynamic_lookup',
|
||||
@@ -472,8 +477,8 @@ if env['platform'] == 'android':
|
||||
elif env['platform'] == 'ios':
|
||||
arch_suffix = env['ios_arch']
|
||||
elif env['platform'] == 'osx':
|
||||
if env['macos_arch'] != 'x86_64':
|
||||
arch_suffix = env['macos_arch']
|
||||
if env['macos_arch'] != 'universal':
|
||||
arch_suffix = env['macos_arch']
|
||||
elif env['platform'] == 'javascript':
|
||||
arch_suffix = 'wasm'
|
||||
|
||||
|
||||
Submodule godot-headers updated: 68174528c9...d1596b939d
21
test/.gitignore
vendored
Normal file
21
test/.gitignore
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Godot 4+ specific ignores
|
||||
.godot/
|
||||
|
||||
# Godot-specific ignores
|
||||
.import/
|
||||
export.cfg
|
||||
export_presets.cfg
|
||||
# Dummy HTML5 export presets file for continuous integration
|
||||
!.github/dist/export_presets.cfg
|
||||
|
||||
# Imported translations (automatically generated from CSV files)
|
||||
*.translation
|
||||
|
||||
# Mono-specific ignores
|
||||
.mono/
|
||||
data_*/
|
||||
mono_crash.*.json
|
||||
|
||||
# System/tool-specific ignores
|
||||
.directory
|
||||
*~
|
||||
@@ -10,10 +10,8 @@ config_version=4
|
||||
|
||||
_global_script_classes=[ ]
|
||||
_global_script_class_icons={
|
||||
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Test CI project"
|
||||
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
|
||||
extends MainLoop
|
||||
|
||||
|
||||
func _initialize():
|
||||
OS.exit_code = 1
|
||||
var native_script = load("res://gdexample.gdns")
|
||||
print("Native Script ", native_script)
|
||||
if native_script == null || !is_instance_valid(native_script):
|
||||
return
|
||||
print("Library ", native_script.library)
|
||||
if native_script.library == null || !is_instance_valid(native_script.library):
|
||||
return
|
||||
var ref = native_script.new()
|
||||
print("Reference ", ref)
|
||||
if ref == null || !is_instance_valid(ref):
|
||||
return
|
||||
print("Reference name ", ref.name)
|
||||
if ref.name != "SimpleClass":
|
||||
return
|
||||
print("Reference value ", ref.value)
|
||||
if ref.value != 0:
|
||||
return
|
||||
print("Call method ", ref.method(1))
|
||||
if ref.method(1) != 1:
|
||||
return
|
||||
OS.exit_code = 0
|
||||
OS.exit_code = 1
|
||||
var native_script = load("res://gdexample.gdns")
|
||||
print("Native Script ", native_script)
|
||||
if not native_script || !is_instance_valid(native_script):
|
||||
return
|
||||
print("Library ", native_script.library)
|
||||
if not native_script.library || !is_instance_valid(native_script.library):
|
||||
return
|
||||
var ref = native_script.new()
|
||||
print("Reference ", ref)
|
||||
if not ref || !is_instance_valid(ref):
|
||||
return
|
||||
print("Reference name ", ref.name)
|
||||
if ref.name != "SimpleClass":
|
||||
return
|
||||
print("Reference value ", ref.value)
|
||||
if ref.value != 0:
|
||||
return
|
||||
print("Call method ", ref.method(1))
|
||||
if ref.method(1) != 1:
|
||||
return
|
||||
OS.exit_code = 0
|
||||
|
||||
|
||||
func _idle(_delta):
|
||||
return true
|
||||
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user