Skip to content
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required
dist: trusty
os:
- linux
- osx
# - osx
julia:
- 0.5
- nightly
Expand Down
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
julia 0.5
BinDeps 0.4.0
@osx Homebrew 0.3.0
@windows WinRPM 0.2.0
38 changes: 38 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
environment:
matrix:
# - JULIAVERSION: "julialang/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
- JULIAVERSION: "julialang/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
# - JULIAVERSION: "julianightlies/bin/winnt/x86/julia-latest-win32.exe"
# - JULIAVERSION: "julianightlies/bin/winnt/x64/julia-latest-win64.exe"

branches:
only:
- master

notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false

install:
# 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(
$("http://s3.amazonaws.com/"+$env:JULIAVERSION),
"C:\projects\julia-binary.exe")
# Run installer silently, output to C:\projects\julia
- C:\projects\julia-binary.exe /S /D=C:\projects\julia

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 -F -e "versioninfo();
Pkg.clone(pwd(), \"LCMCore\"); using BinDeps; println(BinDeps.debug(\"LCMCore\")); Pkg.build(\"LCMCore\")"

test_script:
- C:\projects\julia\bin\julia -e "Pkg.test(\"LCMCore\")"
31 changes: 28 additions & 3 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,18 @@ lcm_cmake_arguments = String[]
using Homebrew
provides(Homebrew.HB, "glib", glib, os=:Darwin)
push!(lcm_cmake_arguments,
"-DCMAKE_LIBRARY_PATH=$(joinpath(Pkg.dir("Homebrew"), "deps", "usr", "lib"))")
"-DCMAKE_PREFIX_PATH=$(joinpath(Pkg.dir("Homebrew"), "deps", "usr"))")
elseif is_windows()
using WinRPM
win_prefix = joinpath(Pkg.dir("WinRPM"), "deps", "usr",
"$(Sys.ARCH)-w64-mingw32",
"sys-root",
"mingw")
push!(lcm_cmake_arguments,
"-DCMAKE_INCLUDE_PATH=$(joinpath(Pkg.dir("Homebrew"), "deps", "usr", "include"))")

"-DCMAKE_PREFIX_PATH=$(win_prefix)")
push!(lcm_cmake_arguments,
"-DCMAKE_LIBRARY_PATH=$(joinpath(win_prefix, "bin"))")
provides(WinRPM.RPM, "glib-dev", [glib], os=:Windows)
end

provides(Yum,
Expand All @@ -65,6 +73,14 @@ lcm_cmake_command = `$lcm_cmake_command $lcm_srcdir`

provides(BuildProcess,
(@build_steps begin
() -> begin
path = joinpath(Pkg.dir("WinRPM"), "deps", "usr")
for element in ["$(Sys.ARCH)-w64-mingw32", "sys-root", "mingw", "bin"]
path = joinpath(path, element)
@show path
@show readdir(path)
end
end
GetSources(lcm)
CreateDirectory(lcm_builddir)
@build_steps begin
Expand All @@ -78,4 +94,13 @@ provides(BuildProcess,
const lcm_prefix = "$prefix"
""")

# Hack inspired by https://github.com/JuliaLang/BinDeps.jl/issues/55
@static if is_windows()
push!(BinDeps.defaults, BuildProcess)
end

@BinDeps.install Dict(:lcm => :liblcm)

@static if is_windows()
pop!(BinDeps.defaults)
end