Skip to content

Commit

Permalink
Merge pull request #8 from rdeits/rd/copyderef
Browse files Browse the repository at this point in the history
Test copyderef build variant and test on Julia 1.0
  • Loading branch information
stevengj authored Sep 9, 2018
2 parents d991a4f + 2298050 commit e9863ab
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 11 deletions.
28 changes: 25 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,44 @@ matrix:
include:
- os: linux
julia: 0.7
- os: linux
julia: 1.0
- os: linux
julia: nightly
- os: linux
julia: 0.7
env: "CMAKE_JL_BUILD_FROM_SOURCE=1"
- os: linux
julia: 1.0
env: "CMAKE_JL_BUILD_FROM_SOURCE=1"
- os: linux
julia: 1.0
env: "BINARYPROVIDER_COPYDEREF=true"
- os: linux
julia: nightly
env: "CMAKE_JL_BUILD_FROM_SOURCE=1"
- os: osx
julia: 0.7
- os: osx
julia: 0.7
julia: 1.0
- os: osx
julia: 1.0
env: "BINARYPROVIDER_COPYDEREF=true"
- os: osx
julia: 1.0
env: "CMAKE_JL_BUILD_FROM_SOURCE=1"
# allow_failures:
# - julia: nightly
allow_failures:
- julia: nightly
notifications:
email: false
branches:
only: master
before_script:
# Every 30 seconds, look for the build log file. If it exists, then
# start watching its contents and printing them to stdout as they
# change. This has two effects:
# 1. it avoids Travis timing out because the build outputs nothing
# 2. it makes it more obvious what part of the build, if any, gets stuck
- while sleep 30; do tail ~/build/JuliaPackaging/CMake.jl/deps/build.log -f ; done &
after_success:
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
4 changes: 2 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
julia 0.7-alpha
BinDeps 0.4
julia 0.7
BinDeps 0.8.10
10 changes: 5 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ 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_version: nightly
# Uncomment the following lines to allow failures on nightly julia
# (tests will run but not make your overall status red)
matrix:
allow_failures:
- julia_version: nightly

branches:
only:
Expand Down
33 changes: 32 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,35 @@ else
binary_name = "cmake"
end

function probe_symlink_creation(dest::AbstractString)
while !isdir(dest)
dest = dirname(dest)
end

# Build arbitrary (non-existent) file path name
link_path = joinpath(dest, "binaryprovider_symlink_test")
while ispath(link_path)
link_path *= "1"
end

try
symlink("foo", link_path)
return true
catch e
if isa(e, Base.IOError)
return false
end
rethrow(e)
finally
rm(link_path; force=true)
end
end

function install_binaries(file_base, file_ext, binary_dir)
filename = "$(file_base).$(file_ext)"
url = "$(base_url)/$(filename)"
binary_path = joinpath(basedir, "downloads", file_base, binary_dir)
copyderef = get(ENV, "BINARYPROVIDER_COPYDEREF", "") == "true" || !probe_symlink_creation(binary_path)

@static if Sys.iswindows()
install_step = () -> begin
Expand All @@ -28,8 +53,14 @@ function install_binaries(file_base, file_ext, binary_dir)
else
install_step = () -> begin
for file in readdir(binary_path)
symlink(joinpath(binary_path, file),
if !copyderef
symlink(joinpath(binary_path, file),
joinpath(prefix, "bin", file))
else
cp(joinpath(binary_path, file),
joinpath(prefix, "bin", file);
force=true)
end
end
end
end
Expand Down

0 comments on commit e9863ab

Please sign in to comment.