Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Mar 12, 2024
1 parent cff6836 commit 0a1baed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ end
function try_ci_installation()
local_filename = joinpath(@__DIR__, "knitro14.zip")
download(ENV["SECRET_KNITRO_ZIP"], local_filename)
run(`tar -xf knitro14.zip`)
if Sys.islinux()
run(`unzip knitro14.zip`)
write_depsfile("", joinpath(@__DIR__, "libknitro1400.so"))
elseif Sys.isapple()
run(`tar -xf knitro14.zip`)
write_depsfile("", joinpath(@__DIR__, "libknitro1400.dylib"))
elseif Sys.iswindows()
run(`tar -xf knitro14.zip`)
write_depsfile("", joinpath(@__DIR__, "knitro1400.dll"))
end
return
Expand Down
4 changes: 2 additions & 2 deletions test/C_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ if KNITRO.knitro_version() >= v"12.1"
KN_get_solution(kc, Ref{Cint}(), obj, C_NULL, C_NULL)
KN_free(kc)
@test status == 0
@test obj[] 250.0 / 3.0
@test isapprox(obj[], 250.0 / 3.0; atol = 1e-4)

# Resolve with dumped MPS file
kc = KN_new()
Expand All @@ -122,7 +122,7 @@ if KNITRO.knitro_version() >= v"12.1"
KN_get_solution(kc, Ref{Cint}(), obj, C_NULL, C_NULL)
KN_free(kc)
@test status == 0
@test obj[] 250.0 / 3.0
@test isapprox(obj[], 250.0 / 3.0; atol = 1e-4)
end
end

Expand Down

0 comments on commit 0a1baed

Please sign in to comment.