Skip to content

Commit e9863ab

Browse files
authored
Merge pull request #8 from rdeits/rd/copyderef
Test copyderef build variant and test on Julia 1.0
2 parents d991a4f + 2298050 commit e9863ab

File tree

4 files changed

+64
-11
lines changed

4 files changed

+64
-11
lines changed

.travis.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,44 @@ matrix:
44
include:
55
- os: linux
66
julia: 0.7
7+
- os: linux
8+
julia: 1.0
79
- os: linux
810
julia: nightly
911
- os: linux
1012
julia: 0.7
1113
env: "CMAKE_JL_BUILD_FROM_SOURCE=1"
14+
- os: linux
15+
julia: 1.0
16+
env: "CMAKE_JL_BUILD_FROM_SOURCE=1"
17+
- os: linux
18+
julia: 1.0
19+
env: "BINARYPROVIDER_COPYDEREF=true"
1220
- os: linux
1321
julia: nightly
1422
env: "CMAKE_JL_BUILD_FROM_SOURCE=1"
1523
- os: osx
1624
julia: 0.7
1725
- os: osx
18-
julia: 0.7
26+
julia: 1.0
27+
- os: osx
28+
julia: 1.0
29+
env: "BINARYPROVIDER_COPYDEREF=true"
30+
- os: osx
31+
julia: 1.0
1932
env: "CMAKE_JL_BUILD_FROM_SOURCE=1"
20-
# allow_failures:
21-
# - julia: nightly
33+
allow_failures:
34+
- julia: nightly
2235
notifications:
2336
email: false
2437
branches:
2538
only: master
39+
before_script:
40+
# Every 30 seconds, look for the build log file. If it exists, then
41+
# start watching its contents and printing them to stdout as they
42+
# change. This has two effects:
43+
# 1. it avoids Travis timing out because the build outputs nothing
44+
# 2. it makes it more obvious what part of the build, if any, gets stuck
45+
- while sleep 30; do tail ~/build/JuliaPackaging/CMake.jl/deps/build.log -f ; done &
46+
after_success:
47+
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'

REQUIRE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
julia 0.7-alpha
2-
BinDeps 0.4
1+
julia 0.7
2+
BinDeps 0.8.10

appveyor.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ platform:
88
- x86 # 32-bit
99
- x64 # 64-bit
1010

11-
# # Uncomment the following lines to allow failures on nightly julia
12-
# # (tests will run but not make your overall status red)
13-
# matrix:
14-
# allow_failures:
15-
# - julia_version: nightly
11+
# Uncomment the following lines to allow failures on nightly julia
12+
# (tests will run but not make your overall status red)
13+
matrix:
14+
allow_failures:
15+
- julia_version: nightly
1616

1717
branches:
1818
only:

deps/build.jl

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,35 @@ else
1212
binary_name = "cmake"
1313
end
1414

15+
function probe_symlink_creation(dest::AbstractString)
16+
while !isdir(dest)
17+
dest = dirname(dest)
18+
end
19+
20+
# Build arbitrary (non-existent) file path name
21+
link_path = joinpath(dest, "binaryprovider_symlink_test")
22+
while ispath(link_path)
23+
link_path *= "1"
24+
end
25+
26+
try
27+
symlink("foo", link_path)
28+
return true
29+
catch e
30+
if isa(e, Base.IOError)
31+
return false
32+
end
33+
rethrow(e)
34+
finally
35+
rm(link_path; force=true)
36+
end
37+
end
38+
1539
function install_binaries(file_base, file_ext, binary_dir)
1640
filename = "$(file_base).$(file_ext)"
1741
url = "$(base_url)/$(filename)"
1842
binary_path = joinpath(basedir, "downloads", file_base, binary_dir)
43+
copyderef = get(ENV, "BINARYPROVIDER_COPYDEREF", "") == "true" || !probe_symlink_creation(binary_path)
1944

2045
@static if Sys.iswindows()
2146
install_step = () -> begin
@@ -28,8 +53,14 @@ function install_binaries(file_base, file_ext, binary_dir)
2853
else
2954
install_step = () -> begin
3055
for file in readdir(binary_path)
31-
symlink(joinpath(binary_path, file),
56+
if !copyderef
57+
symlink(joinpath(binary_path, file),
3258
joinpath(prefix, "bin", file))
59+
else
60+
cp(joinpath(binary_path, file),
61+
joinpath(prefix, "bin", file);
62+
force=true)
63+
end
3364
end
3465
end
3566
end

0 commit comments

Comments
 (0)