Skip to content

Commit

Permalink
Add Windows Support
Browse files Browse the repository at this point in the history
  • Loading branch information
felipenoris committed Apr 23, 2019
1 parent 180bfdd commit d499d4a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 2 deletions.
45 changes: 45 additions & 0 deletions appveyor.yml
@@ -0,0 +1,45 @@
services:
- mongodb

environment:
matrix:
- julia_version: 1.0
- julia_version: 1.1
- julia_version: latest

matrix:
allow_failures:
- julia_version: latest

platform:
# - x86 # 32-bit
- x64 # 64-bit

## uncomment the following lines to allow failures on nightly julia
## (tests will run but not make your overall status red)
#matrix:
# allow_failures:
# - julia_version: 1.0
# - julia_version: latest

#branches:
# only:
# - master
# - /release-.*/

notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false

install:
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

build_script:
- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
5 changes: 4 additions & 1 deletion deps/build.jl
Expand Up @@ -2,7 +2,7 @@
using BinaryProvider # requires BinaryProvider 0.3.0 or later

# Parse some basic command-line arguments
const verbose = "--verbose" in ARGS
const verbose = true #"--verbose" in ARGS
const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr")))
products = [
LibraryProduct(prefix, ["libmongoc"], :libmongoc),
Expand All @@ -11,6 +11,7 @@ products = [

# Download binaries from hosted location
bin_prefix = "https://github.com/felipenoris/mongo-c-driver-builder/releases/download/v1.14.0"
windows_bin_prefix = "https://github.com/felipenoris/mongo-c-driver-builder/releases/download/v1.14.0_1"

# Listing of files generated by BinaryBuilder:
download_info = Dict(
Expand All @@ -24,6 +25,8 @@ download_info = Dict(
Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/mongo-c-driver-builder.v1.14.0.powerpc64le-linux-gnu.tar.gz", "2ed16f2f46f0b87ed2f2295433d8e6e0e46841dee3934a3f2e89271bd41a25dd"),
Linux(:x86_64, libc=:glibc) => ("$bin_prefix/mongo-c-driver-builder.v1.14.0.x86_64-linux-gnu.tar.gz", "e49a56702ce40df8837490b89996572f3cc473d8ecfbd8a59cbe446863a22e32"),
Linux(:x86_64, libc=:musl) => ("$bin_prefix/mongo-c-driver-builder.v1.14.0.x86_64-linux-musl.tar.gz", "7468ca0168ba2411a4080fb0c09a65739dfddcd9fc253579ae2b449b26f707eb"),
Windows(:x86_64) => ("$windows_bin_prefix/mongo-c-driver-builder.v1.14.0.x86_64-windows.tar.gz", "04b5eb428568797545136f6a4a07af4c0f00235d0a6182042e5eb21e562dbaeb"),
# Windows(:x86_64, compiler_abi=CompilerABI(:gcc4, :cxx11)) => ("$windows_bin_prefix/mongo-c-driver-builder.v1.14.0.x86_64-windows.tar.gz", "04b5eb428568797545136f6a4a07af4c0f00235d0a6182042e5eb21e562dbaeb"),
)

# Install unsatisfied or updated dependencies:
Expand Down
9 changes: 8 additions & 1 deletion test/bson_tests.jl
Expand Up @@ -320,7 +320,14 @@ using Dates
end

finally
isfile(filepath) && rm(filepath)
if isfile(filepath)
try
rm(filepath)
catch err
@warn("Failed to remove test file $filepath: $(err.msg)")
stacktrace(catch_backtrace())
end
end
end
end
end
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
@@ -1,3 +1,6 @@

using BinaryProvider
@info("Testing for platform: ", platform_key_abi())

include("bson_tests.jl")
include("mongodb_tests.jl")

0 comments on commit d499d4a

Please sign in to comment.