diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..33a0d33 --- /dev/null +++ b/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%" diff --git a/deps/build.jl b/deps/build.jl index 3df6c50..c5fe442 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -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), @@ -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( @@ -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: diff --git a/test/bson_tests.jl b/test/bson_tests.jl index 1a061fe..8bf3ca6 100644 --- a/test/bson_tests.jl +++ b/test/bson_tests.jl @@ -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 diff --git a/test/runtests.jl b/test/runtests.jl index 795fd8b..f6978f3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,3 +1,6 @@ +using BinaryProvider +@info("Testing for platform: ", platform_key_abi()) + include("bson_tests.jl") include("mongodb_tests.jl")