Skip to content

Commit d0f1ccc

Browse files
authored
Merge branch 'Zylann:master' into thirdparty_readme
2 parents bafa848 + e57c974 commit d0f1ccc

File tree

504 files changed

+19739
-9814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

504 files changed

+19739
-9814
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ Steps to reproduce the behavior:
1616
3. Scroll down to '....'
1717
4. See error
1818

19-
Linking a minimal project that reproduces the issue may help:
19+
Linking a minimal project that reproduces the issue may help.
20+
Important rules when making such project:
2021
- Keep it to a minimum, if possible no steps required after launching, or just press one key or button to trigger the test. The more complicated a project is, the more effort it takes to inspect, understand and isolate the issue.
2122
- Remove any scripts, nodes and assets that aren't necessary to reproduce the issue.
2223
- Don't use fullscreen or large screen size.
2324
- If scripts are needed, prefer GDScript, as C# is harder to setup
25+
- Don't embed scripts or shaders inside resource or scenes, save them as their own files
26+
- Prefer resources in text format (.tres, .tscn) instead of binary
2427

2528
If you see any errors in the console, that may also help.
2629

.github/workflows/extension_linux.yml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: 🐧 Linux Extension Builds
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
workflow_call:
8+
9+
concurrency:
10+
# Not using `${{ github.workflow }}` because when called from another workflow, it takes the value of the caller,
11+
# which leads to unexpected cancellation.
12+
# See https://github.com/orgs/community/discussions/30708
13+
# group: ${{ github.workflow }}-${{ github.ref }}
14+
group: linux-extension-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
# Global Cache Settings
18+
# SCONS_CACHE for windows must be set in the build environment
19+
env:
20+
# GDExtension is still experimental, so we target latest instead of a "stable" Godot version.
21+
GODOT_BASE_BRANCH: "master"
22+
SCONS_CACHE_LIMIT: 4096
23+
# This is to inform our SConstruct build script where GodotCpp is.
24+
GODOT_CPP_PATH: thirdparty/godot-cpp
25+
26+
jobs:
27+
extension-linux:
28+
runs-on: "ubuntu-22.04"
29+
name: ${{matrix.name}}
30+
31+
strategy:
32+
matrix:
33+
include:
34+
- name: master Editor
35+
target: editor
36+
dev_build: no
37+
executable_name: libvoxel.linux.editor.x86_64.so
38+
39+
- name: master Release
40+
target: template_release
41+
dev_build: no
42+
executable_name: libvoxel.linux.template_release.x86_64.so
43+
44+
steps:
45+
# Clone our repo
46+
- uses: actions/checkout@v4
47+
48+
# Clone GodotCpp
49+
- uses: actions/checkout@v4
50+
with:
51+
repository: godotengine/godot-cpp
52+
ref: master
53+
path: ${{env.GODOT_CPP_PATH}}
54+
55+
# Upload cache on completion and check it out now
56+
- name: Load .scons_cache directory
57+
id: linux-gdextension-cache
58+
uses: actions/cache@v4
59+
with:
60+
path: ${{github.workspace}}/.scons_cache/
61+
key: ${{github.job}}-${{matrix.target}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
62+
restore-keys: |
63+
${{github.job}}-${{matrix.target}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
64+
${{github.job}}-${{matrix.target}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
65+
${{github.job}}-${{matrix.target}}-${{env.GODOT_BASE_BRANCH}}
66+
67+
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
68+
- name: Set up Python 3.x
69+
uses: actions/setup-python@v5
70+
with:
71+
# Semantic version range syntax or exact version of a Python version
72+
python-version: '3.x'
73+
# Optional - x64 or x86 architecture, defaults to x64
74+
architecture: 'x64'
75+
76+
# Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
77+
- name: Configuring Python packages
78+
run: |
79+
python -c "import sys; print(sys.version)"
80+
python --version
81+
python -m pip install scons
82+
scons --version
83+
84+
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags.
85+
# Note: if we need to use `custom_api_file`, remember the path should be relative to where godot-cpp is
86+
- name: Compilation
87+
env:
88+
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
89+
run: |
90+
scons platform=linux target=${{matrix.target}} dev_build=${{matrix.dev_build}}
91+
cd project/addons/zylann.voxel/bin
92+
dir
93+
94+
# Make build available
95+
- uses: actions/upload-artifact@v4
96+
#if: ${{ matrix.target == 'Editor' }}
97+
with:
98+
name: ${{matrix.executable_name}}
99+
path: project/addons/zylann.voxel/bin/${{matrix.executable_name}}
100+
+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
2+
# Generates a GDExtension release package of the plugin.
3+
4+
name: Make GDExtension release package
5+
on:
6+
workflow_dispatch:
7+
8+
9+
jobs:
10+
build_linux:
11+
uses: Zylann/godot_voxel/.github/workflows/extension_linux.yaml@master
12+
13+
build_windows:
14+
uses: Zylann/godot_fast_noise_2/.github/workflows/windows.yaml@master
15+
16+
dist:
17+
runs-on: ubuntu-22.04
18+
needs: [build_linux, build_windows]
19+
20+
steps:
21+
# Clone our repo
22+
- uses: actions/checkout@v4
23+
24+
# Get builds
25+
# Downloads all artifacts
26+
- uses: actions/download-artifact@v4
27+
with:
28+
pattern: libvoxel.*
29+
path: project/addons/zylann.voxel/bin
30+
31+
# Fix downloaded builds:
32+
# download-artifact does not just download the file we want:
33+
# it also creates a folder of the same name, and then puts the contents in it.
34+
# See https://github.com/actions/download-artifact/issues/141
35+
- name: "Fix downloaded artifacts"
36+
run: |
37+
cd project/addons/zylann.voxel/bin
38+
39+
mv libvoxel.linux.editor.x86_64.so temp
40+
mv temp/libvoxel.linux.editor.x86_64.so libvoxel.linux.editor.x86_64.so
41+
rm -d temp
42+
43+
mv libvoxel.linux.template_release.x86_64.so temp
44+
mv temp/libvoxel.linux.template_release.x86_64.so libvoxel.linux.template_release.x86_64.so
45+
rm -d temp
46+
47+
mv libvoxel.windows.editor.x86_64.dll temp
48+
mv temp/libvoxel.windows.editor.x86_64.dll libvoxel.windows.editor.x86_64.dll
49+
rm -d temp
50+
51+
mv libvoxel.windows.template_release.x86_64.dll temp
52+
mv temp/libvoxel.windows.template_release.x86_64.dll libvoxel.windows.template_release.x86_64.dll
53+
rm -d temp
54+
55+
# Copy license
56+
- name: "Copy license"
57+
run: |
58+
cp LICENSE.md project/addons/zylann.voxel
59+
60+
# Setup GDExtension file
61+
- name: "Setup GDExtension file"
62+
run: |
63+
cd project/addons/zylann.voxel
64+
mv voxel.gdextension-release voxel.gdextension
65+
66+
# Remove unwanted files because upload-artifacts cannot filter files that go in the archive.
67+
# The goal is to get an archive that can be decompressed at the root of a Godot project,
68+
# and have only necessary files go in matching directories. This is how the asset library works (otherwise the
69+
# user has to remember to manually choose the right path to the addons/ folder)
70+
- name: "Filter files"
71+
# Delete all files in `project/` except the `addons` folder
72+
run: |
73+
cd project
74+
find -maxdepth 1 -type f -delete
75+
ls -l
76+
77+
# Make package
78+
- uses: actions/upload-artifact@v4
79+
with:
80+
name: GodotVoxelExtension
81+
path: project

.github/workflows/extension_windows.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ on:
44
branches: [ master ]
55
pull_request:
66
branches: [ master ]
7+
workflow_call:
78

89
concurrency:
9-
group: ${{ github.workflow }}-${{ github.ref }}
10+
# Not using `${{ github.workflow }}` because when called from another workflow, it takes the value of the caller,
11+
# which leads to unexpected cancellation.
12+
# See https://github.com/orgs/community/discussions/30708
13+
# group: ${{ github.workflow }}-${{ github.ref }}
14+
group: windows-extension-${{ github.ref }}
1015
cancel-in-progress: true
1116

1217
# Global Cache Settings
@@ -51,7 +56,7 @@ jobs:
5156
# Upload cache on completion and check it out now
5257
# Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
5358
- name: Load .scons_cache directory
54-
id: windows-editor-cache
59+
id: windows-gdextension-cache
5560
#uses: ${{matrix.cache_action}}
5661
uses: actions/cache@v4
5762
with:

.github/workflows/fuzzer.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ jobs:
5959
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
6060
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
6161
62+
# Fix the issue of running out of disk space during Compilation stage
63+
# Taken from here: https://github.com/orgs/community/discussions/26351#discussioncomment-3251595
64+
- name: Free disk space
65+
run: |
66+
sudo swapoff -a
67+
sudo rm -f /swapfile
68+
sudo apt-get clean
69+
docker rmi $(docker image ls -aq)
70+
df -h
71+
6272
# NO-PIE is for more detailed bactraces with line symbols
6373
- name: Compilation
6474
env:
@@ -70,7 +80,7 @@ jobs:
7080
#mkdir bin/
7181
#mv Godot_v4.0-beta3_linux.x86_64 bin/godot.linuxbsd.editor.dev.x86_64.san
7282
73-
scons target=editor use_ubsan=yes use_asan=yes linker=gold dev_build=yes CCFLAGS="-fpie" LINKFLAGS="-no-pie"
83+
scons target=editor use_ubsan=yes use_asan=yes linker=gold dev_build=yes CCFLAGS="-fpie" LINKFLAGS="-no-pie" "cache_path=${{github.workspace}}/.scons_cache/"
7484
7585
- uses: actions/upload-artifact@v4
7686
with:
@@ -107,7 +117,9 @@ jobs:
107117
uses: actions/checkout@v4
108118
with:
109119
repository: qarmin/Qarminer
110-
ref: ${{ env.GODOT_BASE_BRANCH }}
120+
# At the time of writing, qarmin did not put out later than 4.1 versions, but claims that it works with Godot versions up to 4.3+
121+
# See https://github.com/qarmin/Qarminer/issues/32
122+
ref: 4.1
111123
path: fuzzer
112124

113125
- name: Copy fuzzer settings

.github/workflows/linux.yml

+52-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🐧 Linux Builds
22
on:
33
push:
4-
branches: [ master, github_actions, "1.2" ]
4+
branches: [ master ]
55
pull_request:
66
branches: [ master ]
77

@@ -11,11 +11,11 @@ concurrency:
1111

1212
# Global Cache Settings
1313
env:
14-
SCONS_CACHE_LIMIT: 4096
14+
SCONS_CACHE_LIMIT_GB: 4
1515

1616
jobs:
1717
linux:
18-
runs-on: "ubuntu-20.04"
18+
runs-on: "ubuntu-22.04"
1919
name: ${{matrix.name}}
2020

2121
strategy:
@@ -33,6 +33,7 @@ jobs:
3333
# To fix this we would have to cherry-pick 41890ff9c3028d3b05d993f8f7ec42c346824304 to the 4.0 branch.
3434
# There might be other issues cropping up, since there doesn't seem to be an official CI checking this.
3535
warnings: all
36+
werror: yes
3637

3738
- name: 4.1 Editor
3839
precision: single
@@ -41,40 +42,72 @@ jobs:
4142
executable_name: godot.linuxbsd.editor.x86_64
4243
godot_base_branch: "4.1"
4344
warnings: extra
44-
45+
werror: yes
46+
47+
- name: 4.2 Editor
48+
precision: single
49+
target: editor
50+
production: no
51+
executable_name: godot.linuxbsd.editor.x86_64
52+
godot_base_branch: "4.2"
53+
warnings: extra
54+
# TODO Had to turn off warning as errors, even though it worked in the past.
55+
# Downgrading warnings to `all` or `moderate` did not fix it.
56+
# Something in Godot 4.2, or in the version of GCC in the buildroot, has changed causing this to happen:
57+
# drivers/gles3/storage/texture_storage.cpp:1513:31: error: 'void* memset(void*, int, size_t)'
58+
# specified bound between 18446744065119617024 and 18446744073709551612 exceeds maximum object size
59+
# [-Werror=stringop-overflow=]
60+
# memset(v_offsets, 0, sizeof(int) * base_size);
61+
# ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62+
# Looking at the code, I could not find what's wrong.
63+
werror: no
64+
65+
- name: 4.3 Editor
66+
precision: single
67+
target: editor
68+
production: no
69+
executable_name: godot.linuxbsd.editor.x86_64
70+
godot_base_branch: "4.3"
71+
warnings: extra
72+
werror: yes
73+
4574
- name: master Editor
4675
precision: single
4776
target: editor
4877
production: no
4978
executable_name: godot.linuxbsd.editor.x86_64
5079
godot_base_branch: "master"
5180
warnings: extra
81+
werror: yes
5282

5383
# --- Builds with artifacts ---
5484

55-
- name: 4.2 Editor
85+
- name: 4.4 Editor
5686
precision: single
5787
target: editor
5888
production: yes
5989
executable_name: godot.linuxbsd.editor.x86_64
60-
godot_base_branch: "4.2.2-stable"
90+
godot_base_branch: "4.4-stable"
6191
warnings: extra
92+
werror: yes
6293

63-
- name: 4.2 Template
94+
- name: 4.4 Template
6495
precision: single
6596
target: template_release
6697
production: yes
6798
executable_name: godot.linuxbsd.template_release.x86_64
68-
godot_base_branch: "4.2.2-stable"
99+
godot_base_branch: "4.4-stable"
69100
warnings: extra
101+
werror: yes
70102

71-
- name: 4.2 Editor Float64
103+
- name: 4.4 Editor Float64
72104
precision: double
73105
target: editor
74106
production: yes
75107
executable_name: godot.linuxbsd.editor.double.x86_64
76-
godot_base_branch: "4.2.2-stable"
108+
godot_base_branch: "4.4-stable"
77109
warnings: extra
110+
werror: yes
78111

79112
steps:
80113
# Clone Godot
@@ -97,7 +130,7 @@ jobs:
97130
# the working directory for all following steps.
98131
- name: Setup buildroot
99132
run: |
100-
wget https://download.tuxfamily.org/godotengine/toolchains/linux/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
133+
wget https://github.com/godotengine/buildroot/releases/download/godot-2023.08.x-4/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
101134
tar -xjf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
102135
cd x86_64-godot-linux-gnu_sdk-buildroot
103136
./relocate-sdk.sh
@@ -152,10 +185,17 @@ jobs:
152185
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
153186
- name: Compilation
154187
env:
188+
# `SCONS_CACHE` and `SCONS_CACHE_LIMIT` became deprecated since
189+
# https://github.com/godotengine/godot/commit/0e4a4e3c4d602691ce1b4fc6a721c5c637ead57f
190+
# However since we are also building versions preceding that change,
191+
# we have to keep them in addition to the new parameters
155192
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
193+
# The new way uses a different unit.
194+
# I wish I could do `SCONS_CACHE_LIMIT_GB * 1024` but it isn't documented as an available operator
195+
SCONS_CACHE_LIMIT: 4096
156196
run: |
157197
PATH=${GITHUB_WORKSPACE}/x86_64-godot-linux-gnu_sdk-buildroot/bin:$PATH
158-
scons verbose=yes warnings=${{matrix.warnings}} werror=yes platform=linuxbsd tests=no dev_build=no target=${{matrix.target}} production=${{matrix.production}} precision=${{matrix.precision}}
198+
scons verbose=yes warnings=${{matrix.warnings}} werror=${{matrix.werror}} platform=linuxbsd tests=no dev_build=no target=${{matrix.target}} production=${{matrix.production}} precision=${{matrix.precision}} "cache_path=${{github.workspace}}/.scons_cache/" cache_limit=${{env.SCONS_CACHE_LIMIT_GB}}
159199
160200
# Make build available
161201
- uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)