Skip to content

Commit

Permalink
binaries have been moved to the release archives.
Browse files Browse the repository at this point in the history
updated .vscode/c_cpp_props
fixed readme urls
web: fixed bigint mismatch. Added patch. Returned chrono usage. Updated Emscripten.
telemetry integration has been simplified.
  • Loading branch information
DmitriySalnikov committed Sep 11, 2024
1 parent e689306 commit 838bb01
Show file tree
Hide file tree
Showing 44 changed files with 168 additions and 240 deletions.
18 changes: 0 additions & 18 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,20 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

# Ignore some files when exporting to a ZIP.
/.clang-format export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.gitmodules export-ignore
/.github export-ignore
/LICENSE export-ignore
/SConstruct export-ignore
/Doxyfile export-ignore
/*.* export-ignore
/src export-ignore
/godot-cpp export-ignore
/jni export-ignore
/patches export-ignore
/images export-ignore
/docs export-ignore
/dd3d_web_build export-ignore
6 changes: 3 additions & 3 deletions .github/actions/compile_gdextension/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ inputs:
description: Secrets token
telemetry_version:
description: Telemetry version
default: 0d1d7b0b889fc1a00b5229cf567a7626c585749d
default: b8386398c134f3c7503139e84f952d62207e54ae
runs:
using: composite
steps:
Expand All @@ -46,7 +46,7 @@ runs:
- name: Checkout telemetry repo
uses: actions/checkout@v4
id: checkout_tele_repo
if: ${{env.PRODUCTION_BUILD == 'true' && inputs.target == 'editor'}}
if: ${{env.PRODUCTION_BUILD == 'true' && contains(fromJSON('["template_debug", "editor"]'), inputs.target) && contains(fromJSON('["linux", "macos", "windows"]'), inputs.platform)}}
continue-on-error: true
with:
repository: ${{github.repository_owner}}/my_telemetry_modules
Expand Down Expand Up @@ -97,7 +97,7 @@ runs:
scons apply_patches
telemetry_args=""
if [ "${{env.PRODUCTION_BUILD}}" == "true" ] && [ "${{inputs.target}}" == "editor" ] && [ "${{steps.checkout_tele_repo.conclusion}}" == "success" ]; then
if [[ "${{env.PRODUCTION_BUILD}}" == "true" && " template_debug editor " == *" ${{inputs.target}} "* && " linux macos windows " == *" ${{inputs.platform}} "* && "${{steps.checkout_tele_repo.conclusion}}" == "success" ]]; then
telemetry_args="telemetry_enabled=yes"
fi
scons_params="platform=${{inputs.platform}} arch=${{inputs.arch}} target=${{inputs.target}} addon_output_dir=${{inputs.output_libs_path}} ${{inputs.additional}}"
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/gdextension_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ on:

# Stop the same workflow actions
concurrency:
group: ${{github.workflow}}-${{github.event.pull_request.number || github.ref}}
group: ${{github.workflow}}-${{github.event.pull_request.number || github.ref}}-${{inputs.production_build}}
cancel-in-progress: true

permissions:
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
threads: [yes, no]

env:
EM_VERSION: 3.1.63
EM_VERSION: 3.1.64

steps:
- name: Checkout
Expand Down Expand Up @@ -308,6 +308,7 @@ jobs:
with:
name: ${{steps.output_info.outputs.artifact_name}}
retention-days: 7
include-hidden-files: true
path: extracted_files/*

# ============================================
Expand All @@ -333,7 +334,9 @@ jobs:
env:
# Sync with container: image:
GODOT_VERSION: 4.2.1-stable
ADDON_DIR: debug_draw_3d
PROJECT_PATH: dd3d_web_build
TESTS_PATH: examples_dd3d

steps:
- name: Checkout code
Expand All @@ -342,19 +345,19 @@ jobs:
- name: Delete old libs folder
shell: bash
run: |
rm -rf addons/debug_draw_3d/libs
rm -rf addons/${{env.ADDON_DIR}}/libs
- name: Download Binaries
uses: actions/download-artifact@v4
with:
path: addons/debug_draw_3d/libs
path: addons/${{env.ADDON_DIR}}/libs
name: ${{needs.collect-gdextension.outputs.artifact_name}}

- name: Prepare Test Project
shell: bash
run: |
cp -r addons ${{env.PROJECT_PATH}}/addons
cp -r examples_dd3d ${{env.PROJECT_PATH}}/examples_dd3d
cp -r ${{env.TESTS_PATH}} ${{env.PROJECT_PATH}}/${{env.TESTS_PATH}}
find ${{env.PROJECT_PATH}} -mindepth 1
- name: Setup Godot
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/util_update_libs.yml

This file was deleted.

112 changes: 112 additions & 0 deletions .github/workflows/util_upload_release_binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: 📈 Upload new draft artifacts

on:
workflow_dispatch:

# Stop the same workflow actions
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
get_version:
name: Get the current version
runs-on: ubuntu-latest
outputs:
version: ${{steps.getversion.outputs.version}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: src/version.h

- name: Get library version
id: getversion
shell: bash
env:
REF: ${{github.ref_name}}
run: |
# Get lib version
source_file="src/version.h"
major=$(grep -oP '(?<=#define DD3D_MAJOR )\d+' "$source_file")
minor=$(grep -oP '(?<=#define DD3D_MINOR )\d+' "$source_file")
patch=$(grep -oP '(?<=#define DD3D_PATCH )\d+' "$source_file")
version_string="$major.$minor.$patch"
echo "version=$version_string" >> $GITHUB_OUTPUT
echo "Library Version found in file \`version.h\`: \`$version_string\`" >> $GITHUB_STEP_SUMMARY
create_release_artifact:
name: Create release artifact
needs: get_version
runs-on: ubuntu-latest
outputs:
zipname: ${{steps.zip.outputs.zipname}}

env:
ADDON_FOLDER_NAME: debug_draw_3d
ADDON_ROOT_FOLDER_NAME: debug_draw_3d-${{needs.get_version.outputs.version}}
RELEASE_PREFIX_NAME: debug-draw-3d
DOWNLOAD_ARTIFACT_NAME: .gdextension_libs_production

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
path: ${{env.ADDON_ROOT_FOLDER_NAME}} # godot asset library by default skips root folder
sparse-checkout: |
addons
sparse-checkout-cone-mode: false

- name: Download Binaries
uses: dawidd6/action-download-artifact@v6
with:
workflow: gdextension_build.yml
branch: ${{github.ref_name}}
name: ${{env.DOWNLOAD_ARTIFACT_NAME}}
name_is_regexp: false
search_artifacts: true
skip_unpack: false
path: ${{env.ADDON_ROOT_FOLDER_NAME}}/addons/${{env.ADDON_FOLDER_NAME}}/libs
#event: workflow_dispatch

- name: Create ZIP archive
id: zip
run: |
zipname="${{env.RELEASE_PREFIX_NAME}}_${{needs.get_version.outputs.version}}.zip"
zip -r $zipname ${{env.ADDON_ROOT_FOLDER_NAME}}/addons
echo "zipname=$zipname" >> $GITHUB_OUTPUT
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{steps.zip.outputs.zipname}}
retention-days: 7
path: ${{steps.zip.outputs.zipname}}

upload_github_draft:
name: Upload GitHub draft
needs:
- get_version
- create_release_artifact
runs-on: ubuntu-latest

steps:
- name: Download Binaries
uses: actions/download-artifact@v4
with:
merge-multiple: true

- name: Upload Draft Assets
uses: softprops/action-gh-release@v2
with:
draft: true
tag_name: ${{needs.get_version.outputs.version}}
files: ${{needs.create_release_artifact.outputs.zipname}}
generate_release_notes: true
append_body: true
fail_on_unmatched_files: true
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ used_classes.json
.mono/
obj/
bin/
libs/
cmake_build_out/*
src/gen/*
src/editor/my_telemetry_modules
addons/debug_draw_3d/libs/~*
addons/debug_draw_3d/gen/*
addons/debug_draw_3d/gen/
clang_rt.asan_*
docs/images/classes/temp/
SUCCESS
8 changes: 5 additions & 3 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
"TYPED_METHOD_BIND",
"HOT_RELOAD_ENABLED",
"TOOLS_ENABLED",
"TELEMETRY_ENABLED"
"TELEMETRY_ENABLED",
"TELEMETRY_PROJECT_DD3D"
],
"windowsSdkVersion": "10.0.22000.0",
"compilerPath": "cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64",
"compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe"
"intelliSenseMode": "windows-msvc-x64"
}
],
"version": 4
Expand Down
4 changes: 3 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ patches_to_apply = [
"patches/godot_cpp_exclude_unused_classes.patch", # Removes unused godot-cpp classes from the build process
"patches/unity_build.patch", # Speeds up the build by merging the source files. It can increase the size of assemblies.
"patches/web_threads.patch", # Adds the build flag that appeared in Godot 4.3. Required for a web build compatible with Godot 4.3.
"patches/big_int_fix.patch", # Fixes runtime link errors
]

print(
Expand Down Expand Up @@ -63,7 +64,7 @@ def setup_defines_and_flags(env: SConsEnvironment, src_out):
if env["telemetry_enabled"]:
tele_src = "editor/my_telemetry_modules/GDExtension/usage_time_reporter.cpp"
if os.path.exists(os.path.join(src_folder, tele_src)):
env.Append(CPPDEFINES=["TELEMETRY_ENABLED"])
env.Append(CPPDEFINES=["TELEMETRY_ENABLED", "TELEMETRY_PROJECT_DD3D"])
src_out.append(tele_src)
print("Compiling with telemetry support!")
else:
Expand Down Expand Up @@ -137,6 +138,7 @@ def get_android_toolchain() -> str:
sys.path.pop(0)
return os.path.join(android.get_android_ndk_root(env), "build/cmake/android.toolchain.cmake")


# Additional build of the projects via CMake
# def build_cmake(target, source, env: SConsEnvironment):
# extra_flags = []
Expand Down
4 changes: 2 additions & 2 deletions addons/debug_draw_3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Based on my previous addon, which was developed [only for C#](https://github.com

Your support adds motivation to develop my public projects.

<a href="https://boosty.to/dmitriysalnikov/donate"><img src="./docs/images/boosty.png" alt="Boosty" width=150px/></a>
<a href="https://boosty.to/dmitriysalnikov/donate"><img src="/docs/images/boosty.png" alt="Boosty" width=150px/></a>

<img src="./docs/images/USDT-TRC20.png" alt="USDT-TRC20" width=150px/>
<img src="/docs/images/USDT-TRC20.png" alt="USDT-TRC20" width=150px/>

<b>USDT-TRC20 TEw934PrsffHsAn5M63SoHYRuZo984EF6v</b>

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Loading

0 comments on commit 838bb01

Please sign in to comment.