Test on 64-bit Windows

This commit is contained in:
Peter Wagenet 2017-03-03 15:23:01 -08:00
parent 2d358a4140
commit a58934d166
2 changed files with 14 additions and 3 deletions

View File

@ -6,11 +6,19 @@ environment:
VERBOSE: true
# This isn't expected to pass yet
#- EXAMPLES="duration"
matrix:
# 32-bit
- RUBY_VERSION: 23
RUST_HOST: i686-pc-windows-msvc
# 64-bit
- RUBY_VERSION: 23-x64
RUST_HOST: x86_64-pc-windows-msvc
install:
- set PATH=C:\Ruby23\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;%HOMEPATH%\.cargo\bin;%APPVEYOR_BUILD_FOLDER%\ruby\windows_build;%PATH%
- set PATH=C:\Ruby%RUBY_VERSION%\bin;C:\Ruby%RUBY_VERSION%\DevKit\bin;C:\Ruby%RUBY_VERSION%\DevKit\mingw\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;%HOMEPATH%\.cargo\bin;%APPVEYOR_BUILD_FOLDER%\ruby\windows_build;%PATH%
- echo %PATH%
- set HELIX_ROOT=%APPVEYOR_BUILD_FOLDER%
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly --default-host i686-pc-windows-msvc -y
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly --default-host %RUST_HOST% -y
- bash ./scripts/ci-install
test_script:

View File

@ -15,8 +15,11 @@ if RUBY_PLATFORM =~ /mingw/
Rake::Task["compile:native:#{RUBY_PLATFORM}"].enhance do
mkdir_p "#{__dir__}/windows_build"
machine = RbConfig::CONFIG['target_cpu'] == 'x64' ? 'X64' : 'X86'
sh "lib.exe /def:#{File.expand_path("ext/helix_runtime/native/native.def", __dir__)} " \
"/out:#{File.expand_path("windows_build/helix-runtime.lib", __dir__)}"
"/out:#{File.expand_path("windows_build/helix-runtime.lib", __dir__)} " \
"/machine:#{machine}"
# Windows looks for a .dll in PATH
cp "#{__dir__}/lib/helix_runtime/native.so", "#{__dir__}/windows_build/helix-runtime.dll"