cosmo0920 / win32-api

A different, better variant of the Win32API Ruby library
61 stars 10 forks source link

Simplify appveyor.yml, add 'allow_failure' trunk to matrix #34

Closed MSP-Greg closed 6 years ago

MSP-Greg commented 6 years ago

Here's the updated file. Last night I didn't notice the line:

bundle exec rake gem:binary

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,

cosmo0920 commented 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)

MSP-Greg commented 6 years ago

@cosmo0920

Sorry for the delay. I added several Ruby versions to my system so I can run rake gem:binary locally.

  1. 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.

  2. I added a sh "strip --strip-unneeded -p api.so" line to reduce the size of the *.so files. Okay?

  3. The paths for the DevKit were off, fixed. Added code to sense a local vs Appveyor build.

  4. 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

cosmo0920 commented 6 years ago
  1. 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.

  1. I added a sh "strip --strip-unneeded -p api.so" line to reduce the size of the *.so files. Okay?

OK. Great work!

  1. 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.

  1. 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.

MSP-Greg commented 6 years ago

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...

MSP-Greg commented 6 years ago

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.

cosmo0920 commented 6 years ago

I've got succeeded to build with bundle exec rake gem:binary in my environment. Is this PR ready to merge?

MSP-Greg commented 6 years ago

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.

cosmo0920 commented 6 years ago

Merged. Thank you for your great work!