-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
test: support switching API versions in check.sh #1016
base: master
Are you sure you want to change the base?
Conversation
43f3641
to
7a84b32
Compare
do we have to add support for specifically gdvm here? isn't the main advantage of this PR that you can specify a godot api version to compile against? i feel like it should be possible to do something like |
For the API features to get built in line with the version it felt cleaner to just roll it all together rather than chain two commands together. But I'm not picky if you have a preferred alternative. |
i do agree that it's cleaner, but only if you are already using gdvm. so id prefer changing it so that it only sets the api version feature. also since almost everything is related to godot, including "godot" in |
Those are great points. Let me see if the bin path var would let arguments right now the way it is. I think possibly it would need an addl. var for arguments based on how it is being included in the script (e.g. |
7a84b32
to
c6f32b1
Compare
c6f32b1
to
c64574f
Compare
I just split the API version from the version mechanism for gdvm and updated this PR's description. This allows for a clean and simple syntax with gdvm installed but allows selecting the API version if not using gdvm, also. What're your thoughts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
While I appreciate the integration efforts with your project gdvm
(I assume this one), I don't think it's in godot-rust's scope to integrate to third-party tools, unless they're official or so widely used that they've become de-facto standard in the Godot ecosystem. There are various reasons for this: unclear which tools should be integrated, who maintains the integration, if/how they are updated, whether their API is stable, more testing/bug surface and overall complexity/scope of the project. This reasoning also extends to tooling such as the check.sh
script.
If you're interested in customizing your workflow, our .gitignore
features a /script
entry, in which you can add various scripts without interfering with files under version control. Regarding CI, we already test multiple versions, with various feature flags. If you fork the project, you can use GitHub Actions in your own repository and push changes there until they're ready for a PR. I find the feedback times quite reasonable (5-8min for full CI, 2-4 for minimal CI).
Apart from that, check.sh
is mostly meant as a quick local check, but the CI workflows remain the authority on what's considered correct/suitable (also in case of discrepancies between CI and check.sh
). Considering that, the -a|--api-version
to set the api-version
feature seems like a good addition, but functionality beyond that should probably be delegated to third-party tools.
So it would be nice if you could reduce the PR to the -a|--api-version
flag. I feel a bit bad for the effort that went into the other parts, but please don't hesitate to discuss ideas before implementation next time 🙂
I can split off the -g flag into my own script. Don't worry about any effort wasted, it really wasn't. I made this change primarily for myself when I was testing against API versions and opened up this PR in the event it might be helpful to others. Since this script is just for the convenience of contributors, I didn't really think it be the same as an integration into the actual project. I'll move the sugar into a script in I'll add a # Windows:
# Test against specifically 4.3.0 Godot with API version 4-3
GODOT4_BIN="gdvm" GODOT_ARGS="run --force --console 4.3.0 --" ./check.sh itest -a 4.3
# Test against latest 4.3.x Godot with API version 4-3
GODOT4_BIN="gdvm" GODOT_ARGS="run --force --console 4.3 --" ./check.sh itest -a 4.3
# Other platforms (*nix, macOS):
# Test against specifically 4.3.0 Godot with API version 4-3
GODOT4_BIN="gdvm" GODOT_ARGS="run --force 4.3.0 --" ./check.sh itest -a 4.3
# Test against latest 4.3.x Godot with API version 4-3
GODOT4_BIN="gdvm" GODOT_ARGS="run --force 4.3 --" ./check.sh itest -a 4.3 Which is a bit long and clunky, but it works. I'll get to this when I have a moment. |
Would something like this not work? GODOT4_BIN="gdvm run --console 4.3 --" |
Not the way it's being used in the script, no: run "$godotBin" --path itest/godot --headless -- "[${extraArgs[@]}]" This would give you a |
c64574f
to
d445ffe
Compare
d445ffe
to
9ec7ff8
Compare
Allows easily testing with a given version of the Godot API bindings simply by passing a version to the -a/--api-version parameter.
9ec7ff8
to
23bce47
Compare
Addressed comments and rebased onto main. |
Allows easily testing against a given version of the API bindings simply by passing a version to the
-a/--api-version
parameter.I've been using this patch on my machine for integration testing.