Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Try to create better artifacts.
Browse files Browse the repository at this point in the history
git subrepo pull (merge) --force godot

subrepo:
  subdir:   "godot"
  merged:   "e3af9aadcf"
upstream:
  origin:   "https://github.com/V-Sekai/godot.git"
  branch:   "groups-staging-4.4"
  commit:   "e3af9aadcf"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "73a0129"

git subrepo pull (merge) --force godot

subrepo:
  subdir:   "godot"
  merged:   "9e6d59698e"
upstream:
  origin:   "https://github.com/V-Sekai/godot.git"
  branch:   "groups-staging-4.4"
  commit:   "9e6d59698e"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "73a0129"

Upgrade the upload action.

Update build.yaml to remove android for now.
Update build.yaml

Update build.yaml

Try to create better artifacts.

git subrepo pull (merge) --force godot

subrepo:
  subdir:   "godot"
  merged:   "e3af9aadcf"
upstream:
  origin:   "https://github.com/V-Sekai/godot.git"
  branch:   "groups-staging-4.4"
  commit:   "e3af9aadcf"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "73a0129"

git subrepo pull (merge) --force godot

subrepo:
  subdir:   "godot"
  merged:   "9e6d59698e"
upstream:
  origin:   "https://github.com/V-Sekai/godot.git"
  branch:   "groups-staging-4.4"
  commit:   "9e6d59698e"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "73a0129"

Upgrade the upload action.

Update build.yaml to remove android for now.
Update build.yaml

Add error checking

git subrepo pull --force godot/modules/motion_matching

subrepo:
  subdir:   "godot/modules/motion_matching"
  merged:   "09d88f2ba2"
upstream:
  origin:   "https://github.com/GuilhermeGSousa/godot-motion-matching.git"
  branch:   "engine-module"
  commit:   "09d88f2ba2"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "73a0129"

Restore fix with get_rotation_quaternion

Fix crashes.

git subrepo push --branch=crashes godot/modules/motion_matching

subrepo:
  subdir:   "godot/modules/motion_matching"
  merged:   "2f91bd6bad"
upstream:
  origin:   "https://github.com/GuilhermeGSousa/godot-motion-matching.git"
  branch:   "crashes"
  commit:   "2f91bd6bad"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "73a0129"
  • Loading branch information
fire committed Oct 27, 2024
1 parent ec5b398 commit 29f913f
Show file tree
Hide file tree
Showing 152 changed files with 7,522 additions and 973 deletions.
225 changes: 224 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,167 @@
name: Build Platform Target
name: Build Platform Target

on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, reopened, edited, synchronize]

jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
actions: write
container:
image: fedora:39
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
GODOT_BASE_BRANCH: main
CACHE_NAME: v-sekai-world

strategy:
fail-fast: false
matrix:
platform: [macos, linux, windows, android, web]
target: [editor, template_release, template_debug]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.platform }}-${{ matrix.target }}
cancel-in-progress: true

steps:
- name: Set up dependencies
run: dnf install -y just git

- name: Checkout code
uses: actions/checkout@v4

- name: Cache SCons cache
uses: actions/cache@v4
if: always()
with:
path: |
.scons_cache
emsdk
osxcross
jdk
android_sdk
vulkan_sdk
mingw
key: ${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}-${{ matrix.platform }}-${{ matrix.target }}
restore-keys: |
${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}-${{ matrix.platform }}-${{ matrix.target }}
${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}
${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}-refs/heads/${{ env.GODOT_BASE_BRANCH }}
${{ env.CACHE_NAME }}-${{ env.GODOT_BASE_BRANCH }}
- uses: bencherdev/bencher@main

