Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ci.yml #254

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
["libscip-windows.zip"]
git-tree-sha1 = "08709fd089e77f09335ebe65886cded2a3487f3a"
sha256 = "f5efbc0243a4982cfbb0d52488f58b414f78d2d1251601728d2d99f7adee2f13"
url = "https://cloud.zib.de/s/Wd3go7gpDNpqHrY/download/libscip-windows.zip"
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 1 addition & 4 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 13 additions & 5 deletions src/init.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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, " *
Expand Down
11 changes: 5 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading