From 03093cb3e355029f8b31a51a4a76359654f314fc Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 13 May 2025 10:16:40 +1200 Subject: [PATCH 1/5] Enable Windows in CI and remove warnings --- .github/workflows/ci.yml | 2 +- README.md | 16 ++++++---------- deps/build.jl | 5 +---- src/init.jl | 7 ++----- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9956e323..84e53239 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: version: ['lts', '1'] - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest, macOS-latest, windows-latest] arch: [x64] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index ba5843c8..44c2ad6b 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,6 @@ licensed under the [Apache 2.0 license](https://github.com/scipopt/scip/blob/mas ## Installation -**SCIP cannot be installed automatically on Windows. See the "Custom installation" -instructions below.** - Install SCIP using `Pkg.add`: ```julia julia> import Pkg @@ -41,20 +38,19 @@ julia> import Pkg julia> Pkg.add("SCIP") ``` -On platforms other than Windows, in addition to installing the SCIP.jl package, -this will also download and install the SCIP binaries. You do not need to -install SCIP separately. +In addition to installing the SCIP.jl package, this will also download and +install the SCIP binaries. You do not need to install SCIP separately. ## Windows and custom installations -If you use Windows, or you want a custom SCIP installation, you must manually -install the SCIP binaries. +If you want a custom SCIP installation, you must manually install the SCIP +binaries. Binaries are available for download at [https://www.scipopt.org/#download](https://www.scipopt.org/#download). Once the binaries are installed, set the `SCIPOPTDIR` environment variable to -temporarily point to the installation path (that is, depending on your operating system, -`$SCIPOPTDIR/lib/libscip.so`, `$SCIPOPTDIR/lib/libscip.dylib`, or +temporarily point to the installation path (that is, depending on your operating +system, `$SCIPOPTDIR/lib/libscip.so`, `$SCIPOPTDIR/lib/libscip.dylib`, or `$SCIPOPTDIR/bin/libscip.dll` must exist). Then, install `SCIP.jl` using `Pkg.add` and `Pkg.build` from the Julia command line: ```julia diff --git a/deps/build.jl b/deps/build.jl index f6e06aa4..2e3a5bcc 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -5,13 +5,10 @@ using Libdl -if !haskey(ENV, "SCIPOPTDIR") && !Sys.iswindows() +if !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/init.jl b/src/init.jl index 1b794b60..7bc3e13f 100644 --- a/src/init.jl +++ b/src/init.jl @@ -9,12 +9,9 @@ const depsjl_path = joinpath(@__DIR__, "..", "deps", "deps.jl") if isfile(depsjl_path) # User-provided SCIP library include(depsjl_path) +elseif Sys.iswindows() + using SCIP_jll: libscip else - if Sys.iswindows() - @warn( - "SCIP_jll still doesn't work with Windows, segfaults are likely! See the README for instructions on how to manually install SCIP." - ) - end # Artifact from BinaryBuilder package import SCIP_PaPILO_jll if SCIP_PaPILO_jll.is_available() From c21e0ded9a022ba42e1d00e6acb2d9bda6f5e64b Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 13 May 2025 10:18:28 +1200 Subject: [PATCH 2/5] Update --- .github/workflows/MINLP.yml | 2 +- Project.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/MINLP.yml b/.github/workflows/MINLP.yml index 7c012cf3..48443cb5 100644 --- a/.github/workflows/MINLP.yml +++ b/.github/workflows/MINLP.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: version: ['lts', '1'] - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest, macOS-latest, windows-latest] arch: [x64] steps: - uses: actions/checkout@v4 diff --git a/Project.toml b/Project.toml index 239bc1df..a3b86f75 100644 --- a/Project.toml +++ b/Project.toml @@ -14,7 +14,7 @@ SCIP_jll = "e5ac4fe4-a920-5659-9bf8-f9f73e9e79ce" MathOptInterface = "1.32" OpenBLAS32_jll = "0.3" SCIP_PaPILO_jll = "900" -SCIP_jll = "900" +SCIP_jll = "900.200.100" julia = "1.10" [extras] From 4cbf008669df9775a4d734d310114a105dba93ec Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 13 May 2025 10:43:36 +1200 Subject: [PATCH 3/5] Update --- .github/workflows/MINLP.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/MINLP.yml b/.github/workflows/MINLP.yml index 48443cb5..7c96f9f3 100644 --- a/.github/workflows/MINLP.yml +++ b/.github/workflows/MINLP.yml @@ -26,12 +26,9 @@ jobs: arch: ${{ matrix.arch }} - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - - shell: julia --color=yes {0} + - shell: julia --color=yes --project=test/MINLPTests {0} run: | - path = joinpath(ENV["GITHUB_WORKSPACE"], "test", "MINLPTests") - cd(path) using Pkg - Pkg.activate(".") Pkg.instantiate() - Pkg.add(Pkg.PackageSpec(; path = ENV["GITHUB_WORKSPACE"])) - include(joinpath(path, "run_minlptests.jl")) + Pkg.develop(Pkg.PackageSpec(; path = ENV["GITHUB_WORKSPACE"])) + include("test/MINLPTests/run_minlptests.jl") From bc42b202a12bf6f53d25836b53375891fa24dba4 Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 13 May 2025 10:48:06 +1200 Subject: [PATCH 4/5] Update --- .github/workflows/MINLP.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/MINLP.yml b/.github/workflows/MINLP.yml index 7c96f9f3..42f64650 100644 --- a/.github/workflows/MINLP.yml +++ b/.github/workflows/MINLP.yml @@ -31,4 +31,4 @@ jobs: using Pkg Pkg.instantiate() Pkg.develop(Pkg.PackageSpec(; path = ENV["GITHUB_WORKSPACE"])) - include("test/MINLPTests/run_minlptests.jl") + include(joinpath(ENV["GITHUB_WORKSPACE"], "test", "MINLPTests", "run_minlptests.jl")) From ad88fd8e428948a6d26abf42d43bddec703a7de1 Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 13 May 2025 10:55:09 +1200 Subject: [PATCH 5/5] Update --- test/MINLPTests/Project.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/test/MINLPTests/Project.toml b/test/MINLPTests/Project.toml index b3902290..ee2072f7 100644 --- a/test/MINLPTests/Project.toml +++ b/test/MINLPTests/Project.toml @@ -1,7 +1,6 @@ [deps] JuMP = "4076af6c-e467-56ae-b986-b466b2749572" MINLPTests = "ee0a3090-8ee9-5cdb-b8cb-8eeba3165522" -SCIP = "82193955-e24f-5292-bf16-6f2c5261a85f" [compat] JuMP = "1"