diff --git a/appveyor.yml b/appveyor.yml index 03f1496..ea9668a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,24 @@ environment: matrix: - - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe" - - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe" - - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe" - - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe" + - julia_version: 0.6 + - julia_version: 0.7 + - julia_version: 1 + - julia_version: nightly + +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: nightly + +branches: + only: + - master + - /release-.*/ notifications: - provider: Email @@ -12,16 +27,20 @@ notifications: on_build_status_changed: true install: - - ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12" - - ps: (new-object net.webclient).DownloadFile( - $env:JULIA_URL, - "C:\projects\julia-binary.exe") - - C:\projects\julia-binary.exe /S /D=C:\projects\julia + - ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1")) build_script: - - IF EXIST .git\shallow (git fetch --unshallow) - # Test #17 by using ENV[\"HOME\"]=joinpath(homedir(),\"Conda test home\") - - C:\projects\julia\bin\julia -e "versioninfo(); p = joinpath(homedir(),\"Conda test home\"); mkdir(p); ENV[\"HOME\"]=p; Pkg.clone(pwd(), \"Conda\"); Pkg.build(\"Conda\")" + - echo "%JL_BUILD_SCRIPT%" + - SET HOME=%userprofile%\Conda test home + - C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%" test_script: - - C:\projects\julia\bin\julia --check-bounds=yes -e "ENV[\"HOME\"]=joinpath(homedir(),\"Conda test home\"); Pkg.test(\"Conda\")" + - echo "%JL_TEST_SCRIPT%" + - SET HOME=%userprofile%\Conda test home + - C:\julia\bin\julia -e "%JL_TEST_SCRIPT%" + +# # Uncomment to support code coverage upload. Should only be enabled for packages +# # which would have coverage gaps without running on Windows +# on_success: +# - echo "%JL_CODECOV_SCRIPT%" +# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%" diff --git a/src/Conda.jl b/src/Conda.jl index 3247da2..1f6b53e 100644 --- a/src/Conda.jl +++ b/src/Conda.jl @@ -128,6 +128,13 @@ function _installer_url() elseif Compat.Sys.islinux() res *= "Linux" elseif Compat.Sys.iswindows() + if MINICONDA_VERSION == "3" + # Quick fix for: + # * https://github.com/JuliaLang/IJulia.jl/issues/739 + # * https://github.com/ContinuumIO/anaconda-issues/issues/10082 + # * https://github.com/conda/conda/issues/7789 + res = "https://repo.continuum.io/miniconda/Miniconda$(MINICONDA_VERSION)-4.5.4-" + end res *= "Windows" else error("Unsuported OS.") diff --git a/test/runtests.jl b/test/runtests.jl index a8fa7e4..66e859a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,18 +1,33 @@ using Conda, Compat, VersionParsing +using Compat +using Compat: @info using Compat.Test +exe = Compat.Sys.iswindows() ? ".exe" : "" + Conda.update() env = :test_conda_jl +rm(Conda.prefix(env); force=true, recursive=true) + @test Conda.exists("curl", env) Conda.add("curl", env) +@testset "Install Python package" begin + Conda.add("python=3.6", env) # 3.7 doesn't work on Windows at the moment + pythonpath = joinpath(Conda.python_dir(env), "python" * exe) + @test isfile(pythonpath) + + cmd = Conda._set_conda_env(`$pythonpath -c "import zmq"`, env) + @test_throws Exception run(cmd) + Conda.add("pyzmq", env) + run(cmd) +end + curlvers = Conda.version("curl",env) @test curlvers >= v"5.0" @test Conda.exists("curl==$curlvers", env) -exe = Compat.Sys.iswindows() ? ".exe" : "" - curl_path = joinpath(Conda.bin_dir(env), "curl" * exe) @test isfile(curl_path)