Skip to content

Commit 4951e5a

Browse files
davidanthoffnalimilan
authored andcommitted
Julia 0.7 (#30)
1 parent e79c91e commit 4951e5a

File tree

6 files changed

+39
-29
lines changed

6 files changed

+39
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ deps/downloads
66
deps/src
77
deps/usr
88
deps/deps.jl
9+
deps/build.log

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ os:
55
- osx
66
julia:
77
- 0.7
8+
- 1.0
89
- nightly
910
notifications:
1011
email: false

REQUIRE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
julia 0.7-
2-
BinaryProvider 0.3.0
1+
julia 0.7
2+
BinaryProvider 0.4.1

appveyor.yml

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

815
branches:
916
only:
1017
- master
1118
- /release-.*/
19+
- /v(\d+)\.(\d+)\.(\d+)/
1220

1321
notifications:
1422
- provider: Email
@@ -17,19 +25,18 @@ notifications:
1725
on_build_status_changed: false
1826

1927
install:
20-
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
21-
# Download most recent Julia Windows binary
22-
- ps: (new-object net.webclient).DownloadFile(
23-
$env:JULIA_URL,
24-
"C:\projects\julia-binary.exe")
25-
# Run installer silently, output to C:\projects\julia
26-
- 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"))
2729

2830
build_script:
29-
# Need to convert from shallow to complete for Pkg.clone to work
30-
- IF EXIST .git\shallow (git fetch --unshallow)
31-
- C:\projects\julia\bin\julia -e "versioninfo();
32-
Pkg.clone(pwd(), \"StringEncodings\"); Pkg.build(\"StringEncodings\")"
31+
- echo "%JL_BUILD_SCRIPT%"
32+
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"
3333

3434
test_script:
35-
- C:\projects\julia\bin\julia -e "Pkg.test(\"StringEncodings\")"
35+
- echo "%JL_TEST_SCRIPT%"
36+
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
37+
38+
# # Uncomment to support code coverage upload. Should only be enabled for packages
39+
# # which would have coverage gaps without running on Windows
40+
# on_success:
41+
# - echo "%JL_CODECOV_SCRIPT%"
42+
# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"

deps/build.jl

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Libdl
12
# Check for an iconv implementation with the GNU (non-POSIX) behavior:
23
# EILSEQ is returned when a sequence cannot be converted to target encoding,
34
# instead of succeeding and only returning the number of invalid conversions
@@ -6,25 +7,25 @@
67
# Implementations with this behavior include glibc, GNU libiconv (on which Mac
78
# OS X's is based) and win_iconv.
89
function validate_iconv(lib, iconv_open, iconv_close, iconv)
9-
h = Libdl.dlopen_e(lib)
10+
h = dlopen_e(lib)
1011
h == C_NULL && return false
1112
# Needed to check libc
12-
f = Libdl.dlsym_e(h, iconv_open)
13+
f = dlsym_e(h, iconv_open)
1314
f == C_NULL && return false
1415

15-
cd = ccall(f, Ptr{Void}, (Cstring, Cstring), "ASCII", "UTF-8")
16-
cd == Ptr{Void}(-1) && return false
16+
cd = ccall(f, Ptr{Nothing}, (Cstring, Cstring), "ASCII", "UTF-8")
17+
cd == Ptr{Nothing}(-1) && return false
1718

1819
s = "café"
19-
a = Vector{UInt8}(sizeof(s))
20+
a = Vector{UInt8}(undef, sizeof(s))
2021
inbufptr = Ref{Ptr{UInt8}}(pointer(s))
2122
inbytesleft = Ref{Csize_t}(sizeof(s))
2223
outbufptr = Ref{Ptr{UInt8}}(pointer(a))
2324
outbytesleft = Ref{Csize_t}(length(a))
24-
ret = ccall(Libdl.dlsym_e(h, iconv), Csize_t,
25-
(Ptr{Void}, Ptr{Ptr{UInt8}}, Ref{Csize_t}, Ptr{Ptr{UInt8}}, Ref{Csize_t}),
25+
ret = ccall(dlsym_e(h, iconv), Csize_t,
26+
(Ptr{Nothing}, Ptr{Ptr{UInt8}}, Ref{Csize_t}, Ptr{Ptr{UInt8}}, Ref{Csize_t}),
2627
cd, inbufptr, inbytesleft, outbufptr, outbytesleft)
27-
ccall(Libdl.dlsym_e(h, iconv_close), Void, (Ptr{Void},), cd) == -1 && return false
28+
ccall(dlsym_e(h, iconv_close), Nothing, (Ptr{Nothing},), cd) == -1 && return false
2829

2930
return ret == -1 % Csize_t && Libc.errno() == Libc.EILSEQ
3031
end
@@ -60,7 +61,7 @@ download_info = Dict(
6061

6162
# Detect already present libc iconv or libiconv
6263
# (notably for Linux, Mac OS and other Unixes)
63-
found_iconv = false
64+
global found_iconv = false
6465
for lib in ("libc", "libc-bin", "libiconv", "iconv")
6566
if lib in ("libc", "libc-bin")
6667
global iconv_open = :iconv_open
@@ -72,7 +73,7 @@ for lib in ("libc", "libc-bin", "libiconv", "iconv")
7273
global iconv = :libiconv
7374
end
7475
if validate_iconv(lib, iconv_open, iconv_close, iconv)
75-
found_iconv = true
76+
global found_iconv = true
7677
write(joinpath(@__DIR__, "deps.jl"),
7778
"""
7879
## This file autogenerated by Pkg.build(\\"StringEncodings\\").

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ for (s, enc) in (("noël", "ISO-8859-1"),
2121
end
2222

2323
# Test that attempt to close stream in the middle of incomplete sequence throws
24-
let s = "a string チャネルパートナーの選択", a = Vector{UInt8}(s)
24+
let s = "a string チャネルパートナーの選択", a = unsafe_wrap(Vector{UInt8}, s)
2525
# First, correct version
2626
p = StringEncoder(IOBuffer(), "UTF-16LE")
2727
write(p, a)

0 commit comments

Comments
 (0)