Skip to content

Commit 108116c

Browse files
committed
Update
1 parent 5676433 commit 108116c

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
jobs:
1212
test:
1313
name: 'KNITRO'
14-
runs-on: 'ubuntu-latest'
14+
runs-on: ['ubuntu-latest', 'windows-latest']
1515
strategy:
1616
fail-fast: false
1717
matrix:

deps/build.jl

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,20 @@ function try_local_installation()
4747
end
4848

4949
const WHEELS = Dict(
50-
"x86_64-linux-gnu" => "https://files.pythonhosted.org/packages/76/6e/ffe880b013ad244f0fd91940454e4f2bf16fa01e74c469e1b0fb75eda12a/knitro-15.0.0-py3-none-manylinux1_x86_64.whl",
50+
"linux" => "https://files.pythonhosted.org/packages/76/6e/ffe880b013ad244f0fd91940454e4f2bf16fa01e74c469e1b0fb75eda12a/knitro-15.0.0-py3-none-manylinux1_x86_64.whl",
51+
"windows" => "https://files.pythonhosted.org/packages/13/3f/54953373ee3b631640b33b5d4bdb0217bdb1f8514b9374b08348e098ea2a/knitro-15.0.0-py3-none-win_amd64.whl",
5152
)
5253

5354
function try_ci_installation()
54-
cd(@__DIR__)
55-
if isdir("wheel")
56-
return # Already exists. This can happen if CI has cached the directory
57-
end
58-
if Sys.islinux()
59-
mkdir("wheel")
60-
cd("wheel")
61-
run(`wget $(WHEELS["x86_64-linux-gnu"])`)
62-
run(`unzip knitro-15.0.0-py3-none-manylinux1_x86_64.whl`)
63-
filename = joinpath(@__DIR__, "wheel", "knitro", "lib", "libknitro.so")
64-
write_depsfile("", filename)
55+
ext, url = if Sys.islinux()
56+
".so", WHEELS["linux"]
57+
elseif Sys.iswindows()
58+
".dll", WHEELS["windows"]
6559
end
60+
run(`wget $url --output-file=knitro.whl`)
61+
run(`unzip knitro.whl`)
62+
filename = joinpath(@__DIR__, "knitro", "lib", "libknitro$(ext)")
63+
write_depsfile("", filename)
6664
return
6765
end
6866

test/C_wrapper.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ end
285285
KN_get_rel_opt_error(kc, pCdouble)
286286
@test pCdouble[] < 1e-6
287287
KN_get_con_value(kc, 0, pCdouble)
288-
@test (pCdouble[], 3.96; atol = 1e-4)
288+
@test (pCdouble[], 3.96; atol=1e-4)
289289
nStatus, objSol, x, lambda_ = KN_get_solution(kc)
290290
@test nStatus == 0
291-
@test (x, [0.0, 2.0, 1.98]; atol = 1e-4)
291+
@test (x, [0.0, 2.0, 1.98]; atol=1e-4)
292292

293293
@test objSol 31.363 atol = 1e-3
294294

test/MOI_wrapper.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ function runtests()
1414
for name in names(@__MODULE__; all=true)
1515
if startswith("$(name)", "test_")
1616
@testset "$(name)" begin
17+
@show name
1718
getfield(@__MODULE__, name)()
1819
end
1920
end
@@ -30,7 +31,7 @@ function test_runtests()
3031
infeasible_status=MOI.LOCALLY_INFEASIBLE,
3132
exclude=Any[MOI.VariableBasisStatus, MOI.ConstraintBasisStatus, MOI.ConstraintName],
3233
)
33-
MOI.Test.runtests(model, config; include=["test_basic_"])
34+
MOI.Test.runtests(model, config; include=["test_basic_"], verbose = true)
3435
return
3536
end
3637

@@ -84,12 +85,13 @@ function test_MOI_Test_cached()
8485
# ConstraintDual not supported for SecondOrderCone
8586
second_order_exclude...,
8687
],
88+
verbose = true,
8789
)
8890
# Run the tests for second_order_exclude, this time excluding
8991
# `MOI.ConstraintDual` and `MOI.DualObjectiveValue`.
9092
push!(config.exclude, MOI.ConstraintDual)
9193
push!(config.exclude, MOI.DualObjectiveValue)
92-
MOI.Test.runtests(model, config; include=second_order_exclude)
94+
MOI.Test.runtests(model, config; include=second_order_exclude, verbose = true)
9395
return
9496
end
9597

0 commit comments

Comments
 (0)