From 60f1b85863bea85db5c07e92f0fc2dfec9826ad8 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 20 Sep 2018 02:10:14 -0700 Subject: [PATCH 1/5] Use Appveyor.jl --- appveyor.yml | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 03f1496..679735c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,23 @@ 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.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 +26,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%" From fe35f2d6004e5306142158a3470e3cf2946c6e13 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 20 Sep 2018 02:17:53 -0700 Subject: [PATCH 2/5] Bring back 0.6 --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 679735c..ea9668a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,6 @@ environment: matrix: + - julia_version: 0.6 - julia_version: 0.7 - julia_version: 1 - julia_version: nightly From 819553d91852e6dfc11c5560feb002d1d614e459 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 20 Sep 2018 19:18:50 -0700 Subject: [PATCH 3/5] Test Conda.add for Python package --- test/runtests.jl | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index a8fa7e4..cd821d9 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", env) + 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) From c345e017db48f721500821f234d3c859a27070e3 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 20 Sep 2018 19:24:24 -0700 Subject: [PATCH 4/5] Install Miniconda3-4.5.4 on Windows --- src/Conda.jl | 7 +++++++ 1 file changed, 7 insertions(+) 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.") From 8d22536f589d16caef55a233a92683d0993fc72e Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 20 Sep 2018 19:50:34 -0700 Subject: [PATCH 5/5] Use python=3.6 in test --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index cd821d9..66e859a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -14,7 +14,7 @@ rm(Conda.prefix(env); force=true, recursive=true) Conda.add("curl", env) @testset "Install Python package" begin - Conda.add("python", env) + 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)