Skip to content

Commit

Permalink
Try fix Appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Ferris committed Aug 26, 2018
1 parent 5114f30 commit f4c50d8
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 33 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The Indexing.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2017: Andy Ferris.
> Copyright (c) 2017-2018: Andy Ferris.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 12 additions & 0 deletions \
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[core]
bare = false
repositoryformatversion = 0
filemode = true
logallrefupdates = true
[remote "origin"]
url = https://github.com/andyferris/Indexing.jl
fetch = +refs/heads/*:refs/remotes/origin/*
pushurl = [email protected]:andyferris/Indexing.jl
[branch "master"]
remote = origin
merge = refs/heads/master
46 changes: 21 additions & 25 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
environment:
matrix:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/1.0/julia-1.0-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/1.0/julia-1.0-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: 1.0
- julia_version: nightly

## uncomment the following lines to allow failures on nightly julia
## (tests will run but not make your overall status red)
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_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: nightly

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

notifications:
- provider: Email
Expand All @@ -23,24 +25,18 @@ notifications:
on_build_status_changed: false

install:
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
# 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(
$env:JULIA_URL,
"C:\projects\julia-binary.exe")
# Run installer silently, output to C:\projects\julia
- 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:
# Need to convert from shallow to complete for Pkg.clone to work
- IF EXIST .git\shallow (git fetch --unshallow)
- C:\projects\julia\bin\julia -e "versioninfo(); using Pkg;
Pkg.clone(pwd(), \"Indexing\"); Pkg.build(\"Indexing\")"
- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- C:\projects\julia\bin\julia -e "using Pkg; Pkg.test(\"Indexing\")"
- echo "%JL_TEST_SCRIPT%"
- 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%"
4 changes: 1 addition & 3 deletions src/getindices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ function getindices(container, indices)
end
getindices(container, ::Colon) = getindices(container, keys(container))
getindices(t::Tuple, ::Colon) = t
@static if VERSION > v"0.7-"
getindices(nt::NamedTuple, ::Colon) = nt
end
getindices(nt::NamedTuple, ::Colon) = nt

function getindices(container, indices::AbstractDict)
out = empty(indices, keytype(indices), _valtype(container))
Expand Down
4 changes: 0 additions & 4 deletions src/setindices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@ function setindices!(container, value, indices::AbstractDict)
end
return container
end

if VERSION < v"0.7-"
setindices!(a::AbstractArray, value, ::Colon) = setindices!(a, value, eachindex(a))
end

0 comments on commit f4c50d8

Please sign in to comment.