-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 round-trip tests for precompiled gems #76
Conversation
7671e6b
to
46112b8
Compare
d023bf2
to
4852100
Compare
e983957
to
a9fdc8e
Compare
@mudge This is now passing all tests! Getting Windows working was a lot trickier than I had expected. |
a9fdc8e
to
8d2b685
Compare
This pulls in flavorjones/mini_portile#129. When cross-compiling Windows targets with cmake in a Linux environment, the MSYS generator may not be available. Supplying -G MSYS will cause the build to fail.
8d2b685
to
840b822
Compare
This pulls in flavorjones/mini_portile#130. We no longer need to write custom logic for finding the right compilers and setting CMake variables for cross-compilation.
This ensures the generated gem has a unique version number, so define `RE2::VERSION` in a separate file to make this possible.
Previously sence `rake spec` required the `compile` step, `scripts/test-gem-install` failed because `extconf.rb` was removed. Fix this by making the default task depend on the `compile` task, but the `spec` task independent of the `compile` task.
This ensures that all precompiled gems are built properly and can be run on their target operating systems. Closes mudge#69
This reduces the filename lengths since Windows can hit a limit of 250 characters (CMAKE_OBJECT_PATH_MAX).
These are required dependencies for abseil until a custom musl gem is built: mudge#67 (comment)
On systems where pkgconf v1.9.3 is used for pkg-config, the output of `pkg-config --static --libs` is incorrect, resulting in build failures (pkgconf/pkgconf#268). This commit fixes the issue by hard-coding the abseil libraries needed to link the extension properly.
840b822
to
6985843
Compare
Rather than remove all files and conditionally guard against version.rb load errors, just include the required files for testing in the gem and test against the installed directory.
3fa1bb4
to
0bec72c
Compare
@flavorjones if you have any availability, it’d be great if you could cast a critical eye on this too. |
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.
Made a few suggestions, but this mostly looks good.
54a35a6
to
43e2d36
Compare
with: | ||
name: cruby-x64-mingw-ucrt-gem | ||
path: gems | ||
- run: ./scripts/test-gem-install gems |
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.
I'm curious how this is running without specifying shell: bash
? I expected this to fail. I wonder if there's been some shebang magic introduced on the windows images (or if github changed the default behavior?)
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.
Hmm, I'm not sure https://github.com/mudge/re2/actions/runs/5596591577/job/15159473313 actually ran. Maybe since ErrorActionPreference=Stop
wasn't set, the job didn't actually fail.
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.
https://github.com/mudge/re2/actions/runs/5631492710/job/15258525260 did run, so I suspect this was a exit code issue.
43e2d36
to
06bbaa1
Compare
This avoids the visibility setting warnings in the linker (https://github.com/mudge/re2/actions/runs/5631492710/job/15258506852) and reduces the size of the binaries.
eef907e
to
f42a93d
Compare
This ensures that all precompiled gems are built properly and can be run on their target operating systems.
In addition, this ensures the Ruby platform gem can be installed and tested on all platforms.
This also fixes a number of build and install issues on Windows, such as pkgconf/pkgconf#268.
Closes #69 and #70