-
-
Notifications
You must be signed in to change notification settings - Fork 161
Add build.zig and integrate with CI #143
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
Conversation
|
@dougbinks I'll fix some of the rough edges as soon as I have time (hopefully tomorrow). Although the PR is still a draft (see TODOs in build.zig and task_priorities is not properly used yet), please take a look when you have time :D |
f06a93c to
9147a70
Compare
f58b2fa to
327d7f7
Compare
|
@dougbinks I think I may have found a enkiTS bug? |
|
Using i.e |
I can't replicate this in C++. If I set Which is as expected. I could add range checks to the priorities but I'd rather setting a wrong priority failed at compile or run time than silently do the wrong thing, which could end up in a random deadlock. |
|
I think there's something wrong with the setting of |
327d7f7 to
38b8f43
Compare
This commit adds zig build and mimics cmake where it makes sense. There are some differences. As an example zig build does not support installing the build onto the system. It also will always include the c headers as the main purpose of this is to allow c/c++/zig projects to use the zig package manager to interface with enkiTS.
38b8f43 to
573ab4c
Compare
|
Fixed. When compiling the examples, ENKITS_TASK_PRIORITIES_NUM was not properly defined (only the lib had the current NUM). |
|
Thanks for solving that. I have a couple of questions:
Forks are a natural part of the git ecosystem, and I can't see everyone who forks enkiTS generating a new fingerprint (most won't even be aware of it). I am unsure how this is supposed to work unless the fingerprint also combines with the URL. I note that the documentation also states that Version selection and related tooling that takes advantage of fingerprint is not implemented yet. so perhaps this is not something I need to worry about. |
I could write an option in the build that will do that. Then you (or I in this PR) can do the plumbing in either the CI yam, or use a simple script to get the current git tag, and then do something like You can access the zon file from the build script with something like: const zon = @import("build.zig.zon");
const options = b.addOptions();
options.addOption([]const u8, "version", zon.version);
I would not be surprised if it isnt yet. All of this is very much WIP as well given that zig is still in a unreleased stage. Currently nothing will break if you fork enkiTS and then zig fetch that fork instead. |
|
I think for the moment it might be easier just to update the version every time, as it's fairly infrequent. If the fingerprint system changes then hopefully you or some other Zig user of enkiTS can help me change it if needed! Are there any other issues you need to resolve or shall I merge this? |
|
Yeah, I'll try to keep it up to date. Otherwise feel free to ping me and I may be available to help! The patch should be working and ready to be merged 😁 |
|
Merged, many thanks! |
This commit adds zig build and mimics cmake where it makes sense. There are some differences. As an example zig build does not support installing the build onto the system. It also will always include the c headers as the main purpose of this is to allow c/c++/zig projects to use the zig package manager to interface with enkiTS.
This PR resolves #142