Skip to content

Commit 80c0289

Browse files
authored
Work-around bug in recent Ipopt_jll releases (#162)
1 parent b792051 commit 80c0289

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
version: ['1'] # Test against current minor release
15-
os: [ubuntu-latest]
14+
version: ['1.6', '1'] # Test against current minor release
15+
os: [ubuntu-latest, macOS-latest, windows-latest]
1616
arch: [x64]
1717
include:
1818
# Also test against 32-bit Linux

.github/workflows/format_check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
shell: julia --color=yes {0}
1919
run: |
2020
using Pkg
21-
Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.9"))
21+
Pkg.add(PackageSpec(name="JuliaFormatter", version="1"))
2222
using JuliaFormatter
2323
format("src", verbose=true)
2424
format("test", verbose=true)

Project.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name = "AmplNLWriter"
22
uuid = "7c4d4715-977e-5154-bfe0-e096adeac482"
3-
version = "1.0.1"
3+
version = "1.0.2"
44

55
[deps]
6+
Ipopt_jll = "9cc047cb-c261-5740-88fc-0cf96f7bdcc7"
67
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
78

89
[compat]
9-
Ipopt_jll = "300.1400.400"
10+
Ipopt_jll = "=300.1400.400"
1011
MathOptInterface = "1.3"
1112
julia = "1.6"
1213

1314
[extras]
14-
Ipopt_jll = "9cc047cb-c261-5740-88fc-0cf96f7bdcc7"
1515
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1616

1717
[targets]
18-
test = ["Test", "Ipopt_jll"]
18+
test = ["Test"]

src/AmplNLWriter.jl

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
module AmplNLWriter
77

8-
import MathOptInterface
9-
const MOI = MathOptInterface
8+
import MathOptInterface as MOI
109

1110
"""
1211
AbstractSolverCommand

test/MINLPTests/Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1010
[compat]
1111
Bonmin_jll = "100.800.801"
1212
Couenne_jll = "0.500.801"
13-
Ipopt_jll = "300.1400.400"
14-
JuMP = "0.23, 1"
13+
Ipopt_jll = "=300.1400.400"
14+
JuMP = "1"
1515
MINLPTests = "0.5"
1616
SHOT_jll = "100.100.0"
1717
julia = "1.6"

test/MOI_wrapper.jl

+5-4
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,19 @@ end
135135
function test_io(path)
136136
io = IOBuffer()
137137
model = optimizer(path; stdin = stdin, stdout = io)
138+
MOI.set(model, MOI.RawOptimizerAttribute("print_level"), 1)
138139
x = MOI.add_variable(model)
139140
MOI.add_constraint(model, x, MOI.GreaterThan(0.0))
140141
MOI.optimize!(model)
142+
flush(io)
141143
seekstart(io)
142144
s = String(take!(io))
143-
if VERSION < v"1.6"
144-
# TODO(odow): Looks like Julia 1.0 changed something here? Not a high
145-
# priority to investigate.
146-
@test length(s) >= 0
145+
if Sys.iswindows()
146+
@test_broken length(s) > 0
147147
else
148148
@test length(s) > 0
149149
end
150+
return
150151
end
151152

152153
function test_single_variable_interval_dual(path)

0 commit comments

Comments
 (0)