- name: Fetch dependencies and Build Platform Target
run: |
just install_packages
export PLATFORM_ARGS=""
case "${{ matrix.platform }}" in
android)
PLATFORM_ARGS="fetch-openjdk setup-android-sdk"
;;
web)
PLATFORM_ARGS="setup-emscripten"
;;
windows)
PLATFORM_ARGS="fetch-llvm-mingw"
;;
macos)
PLATFORM_ARGS="build-osxcross fetch-vulkan-sdk"
;;
*)
PLATFORM_ARGS="nil"
;;
esac
bencher run \
--project 'v-sekai-world' \
--adapter shell_hyperfine \
--branch '${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}' \
--testbed ubuntu-latest \
--threshold-measure latency \
--threshold-test t_test \
--threshold-max-sample-size 64 \
--threshold-upper-boundary 0.99 \
--thresholds-reset \
--ci-id ${{ runner.os }}-scons-${{ matrix.platform }}-${{ matrix.target }} \
--err \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--ci-only-on-alert \
--file results.json \
"hyperfine --show-output --runs 1 --export-json results.json 'just $PLATFORM_ARGS && just build-platform-target ${{ matrix.platform }} ${{ matrix.target }}'"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.platform }}-${{ matrix.target }}
path: godot/bin/*

- name: Create TPZ Folder
run: |
mkdir -p tpz
- name: Move Template Release and Debug Files
run: |
mv godot/bin/godot.linuxbsd.template_debug.double.x86_64.llvm tpz/ || true
mv godot/bin/godot.linuxbsd.template_release.double.x86_64.llvm tpz/ || true
mv godot/bin/godot.macos.template_debug.double.arm64 tpz/ || true
mv godot/bin/godot.macos.template_release.double.arm64 tpz/ || true
mv godot/bin/godot.web.template_debug.double.wasm32.* tpz/ || true
mv godot/bin/godot.web.template_release.double.wasm32.* tpz/ || true
mv godot/bin/godot.windows.template_debug.double.x86_64.llvm.* tpz/ || true
mv godot/bin/godot.windows.template_release.double.x86_64.llvm.* tpz/ || true
- name: Verify Moved Files
run: |
echo "Listing files in tpz directory:"
ls tpz/
- name: Create Editor Folder
run: |
mkdir -p editor
- name: Move Editor Files
run: |
mv godot/bin/godot.linuxbsd.editor.double.x86_64.llvm editor/ || true
mv godot/bin/godot.macos.editor.double.arm64 editor/ || true
mv godot/bin/godot.windows.editor.double.x86_64.llvm.console.exe editor/ || true
mv godot/bin/godot.windows.editor.double.x86_64.llvm.exe editor/ || true
mv godot/bin/godot.web.editor.double.wasm32.zip editor/ || true
- name: Verify Moved Files
run: |
echo "Listing files in editor directory:"
ls editor/
- name: Upload TPZ File
uses: actions/upload-artifact@v4
with:
name: Godot.tpz
path: tpz

- name: Upload Godot Editor Files
uses: actions/upload-artifact@v4
with:
name: Godot
path: editor

merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: v-sekai-world
delete-merged: true

on:
push:
Expand Down Expand Up @@ -120,6 +283,66 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- name: List Directory Structure
run: |
sudo apt-get install tree
echo "Displaying the structure of the current directory:"
tree -L 3 .
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Create TPZ Folder
run: |
mkdir -p tpz
- name: Move Template Release and Debug Files
run: |
mv artifacts/godot.linuxbsd.template_debug.double.x86_64.llvm tpz/
mv artifacts/godot.linuxbsd.template_release.double.x86_64.llvm tpz/
mv artifacts/godot.macos.template_debug.double.arm64 tpz/
mv artifacts/godot.macos.template_release.double.arm64 tpz/
mv artifacts/godot.web.template_debug.double.wasm32.* tpz/
mv artifacts/godot.web.template_release.double.wasm32.* tpz/
mv artifacts/godot.windows.template_debug.double.x86_64.llvm.* tpz/
mv artifacts/godot.windows.template_release.double.x86_64.llvm.* tpz/
- name: Verify Moved Files
run: |
echo "Listing files in tpz directory:"
ls tpz/
- name: Create Editor Folder
run: |
mkdir -p editor
- name: Move Editor Files
run: |
mv artifacts/godot.linuxbsd.editor.double.x86_64.llvm editor/
mv artifacts/godot.macos.editor.double.arm64 editor/
mv artifacts/godot.windows.editor.double.x86_64.llvm.console.exe editor/
mv artifacts/godot.windows.editor.double.x86_64.llvm.exe editor/
mv artifacts/godot.web.editor.double.wasm32.zip editor/
- name: Verify Moved Files
run: |
echo "Listing files in editor directory:"
ls editor/
- name: Upload TPZ File
uses: actions/upload-artifact@v4
with:
name: Godot.tpz
path: tpz

- name: Upload Godot Editor Files
uses: actions/upload-artifact@v4
with:
name: Godot
path: editor

- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
Expand Down
5 changes: 3 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
"name": "Run the editor with V-Sekai game",
"type": "lldb",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/godot/bin/godot.macos.editor.double.arm64",
"cwd": "${workspaceFolder}",
"args": ["--path", "../godot-motion-matching-demo", "-e"],
"program": "${workspaceFolder}/godot/bin/godot.macos.editor.arm64",
"preLaunchTask": "Godot Engine",
},
]
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
},
"command": [
"scons werror=no compiledb=yes dev_build=no generate_bundle=no precision=double target=editor tests=yes debug_symbols=yes"
"scons werror=no compiledb=yes dev_build=no generate_bundle=no precision=single target=editor tests=yes debug_symbols=yes"
],
},
]
Expand Down
2 changes: 1 addition & 1 deletion godot/.github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
# TODO: Figure out somehow how to embed this one.
- name: wayland-scanner dependency
run: |
sudo apt-get install libwayland-bin
sudo apt-get install libwayland-bin libegl-dev
- name: Free disk space on runner
run: |
Expand Down
4 changes: 2 additions & 2 deletions godot/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/V-Sekai/godot.git
branch = groups-staging-4.4
commit = 72728eab208b88681e4fe134e6803fd0c221338a
parent = 36f0f607371ee76888b532cf09ab705cfeca3267
commit = 9e6d59698e670a5a1c92b44f510b51eb351f4ce1
parent = b179b03a24b8f9ba53dde047436035d124b061a3
method = merge
cmdver = 0.4.6
6 changes: 6 additions & 0 deletions godot/core/config/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@ bool Engine::is_extra_gpu_memory_tracking_enabled() const {
return extra_gpu_memory_tracking;
}

#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED)
bool Engine::is_accurate_breadcrumbs_enabled() const {
return accurate_breadcrumbs;
}
#endif

void Engine::set_print_to_stdout(bool p_enabled) {
CoreGlobals::print_line_enabled = p_enabled;
}
Expand Down
6 changes: 6 additions & 0 deletions godot/core/config/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class Engine {
bool use_validation_layers = false;
bool generate_spirv_debug_info = false;
bool extra_gpu_memory_tracking = false;
#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED)
bool accurate_breadcrumbs = false;
#endif
int32_t gpu_idx = -1;

uint64_t _process_frames = 0;
Expand Down Expand Up @@ -186,6 +189,9 @@ class Engine {
bool is_validation_layers_enabled() const;
bool is_generate_spirv_debug_info_enabled() const;
bool is_extra_gpu_memory_tracking_enabled() const;
#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED)
bool is_accurate_breadcrumbs_enabled() const;
#endif
int32_t get_gpu_index() const;

void increment_frames_drawn();
Expand Down
15 changes: 15 additions & 0 deletions godot/core/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,19 @@ Dictionary Geometry2D::make_atlas(const Vector<Size2> &p_rects) {
return ret;
}

TypedArray<Point2i> Geometry2D::bresenham_line(const Point2i &p_from, const Point2i &p_to) {
Vector<Point2i> points = ::Geometry2D::bresenham_line(p_from, p_to);

TypedArray<Point2i> result;
result.resize(points.size());

for (int i = 0; i < points.size(); i++) {
result[i] = points[i];
}

return result;
}

void Geometry2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_point_in_circle", "point", "circle_position", "circle_radius"), &Geometry2D::is_point_in_circle);
ClassDB::bind_method(D_METHOD("segment_intersects_circle", "segment_from", "segment_to", "circle_position", "circle_radius"), &Geometry2D::segment_intersects_circle);
Expand Down Expand Up @@ -968,6 +981,8 @@ void Geometry2D::_bind_methods() {

ClassDB::bind_method(D_METHOD("make_atlas", "sizes"), &Geometry2D::make_atlas);

ClassDB::bind_method(D_METHOD("bresenham_line", "from", "to"), &Geometry2D::bresenham_line);

BIND_ENUM_CONSTANT(OPERATION_UNION);
BIND_ENUM_CONSTANT(OPERATION_DIFFERENCE);
BIND_ENUM_CONSTANT(OPERATION_INTERSECTION);
Expand Down
2 changes: 2 additions & 0 deletions godot/core/core_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ class Geometry2D : public Object {

Dictionary make_atlas(const Vector<Size2> &p_rects);

TypedArray<Point2i> bresenham_line(const Point2i &p_from, const Point2i &p_to);

Geometry2D() { singleton = this; }
};

Expand Down
22 changes: 22 additions & 0 deletions godot/core/error/error_macros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,28 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co
_global_unlock();
}

// For printing errors when we may crash at any point, so we must flush ASAP a lot of lines
// but we don't want to make it noisy by printing lots of file & line info (because it's already
// been printing by a preceding _err_print_error).
void _err_print_error_asap(const String &p_error, ErrorHandlerType p_type) {
if (OS::get_singleton()) {
OS::get_singleton()->printerr("ERROR: %s\n", p_error.utf8().get_data());
} else {
// Fallback if errors happen before OS init or after it's destroyed.
const char *err_details = p_error.utf8().get_data();
fprintf(stderr, "ERROR: %s\n", err_details);
}

_global_lock();
ErrorHandlerList *l = error_handler_list;
while (l) {
l->errfunc(l->userdata, "", "", 0, p_error.utf8().get_data(), "", false, p_type);
l = l->next;
}

_global_unlock();
}

// Errors with message. (All combinations of p_error and p_message as String or char*.)
void _err_print_error(const char *p_function, const char *p_file, int p_line, const String &p_error, const char *p_message, bool p_editor_notify, ErrorHandlerType p_type) {
_err_print_error(p_function, p_file, p_line, p_error.utf8().get_data(), p_message, p_editor_notify, p_type);
Expand Down
1 change: 1 addition & 0 deletions godot/core/error/error_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co
void _err_print_error(const char *p_function, const char *p_file, int p_line, const String &p_error, const char *p_message, bool p_editor_notify = false, ErrorHandlerType p_type = ERR_HANDLER_ERROR);
void _err_print_error(const char *p_function, const char *p_file, int p_line, const char *p_error, const String &p_message, bool p_editor_notify = false, ErrorHandlerType p_type = ERR_HANDLER_ERROR);
void _err_print_error(const char *p_function, const char *p_file, int p_line, const String &p_error, const String &p_message, bool p_editor_notify = false, ErrorHandlerType p_type = ERR_HANDLER_ERROR);
void _err_print_error_asap(const String &p_error, ErrorHandlerType p_type = ERR_HANDLER_ERROR);
void _err_print_index_error(const char *p_function, const char *p_file, int p_line, int64_t p_index, int64_t p_size, const char *p_index_str, const char *p_size_str, const char *p_message = "", bool p_editor_notify = false, bool fatal = false);
void _err_print_index_error(const char *p_function, const char *p_file, int p_line, int64_t p_index, int64_t p_size, const char *p_index_str, const char *p_size_str, const String &p_message, bool p_editor_notify = false, bool fatal = false);
void _err_flush_stdout();
Expand Down
Loading

0 comments on commit 29f913f

Please sign in to comment.