Skip to content

Commit e814c7a

Browse files
authored
Fix final 0.7 deprecations and enable 0.7 CI (#54)
* Fix final 0.7 deprecations and enable 0.7 CI * Modernize AppVeyor per https://github.com/JuliaCI/Appveyor.jl * Make summary test 32/64-bit agnostic
1 parent b8ef4f0 commit e814c7a

File tree

4 files changed

+19
-26
lines changed

4 files changed

+19
-26
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ language: julia
22

33
os:
44
- linux
5+
- osx
56

67
julia:
8+
- 0.7
79
- nightly
810

911
notifications:

appveyor.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
4-
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
3+
- julia_version: 0.7
4+
- julia_version: latest
5+
6+
platform:
7+
- x86 # 32-bit
8+
- x64 # 64-bit
59

610
## uncomment the following lines to allow failures on nightly julia
711
## (tests will run but not make your overall status red)
812
#matrix:
913
# allow_failures:
10-
# - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
11-
# - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
14+
# - julia_version: latest
1215

1316
branches:
1417
only:
@@ -22,24 +25,12 @@ notifications:
2225
on_build_status_changed: false
2326

2427
install:
25-
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
26-
# If there's a newer build queued for the same PR, cancel this one
27-
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
28-
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
29-
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
30-
throw "There are newer queued builds for this pull request, failing early." }
31-
# Download most recent Julia Windows binary
32-
- ps: (new-object net.webclient).DownloadFile(
33-
$env:JULIA_URL,
34-
"C:\projects\julia-binary.exe")
35-
# Run installer silently, output to C:\projects\julia
36-
- C:\projects\julia-binary.exe /S /D=C:\projects\julia
28+
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))
3729

3830
build_script:
39-
# Need to convert from shallow to complete for Pkg.clone to work
40-
- IF EXIST .git\shallow (git fetch --unshallow)
41-
- C:\projects\julia\bin\julia -e "versioninfo();
42-
Pkg.clone(pwd(), \"OffsetArrays\"); Pkg.build(\"OffsetArrays\")"
31+
- echo "%JL_BUILD_SCRIPT%"
32+
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"
4333

4434
test_script:
45-
- C:\projects\julia\bin\julia -e "Pkg.test(\"OffsetArrays\")"
35+
- echo "%JL_TEST_SCRIPT%"
36+
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"

src/OffsetArrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__precompile__()
1+
VERSION < v"0.7.0-beta2.199" && __precompile__()
22

33
module OffsetArrays
44

test/runtests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ amin, amax = extrema(parent(A))
332332
@test unique(A, dims=2) == OffsetArray(parent(A), first(axes(A, 1)) - 1, 0)
333333
v = OffsetArray(rand(8), (-2,))
334334
@test sort(v) == OffsetArray(sort(parent(v)), v.offsets)
335-
@test sortrows(A) == OffsetArray(sortrows(parent(A)), A.offsets)
336-
@test sortcols(A) == OffsetArray(sortcols(parent(A)), A.offsets)
335+
@test sortslices(A; dims=1) == OffsetArray(sortslices(parent(A); dims=1), A.offsets)
336+
@test sortslices(A; dims=2) == OffsetArray(sortslices(parent(A); dims=2), A.offsets)
337337
@test sort(A, dims = 1) == OffsetArray(sort(parent(A), dims = 1), A.offsets)
338338
@test sort(A, dims = 2) == OffsetArray(sort(parent(A), dims = 2), A.offsets)
339339

@@ -372,9 +372,9 @@ end
372372

373373
a = OffsetArray([1 2; 3 4], -1:0, 5:6)
374374
@test summary(a) == "OffsetArray(::Array{$(Int),2}, -1:0, 5:6) with eltype $(Int) with indices -1:0×5:6"
375-
@test summary(view(a, :, 5)) == "view(OffsetArray(::Array{Int64,2}, -1:0, 5:6), :, 5) with eltype Int64 with indices -1:0"
375+
@test summary(view(a, :, 5)) == "view(OffsetArray(::Array{$(Int),2}, -1:0, 5:6), :, 5) with eltype $(Int) with indices -1:0"
376376
a = OffsetArray(reshape([1]))
377-
@test summary(a) == "0-dimensional OffsetArray(::Array{Int64,0}) with eltype Int64"
377+
@test summary(a) == "0-dimensional OffsetArray(::Array{$(Int),0}) with eltype $(Int)"
378378

379379
@testset "OffsetVector constructors" begin
380380
local v = rand(5)

0 commit comments

Comments
 (0)