Closed MSP-Greg closed 6 years ago
bundle exec rake gem:binary
From looking at the rake file, it looks like you run that locally for releases?
Yes. I use the above command to build universal gem for releasing in my local environment.
I can revise the rake file if needed to include it.
I want to run bundle exec rake gem:binary
in AppVeyor.
This command should work with all supported Rubies((2.0.0, 2.1.x, 2.2.y, 2.3.z, 2.4.w) * (x86|x64) for now)
@cosmo0920
Sorry for the delay. I added several Ruby versions to my system so I can run rake gem:binary
locally.
On Appveyor, I have a failure on rake gem:binary
when using trunk, see the_trunk job at https://ci.appveyor.com/project/MSP-Greg/win32-api/build/2, but, it runs fine locally. Will investigate further.
I added a sh "strip --strip-unneeded -p api.so"
line to reduce the size of the *.so files. Okay?
The paths for the DevKit were off, fixed. Added code to sense a local vs Appveyor build.
If
task :binary, :ruby2_32, :ruby2_64, :ruby21, :ruby21_64 ...
could change to
task :binary, :ruby20_32, :ruby20_64, ...
it would allow changing the 'text heredoc code' to a lot shorter code.
Current rakefile code is here. I'll change the pre stmt on line 73, as that's for my local setup.
Thanks, Greg
- On Appveyor, I have a failure on rake gem:binary when using trunk, see the_trunk job at https://ci.appveyor.com/project/MSP-Greg/win32-api/build/2, but, it runs fine locally. Will investigate further.
Thanks. Let's investigate it later on.
- I added a sh "strip --strip-unneeded -p api.so" line to reduce the size of the *.so files. Okay?
OK. Great work!
- The paths for the DevKit were off, fixed. Added code to sense a local vs Appveyor build.
They are tightened my local build environment. :-1: I don't want to change local behavior.
- If
task :binary, :ruby2_32, :ruby2_64, :ruby21, :ruby21_64 ...
could change to
task :binary, :ruby20_32, :ruby20_64, ...
it would allow changing the 'text heredoc code' to a lot shorter code.
I don't think that the shorter code, the better.
Done. Should work fine on local build. Reminder - trunk does pass the test:all
Re 4, I just thought something like
rbc = RbConfig::CONFIG
vers_dir = "#{rbc['MAJOR']}#{rbc['MINOR']}#{rbc['arch'] =~ /x64/i ? '_64' : '_32'}
require File.join(File.dirname(__FILE__), vers_dir, 'win32/api')
would be a bit simpler...
Let me know. I believe the only difference between your local & mine is the base folder for all the ruby versions and the two DevKits. That's why I added the pre
variable...
If you're so inclined, feel free to try it with trunk locally, as I'm confused why local works but AV doesn't. Especially since AV is using the same build that I use locally...
The build url is at line 8 of appveyor.yml. If you do more with it, any gems needing OpenSSL for building require a custom package, since it's built with OpenSSL 1.1.0g (msys2 only has 1.0.2m available). One of the command files in the 7z will add gdbm & openssl packages to your msys2. It does run stand-alone.
I've got succeeded to build with bundle exec rake gem:binary
in my environment.
Is this PR ready to merge?
I've got succeeded to build with bundle exec rake gem:binary in my environment.
Good.
Is this PR ready to merge?
Okay by me. Thanks.
Merged. Thank you for your great work!
Here's the updated file. Last night I didn't notice the line:
From looking at the rake file, it looks like you run that locally for releases?
I can revise the rake file if needed to include it. I believe this PR does build & test, and all versions (including trunk) passed on my fork. Trunk is currently 'allow_failures'.
BTW, I may change it in the future, but I don't do a 32-bit build of trunk... Thanks,