Skip to content

Commit

Permalink
Introduce AppVeyor CI for Windows
Browse files Browse the repository at this point in the history
The included configuration aims to compile and test builds of
sqlite3-ruby gem against a native Windows environment provided by
AppVeyor platform.

Add `devkit` task that prepends both compile and native ones and
ensures RubyInstaller's DevKit is enabled in the PATH prior
compilation.
  • Loading branch information
luislavena committed Sep 21, 2014
1 parent e81a3db commit 5f28088
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
26 changes: 26 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
version: "{build}"
branches:
only:
- master
- 1-3-stable
clone_depth: 10
install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ruby --version
- gem --version
- gem install bundler --quiet --no-ri --no-rdoc
- bundler --version
- bundle install
build_script:
- rake native gem
test_script:
- rake test
artifacts:
- path: pkg\*.gem

environment:
matrix:
- ruby_version: "193"
- ruby_version: "200"
- ruby_version: "200-x64"
14 changes: 14 additions & 0 deletions tasks/native.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ BINARY_VERSION = "3.7.17"
URL_VERSION = "3071700"
URL_PATH = "/2013"

# prepend DevKit into compilation phase
if RUBY_PLATFORM =~ /mingw/
task :compile => [:devkit]
task :native => [:devkit]
end

task :devkit do
begin
require "devkit"
rescue LoadError => e
abort "Failed to activate RubyInstaller's DevKit required for compilation."
end
end

# build sqlite3_native C extension
RUBY_EXTENSION = Rake::ExtensionTask.new('sqlite3_native', HOE.spec) do |ext|
# where to locate the extension
Expand Down

0 comments on commit 5f28088

Please sign in to comment.