From 59560e6933c69ca43c116f7873f3a7cb772be830 Mon Sep 17 00:00:00 2001 From: "T.J. Schuck" Date: Thu, 3 May 2018 16:02:27 -0400 Subject: [PATCH] Use AppVeyor for testing Windows gem installs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notably, this is _not_ using AppVeyor for running the tests like you'd typically expect from CI. Our big issue with Windows historically isn't running the tests, it's actually installing the gem. This just leverages AppVeyor's infrastructure to let us try to install the bcrypt gem on Windows across all versions of Ruby that we intend to support. See: - https://github.com/codahale/bcrypt-ruby/issues/139 - https://github.com/codahale/bcrypt-ruby/issues/141 - https://github.com/codahale/bcrypt-ruby/issues/142 - https://github.com/codahale/bcrypt-ruby/issues/149 - ...plus countless others 😓 This doesn't actually fix the issue (that comes from me repackaging the gem and pushing the versions with new binaries), but it _does_ give us an indication that it's working. I made this intentionally work with "prerelease" versions of the gem, so I can push up `.rc` versions to test without fully pushing out (possibly still broken) new versions. --- appveyor.yml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..ce7133f --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,50 @@ +############################################################################### +# +# This AppVeyor config is *NOT* for running the tests on Windows. +# +# This is to ensure that the latest version of the bcrypt gem can be installed +# on Windows across all of the currently supported versions of Ruby. +# +############################################################################### + +version: "{branch}-{build}" +build: off +clone_depth: 1 + +init: + # Install Ruby 1.8.7 + - if %RUBY_VERSION%==187 ( + appveyor DownloadFile https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.8.7-p374.exe -FileName C:\ruby_187.exe & + C:\ruby_187.exe /verysilent /dir=C:\Ruby%RUBY_VERSION% + ) + +environment: + matrix: + - RUBY_VERSION: "187" + - RUBY_VERSION: "193" + - RUBY_VERSION: "200" + - RUBY_VERSION: "200-x64" + - RUBY_VERSION: "21" + - RUBY_VERSION: "21-x64" + - RUBY_VERSION: "22" + - RUBY_VERSION: "22-x64" + - RUBY_VERSION: "23" + - RUBY_VERSION: "23-x64" + - RUBY_VERSION: "24" + - RUBY_VERSION: "24-x64" + - RUBY_VERSION: "25" + - RUBY_VERSION: "25-x64" + +install: + - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH% + - if %RUBY_VERSION%==187 ( + gem update --system 2.0.17 + ) + +before_test: + - ruby -v + - gem -v + +test_script: + - gem install bcrypt --prerelease --no-ri --no-rdoc + - ruby -e "require 'rubygems'; require 'bcrypt'"