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
  • Loading branch information
fire committed Oct 27, 2024
1 parent 386f505 commit b566d9b
Show file tree
Hide file tree
Showing 146 changed files with 7,392 additions and 1,017 deletions.
149 changes: 99 additions & 50 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
permissions:
pull-requests: write
actions: write
Expand All @@ -30,7 +30,7 @@ jobs:
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
Expand All @@ -43,67 +43,116 @@ jobs:
if: always()
with:
path: |
.scons_cache
emsdk
osxcross
jdk
android_sdk
vulkan_sdk
.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 }}-${{ 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 }}'"
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
Expand All @@ -112,4 +161,4 @@ jobs:
uses: actions/upload-artifact/merge@v4
with:
name: v-sekai-world
delete-merged: true
delete-merged: true
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
12 changes: 6 additions & 6 deletions godot/core/math/geometry_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,17 +451,17 @@ class Geometry2D {
return H;
}

static Vector<Point2i> bresenham_line(const Point2i &p_start, const Point2i &p_end) {
static Vector<Point2i> bresenham_line(const Point2i &p_from, const Point2i &p_to) {
Vector<Point2i> points;

Vector2i delta = (p_end - p_start).abs() * 2;
Vector2i step = (p_end - p_start).sign();
Vector2i current = p_start;
Vector2i delta = (p_to - p_from).abs() * 2;
Vector2i step = (p_to - p_from).sign();
Vector2i current = p_from;

if (delta.x > delta.y) {
int err = delta.x / 2;

for (; current.x != p_end.x; current.x += step.x) {
for (; current.x != p_to.x; current.x += step.x) {
points.push_back(current);

err -= delta.y;
Expand All @@ -473,7 +473,7 @@ class Geometry2D {
} else {
int err = delta.y / 2;

for (; current.y != p_end.y; current.y += step.y) {
for (; current.y != p_to.y; current.y += step.y) {
points.push_back(current);

err -= delta.x;
Expand Down
Loading

0 comments on commit b566d9b

Please sign in to comment.