diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f889f7..d1ec9de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,9 +11,19 @@ jobs: strategy: fail-fast: false matrix: - version: ['1.6', '1'] - os: [ubuntu-latest, macOS-latest] - arch: [x64] + include: + - version: '1' # The latest point-release (Linux) + os: ubuntu-latest + arch: x64 + - version: '1' # The latest point-release (Windows) + os: windows-latest + arch: x64 + - version: '1.6' # 1.6 LTS (64-bit Linux) + os: ubuntu-latest + arch: x64 + - version: 'nightly' + os: ubuntu-latest + arch: x64 steps: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@v1 diff --git a/Artifacts.toml b/Artifacts.toml new file mode 100644 index 0000000..6e3e38b --- /dev/null +++ b/Artifacts.toml @@ -0,0 +1,4 @@ +["libscip-windows.zip"] +git-tree-sha1 = "08709fd089e77f09335ebe65886cded2a3487f3a" +sha256 = "f5efbc0243a4982cfbb0d52488f58b414f78d2d1251601728d2d99f7adee2f13" +url = "https://cloud.zib.de/s/Wd3go7gpDNpqHrY/download/libscip-windows.zip" diff --git a/Project.toml b/Project.toml index cf643cd..53ed458 100644 --- a/Project.toml +++ b/Project.toml @@ -3,6 +3,7 @@ uuid = "82193955-e24f-5292-bf16-6f2c5261a85f" version = "0.11.14" [deps] +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" @@ -13,8 +14,8 @@ SCIP_jll = "e5ac4fe4-a920-5659-9bf8-f9f73e9e79ce" [compat] MathOptInterface = "1.7" OpenBLAS32_jll = "0.3" -SCIP_PaPILO_jll = "800" -SCIP_jll = "800" +SCIP_PaPILO_jll = "900" +SCIP_jll = "900" julia = "1.6" [extras] diff --git a/README.md b/README.md index 161e114..bb8ab1d 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ [![codecov](https://codecov.io/gh/scipopt/SCIP.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/scipopt/SCIP.jl) [![Genie Downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/SCIP)](https://pkgs.genieframework.com?packages=SCIP) -[SCIP.jl](https://github.com/scipopt/SCIP.jl) is a Julia interface to the -[SCIP](https://scipopt.org) solver. + +[SCIP.jl](https://github.com/scipopt/SCIP.jl) is a Julia interface to the [SCIP](https://scipopt.org) solver. ## Affiliation diff --git a/deps/build.jl b/deps/build.jl index 989c416..23ea45f 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -5,13 +5,10 @@ using Libdl -if VERSION >= v"1.3" && !haskey(ENV, "SCIPOPTDIR") && !Sys.iswindows() +if VERSION >= v"1.3" && !haskey(ENV, "SCIPOPTDIR") # Skip build in favor of SCIP_jll exit() end -if Sys.iswindows() - @warn("SCIP_jll still doesn't work with windows, segfaults are likely!") -end depsfile = joinpath(dirname(@__FILE__), "deps.jl") if isfile(depsfile) diff --git a/src/MOI_wrapper.jl b/src/MOI_wrapper.jl index 52cb436..85d5080 100644 --- a/src/MOI_wrapper.jl +++ b/src/MOI_wrapper.jl @@ -72,6 +72,7 @@ mutable struct Optimizer <: MOI.AbstractOptimizer name = replace(String(key), "_" => "/") MOI.set(o, MOI.RawOptimizerAttribute(name), value) end + set_parameter(o.inner, "heuristics/alns/freq", 0) return o end end @@ -290,6 +291,7 @@ function MOI.empty!(o::Optimizer) for pair in o.params set_parameter(o.inner, pair.first, pair.second) end + set_parameter(o.inner, "heuristics/alns/freq", 0) o.objective_sense = nothing o.objective_function_set = false o.conflict_status = MOI.COMPUTE_CONFLICT_NOT_CALLED diff --git a/src/init.jl b/src/init.jl index 7593e47..f689681 100644 --- a/src/init.jl +++ b/src/init.jl @@ -11,11 +11,19 @@ if isfile(depsjl_path) include(depsjl_path) else # Artifact from BinaryBuilder package - import SCIP_PaPILO_jll - if SCIP_PaPILO_jll.is_available() - using SCIP_PaPILO_jll: libscip + if Sys.iswindows() + @eval using Artifacts + @eval const libscip = joinpath( + artifact"libscip-windows.zip", + "scip_install/bin/libscip.dll", + ) else - using SCIP_jll: libscip + import SCIP_PaPILO_jll + if SCIP_PaPILO_jll.is_available() && !Sys.iswindows() + using SCIP_PaPILO_jll: libscip + else + using SCIP_jll: libscip + end end end @@ -31,7 +39,7 @@ function __init__() patch = SCIPtechVersion() current = VersionNumber("$major.$minor.$patch") required = VersionNumber("8") - upperbound = VersionNumber("9") + upperbound = VersionNumber("10") if current < required || current >= upperbound @error( "SCIP is installed at version $current, " * diff --git a/test/runtests.jl b/test/runtests.jl index 06db0bd..ae195a6 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -8,20 +8,19 @@ using SCIP using SCIP_jll using SCIP_PaPILO_jll -@static if VERSION >= v"1.7" - import LinearAlgebra, OpenBLAS32_jll - LinearAlgebra.BLAS.lbt_forward(OpenBLAS32_jll.libopenblas_path) -end - @show(@eval(SCIP, libscip) == SCIP_jll.libscip) @show( SCIP_PaPILO_jll.is_available() && @eval(SCIP, libscip) == SCIP_PaPILO_jll.libscip ) +@show SCIP_PaPILO_jll.best_wrapper @show SCIP.SCIP_versionnumber() +@show SCIP_jll.best_wrapper @testset "MathOptInterface nonlinear expressions" begin - include("MOI_nonlinear_exprs.jl") + if !Sys.iswindows() + include("MOI_nonlinear_exprs.jl") + end end @testset "direct library calls" begin