Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added GitHub workflow and other enhancements #8

Merged
merged 25 commits into from
Sep 1, 2024

Conversation

FibreFoX
Copy link
Contributor

This should fix #3 (for real this time).

Small overview what this PR improves:

  • added support for Godot 4.0.x too (using a simple macro for the changed typedef, and some SCons magic with compatibility_minimum version)
  • removed all pre-built binaries, as they will now generated by Github Action runners
  • reworked the file structure to avoid duplications, e.g. the icon inside the actual addon folder (will be generated/copied via SCons)
  • renamed several places to gdTree3D, because it was confusing sometimes (even was mentioned in the video https://www.youtube.com/watch?v=4aPkTQuo53E where this Godot extension was mentioned), except the generated library filename (could not figure it out)
  • introduces docker-based build image for generating Windows and Linux binaries (made it a bit more easy to create them fast locally)
  • and of course generating binaries for MacOS, Linux and Windows for several CPU architectures
  • automatic DRAFT RELEASE creation when a new git tag was created, which includes all the generated ZIP packages, separated into "demo project" and "only addon"

Details about the Github Actions workflow:
Artifacts can only be downloaded when being logged into some Github account (seems to be a quite new restriction, there is an open issue, which I forgot to bookmark). Checking for it can be reached via the navigation, where all the workflows then are listed:
grafik

The draft release is created when a git-tag is created starting with the letter v (e.g. v1.0.0), and can be found in the sidebar navigation:
grafik
grafik

Important: I do not have access to any Apple Silicon/Apple-ARM-CPU system, where I could check the "Universal 2"-MacOS-binary. If this is faulty (like I had problems with all the 64bit binaries before, see #5 (comment)), just ping me, so I can fix it fast.

I tried to not change too much, and did add a lot of commits (sorry for the commit noise). But I had a ton of fun creating this workflow.

If there are any more changes, feel free to contact me, or write me here via this PR.

…Windows and Linux binaries

using "windows-latest" and "ubuntu-latest" resulted in non-working library files
did not have to do this in local docker tests
previous experiments resulted in unusable/corrupted DLL/SO files
…S binaries

this makes it more easy to run "in parallel" and removes the need for many IF-conditions in action-steps
found this trick by checking godotengine/godot-cpp#1518 again for solutions by others
@FibreFoX
Copy link
Contributor Author

I tried to add good comments and references across my changes, hopefully they help.

@FibreFoX FibreFoX marked this pull request as draft August 30, 2024 22:02
@FibreFoX
Copy link
Contributor Author

FibreFoX commented Aug 30, 2024

There still is something wrong with the icon ;) let me fix that before you hit "merge"!

Problem right now:
grafik

EDIT: fixed, see comments below

Maybe that was the reason for the weird "gdTree3D" vs "Tree3D" naming?

@FibreFoX
Copy link
Contributor Author

FibreFoX commented Aug 30, 2024

Okay, found the issue .... and it's somewhat unexpected, maybe this is a (known) Godot bug:
it depends on the "Type", when changing it to "gdTree3D" it works with my changes
grafik

EDIT: I found godotengine/godot#75472 which points to the [icons]-section ... thats why it did not find the icon after changing to gdTree3d...

@JekSun97 as this is your gdExtension ... do you prefer the name "Tree3D" or are you okay with "gdTree3D"?

@FibreFoX FibreFoX marked this pull request as ready for review August 30, 2024 23:01
@JekSun97
Copy link
Owner

JekSun97 commented Sep 1, 2024

@FibreFoX Thanks for the work done on GitHub Action! For me this is a particularly complex and unexplored topic :D

I would like to keep the name "Tree3D" instead of "gdTree3D" as it matches the naming of nodes in Godot Engine, I used gd at the beginning of the name so people would understand that it is related to Godot, maybe I should correct this confusion in README.md

@FibreFoX
Copy link
Contributor Author

FibreFoX commented Sep 1, 2024

@JekSun97 I am more used to GitLab, so using GA was an adventure for me too ;)

Regarding the name: sure, will change it, please wait some time for the changes before merging ;) I will change the README accordingly, will be part of my changes (less for you to do :D)

@FibreFoX FibreFoX marked this pull request as draft September 1, 2024 17:03
@FibreFoX FibreFoX marked this pull request as ready for review September 1, 2024 19:15
@FibreFoX
Copy link
Contributor Author

FibreFoX commented Sep 1, 2024

@JekSun97 I think my changes are complete now, please verify that my changes are working for you. Here the link to the workflow for my last commit (you can find the binaries there): https://github.com/FibreFoX/gdTree3D/actions/runs/10656732794

EDIT: of course I had to fix the icon again ;)

@JekSun97 JekSun97 merged commit f34effd into JekSun97:main Sep 1, 2024
@JekSun97
Copy link
Owner

JekSun97 commented Sep 1, 2024

Thank you!

@FibreFoX
Copy link
Contributor Author

FibreFoX commented Sep 1, 2024

@JekSun97 just remember, when creating a git-tag, there will be automatically a draft-release created ;) no more manually adding the files

@JekSun97
Copy link
Owner

JekSun97 commented Sep 1, 2024

@JekSun97 just remember, when creating a git-tag, there will be automatically a draft-release created ;) no more manually adding the files

Are they built from the main branch?

is the workflow like this?:

  1. Add fixes\new features to the main branch
  2. Create a release (without adding dll files)

Will the release contain all the built dll files for the operating systems?

@FibreFoX
Copy link
Contributor Author

FibreFoX commented Sep 2, 2024

Right now this workflow reacts on 2 events:

A github release in "draft"-state will be created for every git tag this workflow is running:

if: ${{ startsWith(github.ref, 'refs/tags/') }}

Git tags can be created on any git commit, and are not "branch"-oriented.

These "draft"-state releases will contain ALL the generated binaries, means for all Godot versions, see the screenshot:
363338619-e2ff691a-6ce3-4107-9b64-7b6331f14f66
These ZIP files contain all the binaries for all operating systems and all CPU architectures (at least all that are getting built by the workflow)

So all it requires from your side is to push normally, and when you feel finished, just create a git tag for that commit you like. After that (and the workflow having processed everything, which takes about 20 minutes), you only need to adjust the description of the "draft"-state release, and release that one.

@FibreFoX FibreFoX deleted the github_workflows branch September 2, 2024 20:04
@FibreFoX
Copy link
Contributor Author

FibreFoX commented Sep 3, 2024

@JekSun97 Just saw the new release ;) the created draft-release already contained different ZIP files, which contained the complete addon and the demo-projects. Did you not use them on purpose?

@FibreFoX
Copy link
Contributor Author

FibreFoX commented Sep 3, 2024

Tiny note: I see that you are not using proper git tags, please only use anything that starts with v. The current new release starts with Tree3D_v ;) no need for the product name being part of the git tags. Thats why no draft-release was created, in addition to that, the 64bit version for Godot4.3 is missing for Windows and some MacOS binaries
grafik

@JekSun97
Copy link
Owner

JekSun97 commented Sep 4, 2024

@FibreFoX I was a bit hasty and as usual got confused in all this :D, for the next release, before its release, I will need to contact you for step-by-step instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

other operating systems
2 participants