Skip to content

Commit

Permalink
Update to Julia v1.0 and MOI v0.8 (#9)
Browse files Browse the repository at this point in the history
* 🚚 Rename to MOI_wrapper.jl

* ⬆️ Upgrade to Julia v1.0 and MOI v0.8

* 👷 Update Travis script

* 👌 Fix default value of x_computed and z_computed

* 👌 ALMOST_OPTIMAL -> OTHER_ERROR
  • Loading branch information
blegat authored and joehuchette committed Jan 25, 2019
1 parent b509d50 commit bff9d1d
Show file tree
Hide file tree
Showing 15 changed files with 228 additions and 147 deletions.
14 changes: 2 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,16 @@ os:
- linux
- osx
julia:
- 0.6
- nightly
- 1.0
matrix:
allow_failures:
- julia: nightly
notifications:
email: false
before_script:
- julia -e 'Pkg.clone("https://github.com/JuliaOpt/MathOptInterface.jl.git")'
- julia -e 'Pkg.clone("https://github.com/JuliaOpt/MathOptInterfaceUtilities.jl.git")'
- julia -e 'Pkg.clone("https://github.com/JuliaOpt/MathOptInterfaceTests.jl.git")'
- julia -e 'Pkg.clone("https://github.com/JuliaOpt/SemidefiniteOptInterface.jl.git")'
# uncomment the following lines to override the default test script
#script:
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
# - julia -e 'Pkg.clone(pwd()); Pkg.build("SDPA"); Pkg.test("SDPA"; coverage=true)'
addons:
apt_packages:
- liblapack-dev
- libopenblas-dev
after_success:
# push coverage results to Coveralls and Codecov
- julia -e 'cd(Pkg.dir("SDPA")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder()); Codecov.submit(Codecov.process_folder())'
- julia -e 'using Pkg; Pkg.add("Coverage"); cd(Pkg.dir("DSDP")); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())'
7 changes: 3 additions & 4 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
julia 0.6
julia 1.0
BinDeps
MathOptInterface
MathOptInterfaceTests
SemidefiniteOptInterface
MathOptInterface 0.8 0.9
SemidefiniteOptInterface 0.5 0.6
1 change: 1 addition & 0 deletions deps/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ deps.jl
downloads/*
src/*
usr/*
build.log
8 changes: 4 additions & 4 deletions deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using BinDeps
using Libdl, BinDeps

@BinDeps.setup

@static if is_unix()
@static if Sys.isunix()
libdsdp = library_dependency("libdsdp", aliases=["libdsdp.a", "libdsdp.so", "libdsdp.dylib"])
end

Expand All @@ -12,7 +12,7 @@ provides(Sources, URI("http://www.mcs.anl.gov/hs/software/DSDP/$DSDPname.tar.gz"
[libdsdp], os = :Unix, unpacked_dir="$DSDPname")

patchdir=BinDeps.depsdir(libdsdp)
srcdir = joinpath(patchdir,"src",DSDPname)
srcdir = joinpath(patchdir,"src",DSDPname)
libdir = joinpath(srcdir,"lib")
usrdir = BinDeps.usrdir(libdsdp)

Expand All @@ -29,7 +29,7 @@ provides(SimpleBuild,
pipeline(`patch -N -p0`, stdin="$patchdir/g2c_2.patch")
pipeline(`patch -N -p0`, stdin="$patchdir/shared.patch")
pipeline(`patch -N -p0`, stdin="$patchdir/rm.patch")
@static if is_apple()
@static if Sys.isapple()
pipeline(`patch -N -p0`, stdin="$patchdir/apple.patch")
end
`make`
Expand Down
7 changes: 4 additions & 3 deletions src/DSDP.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module DSDP
using Libdl

if isfile(joinpath(Pkg.dir("DSDP"),"deps","deps.jl"))
if isfile(joinpath(dirname(@__FILE__), "..", "deps", "deps.jl"))
include("../deps/deps.jl")
else
error("DSDP not properly installed. Please run Pkg.build(\"DSDP\")")
Expand All @@ -17,7 +18,7 @@ macro dsdp_ccall(f, args...)
end
end

const DSDPT = Ptr{Void}
const DSDPT = Ptr{Nothing}

include("dsdp5_enums.jl")
include("dsdp5_API.jl")
Expand Down Expand Up @@ -51,6 +52,6 @@ end
# @dsdp_ccall DSDPPrintSolution (Ptr{FILE}, DSDP, SDPCone.SDPConeT, LPCone.LPConeT) arg1 arg2 arg3 arg4
#end

include("DSDPSolverInterface.jl")
include("MOI_wrapper.jl")

end
Loading

0 comments on commit bff9d1d

Please sign in to comment.