diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..dbc29e4 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,41 @@ +environment: + matrix: + - JULIAVERSION: "julialang/bin/winnt/x86/0.3/julia-0.3-latest-win32.exe" + - JULIAVERSION: "julialang/bin/winnt/x64/0.3/julia-0.3-latest-win64.exe" + - JULIAVERSION: "julialang/bin/winnt/x86/0.4/julia-0.4-latest-win32.exe" + - JULIAVERSION: "julialang/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe" + - JULIAVERSION: "julianightlies/bin/winnt/x86/julia-latest-win32.exe" + - JULIAVERSION: "julianightlies/bin/winnt/x64/julia-latest-win64.exe" + +branches: + only: + - master + - /release-.*/ + +notifications: + - provider: Email + on_build_success: false + on_build_failure: false + on_build_status_changed: false + +install: +# if there's a newer build queued for the same PR, cancel this one + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` + throw "There are newer queued builds for this pull request, failing early." } +# Download most recent Julia Windows binary + - ps: (new-object net.webclient).DownloadFile( + $("http://s3.amazonaws.com/"+$env:JULIAVERSION), + "C:\projects\julia-binary.exe") +# Run installer silently, output to C:\projects\julia + - C:\projects\julia-binary.exe /S /D=C:\projects\julia + +build_script: +# Need to convert from shallow to complete for Pkg.clone to work + - IF EXIST .git\shallow (git fetch --unshallow) + - C:\projects\julia\bin\julia -F -e "versioninfo(); + Pkg.clone(pwd(), \"Winston\"); Pkg.build(\"Winston\")" + +test_script: + - C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"Winston\")" diff --git a/src/Winston.jl b/src/Winston.jl index 293da38..a5b0ab3 100644 --- a/src/Winston.jl +++ b/src/Winston.jl @@ -10,7 +10,6 @@ end using IniFile using Compat using Dates - isdefined(Base, :Libc) && (strftime = Libc.strftime) isdefined(Base, :Dates) && (datetime2unix = Dates.datetime2unix) @@ -93,7 +92,7 @@ import Base: copy, export get_context, device_to_data, data_to_device if VERSION < v"0.3-" - typealias AbstractVecOrMat{T} (@compat Union{AbstractVector{T}, AbstractMatrix{T}}) + typealias AbstractVecOrMat{T}(@compat Union{AbstractVector{T}, AbstractMatrix{T}}) extrema(x) = (minimum(x),maximum(x)) Base.push!(x, a, b) = (push!(x, a); push!(x, b)) elseif VERSION < v"0.4-" diff --git a/src/plot.jl b/src/plot.jl index d37fdfd..2fb32b8 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -569,7 +569,7 @@ function fplot(f::Function, limits, args...; kvs...) pargs = [arg] elseif typeof(arg) <: Integer fopts[:min_points] = arg - elseif typeof(arg) <: FloatingPoint + elseif typeof(arg) <: @compat AbstractFloat fopts[:tol] = arg else error("unrecognized argument ", arg) diff --git a/src/renderer.jl b/src/renderer.jl index 6b1ebca..fc3af34 100644 --- a/src/renderer.jl +++ b/src/renderer.jl @@ -60,7 +60,7 @@ end ## state commands color_to_rgb(i::Integer) = convert(RGB, RGB24(unsigned(i))) -color_to_rgb(s::AbstractString) = color(s) +color_to_rgb(s::AbstractString) =parse(Colorant,s) color_to_rgb(rgb::@compat(Tuple{Real,Real,Real})) = RGB(rgb...) color_to_rgb(cv::Color) = convert(RGB, cv) color_to_rgb(cv::TransparentColor) = cv