Skip to content

Enable Windows in CI and remove warnings #331

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

Merged
merged 5 commits into from
May 13, 2025
Merged
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
11 changes: 4 additions & 7 deletions .github/workflows/MINLP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(joinpath(ENV["GITHUB_WORKSPACE"], "test", "MINLPTests", "run_minlptests.jl"))
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,26 @@ 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

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
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 !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)
Expand Down
7 changes: 2 additions & 5 deletions src/init.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: also test and update SCIP_PaPILO_jll if this CI passes

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()
Expand Down
1 change: 0 additions & 1 deletion test/MINLPTests/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Loading