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

overhaul build system and move all ci to github actions #273

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

truemedian
Copy link
Member

@truemedian truemedian commented Feb 6, 2023

This is rather large overhaul of the cmake and make files as well as removing appveyor from CI.

This moves all CI and release builds to github actions. The makefile can now pass all options the cmake build accepts. The cmake file can now link lua and libuv dynamically (as well as link libluv dynamically correctly now).

The smallest change is adding luv as a way to require luv on top of the normal uv provided in luvi. This makes luvi compatible with luarocks packages that use luv.

The default cmake build is now tiny (all extra libraries are default OFF), which makes it easier to consider which libraries need to be enabled or disabled.

CPACK has been removed from the cmake file, it hadn't been updated since 2015; any packaging of luvi should probably happen with luvi + lit + luvit, as that is the most reasonable use of a luvi package.

Make.bat now detects the architecture of the computer (or is overridden using ARCH) instead of having mode and mode32 builds. Perhaps we should look into using mingw to build for windows (which means reusing the Makefile).

As a side effect of this PR. Appveyor will need to be turned off.

@truemedian truemedian changed the title Gh actions overhaul build system and move all ci to github actions Feb 6, 2023
make.bat Outdated Show resolved Hide resolved
@squeek502
Copy link
Member

squeek502 commented Feb 7, 2023

I noticed that WithOpenSSLASM has gone from default ON to default OFF. Any reason for that?

EDIT: To be more specific, the default in the Makefile/make.bat used to be regular-asm, but now the default for regular is without WithOpenSSLASM=ON, so the new default (and the CI builds) will not build OpenSSL with ASM.

@truemedian
Copy link
Member Author

truemedian commented Feb 7, 2023

I changed it mainly for windows builds, where it required a separate compiler (NASM) to be installed. I was contemplating changing it to be default ON for the makefile, but didn't end on a decision before making this PR. I don't know enough about the optimization gains that it provides.

I was considering removing the option entirely, since openssl says that it is mostly a debugging thing.

Update: I've decided that this is probably not a good idea. I'm going to set OpenSSLASM back to being default ON, removing it from the makefile (because openssl says you shouldn't be turning it off without good reason). If someone needs a build without these optimizations they can pass the argument in EXTRA_CONFIGURE_FLAGS.

@truemedian
Copy link
Member Author

I made this PR early mostly to see if anyone can see any mistakes I've made and get some feedback on the build changes. I'm still waiting on the results of a script I'm running that is checking all possible combinations of build modes.

* builds windows, macos, linux binaries on github actions
* uploads to release on tagged commits
CMakeLists changes:

* enables linking with a shared libuv and lua.
* makes the default cmake build a tiny build.
    - openssl, lpeg, pcre and zlib must be explicitly enabled
* cleans up some file path issues when ${CMAKE_CURRENT_SOURCE_DIR} was prepended twice in a row
* tries to clean up the style of the cmakelists.txt
* removes old cpack functionality from cmakelists.txt
    - this hasn't been touched since 2015
    - and if we're packaging anything we should be packaging luvi + lit + luvit.
* try to start efforts towards cross compiling (at least for Lua)
    - can now somewhat cross compile openssl

Makefile changes:

* allows changing all cmake options from the makefile (and they're now somewhat documented)
* the regular-asm makefile target has been removed in favor of `WITH_OPENSSL_ASM=ON`
* the old holy-build-box building and ci packaging has been removed from the makefile
    - holy-build-box is provided by packaging/hbb and release packaging was moved into github actions

Make.bat changes:

* Architecture is now automatically detected, and can be overridden with the `%ARCH%` environment var.
* -asm builds were removed, there is no makefile argument equivalent, it required nasm to be installed.
    - may need to be reverted if there is a significant performance drop.
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.

None yet

2 participants