-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add support for static binary in GHA #291
Conversation
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.
That's an awesome feature to increase Castor adoption. Thanks 💛
8757633
to
87a33ba
Compare
A small note related to my early comment The subset of extensions chosen to be compiled currently in the binary is really small, it was designed to run a simple "Hello World". My concern would be people trying to use it in their own real world Castor projects and hitting errors straight away. This would be a subpar experience. Could we find a right balance of php extensions to include natively without bloating the binary too much ? Maybe we could take insipiration from the official docker image, running
Or maybe introducing a |
ATM, the static binary weight <5mb, this is quite light IMHO. |
The comparison with the official PHP Docker image reveals that the following extensions are absent:
Incorporating all these extensions ( This also increases the size of the build from However, it's worth noting that the default libraries in the Docker image are selected not merely for their popularity but due to the complexity involved in installing them manually, as discussed here. Given this, it may be beneficial for Castor to determine its own default set of PHP extensions. For my projects, I typically add:
This selection, excluding the specific requirement for |
something is strange on you computer. on github, it's only 4mb. see this build. I'll made some bench with
you really do some nice things with castor :D |
Not sure what's going on but I've tried from a freshly cloned project, phar is the same size from build but binary is still around 9M 🤷♂️ Maybe others experience the same issue ?
Yeah 😅 I manage backup scripts, send emails, scrape the latest update of a webpage, and have my own vault secret management based on symfony one among other things. It's all about devops automation. |
For the record, we had some concerns about security of the tool chain. We use https://github.com/dixyes/phpmicro and we didn't review all the code. But this packages is used a lot by Laravel (herd, native php, etc) So I think it's fine and I'll merge this PR since it's a real game changer ! |
No description provided.