Skip to content

Commit 890baa2

Browse files
authored
Enable Windows in CI and remove warnings (#331)
1 parent 406d8a2 commit 890baa2

File tree

7 files changed

+15
-29
lines changed

7 files changed

+15
-29
lines changed

.github/workflows/MINLP.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
version: ['lts', '1']
19-
os: [ubuntu-latest, macOS-latest]
19+
os: [ubuntu-latest, macOS-latest, windows-latest]
2020
arch: [x64]
2121
steps:
2222
- uses: actions/checkout@v4
@@ -26,12 +26,9 @@ jobs:
2626
arch: ${{ matrix.arch }}
2727
- uses: julia-actions/cache@v2
2828
- uses: julia-actions/julia-buildpkg@v1
29-
- shell: julia --color=yes {0}
29+
- shell: julia --color=yes --project=test/MINLPTests {0}
3030
run: |
31-
path = joinpath(ENV["GITHUB_WORKSPACE"], "test", "MINLPTests")
32-
cd(path)
3331
using Pkg
34-
Pkg.activate(".")
3532
Pkg.instantiate()
36-
Pkg.add(Pkg.PackageSpec(; path = ENV["GITHUB_WORKSPACE"]))
37-
include(joinpath(path, "run_minlptests.jl"))
33+
Pkg.develop(Pkg.PackageSpec(; path = ENV["GITHUB_WORKSPACE"]))
34+
include(joinpath(ENV["GITHUB_WORKSPACE"], "test", "MINLPTests", "run_minlptests.jl"))

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
version: ['lts', '1']
19-
os: [ubuntu-latest, macOS-latest]
19+
os: [ubuntu-latest, macOS-latest, windows-latest]
2020
arch: [x64]
2121
steps:
2222
- uses: actions/checkout@v4

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SCIP_jll = "e5ac4fe4-a920-5659-9bf8-f9f73e9e79ce"
1414
MathOptInterface = "1.32"
1515
OpenBLAS32_jll = "0.3"
1616
SCIP_PaPILO_jll = "900"
17-
SCIP_jll = "900"
17+
SCIP_jll = "900.200.100"
1818
julia = "1.10"
1919

2020
[extras]

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,26 @@ licensed under the [Apache 2.0 license](https://github.com/scipopt/scip/blob/mas
3131

3232
## Installation
3333

34-
**SCIP cannot be installed automatically on Windows. See the "Custom installation"
35-
instructions below.**
36-
3734
Install SCIP using `Pkg.add`:
3835
```julia
3936
julia> import Pkg
4037

4138
julia> Pkg.add("SCIP")
4239
```
4340

44-
On platforms other than Windows, in addition to installing the SCIP.jl package,
45-
this will also download and install the SCIP binaries. You do not need to
46-
install SCIP separately.
41+
In addition to installing the SCIP.jl package, this will also download and
42+
install the SCIP binaries. You do not need to install SCIP separately.
4743

4844
## Windows and custom installations
4945

50-
If you use Windows, or you want a custom SCIP installation, you must manually
51-
install the SCIP binaries.
46+
If you want a custom SCIP installation, you must manually install the SCIP
47+
binaries.
5248

5349
Binaries are available for download at [https://www.scipopt.org/#download](https://www.scipopt.org/#download).
5450

5551
Once the binaries are installed, set the `SCIPOPTDIR` environment variable to
56-
temporarily point to the installation path (that is, depending on your operating system,
57-
`$SCIPOPTDIR/lib/libscip.so`, `$SCIPOPTDIR/lib/libscip.dylib`, or
52+
temporarily point to the installation path (that is, depending on your operating
53+
system, `$SCIPOPTDIR/lib/libscip.so`, `$SCIPOPTDIR/lib/libscip.dylib`, or
5854
`$SCIPOPTDIR/bin/libscip.dll` must exist). Then, install `SCIP.jl` using `Pkg.add`
5955
and `Pkg.build` from the Julia command line:
6056
```julia

deps/build.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55

66
using Libdl
77

8-
if !haskey(ENV, "SCIPOPTDIR") && !Sys.iswindows()
8+
if !haskey(ENV, "SCIPOPTDIR")
99
# Skip build in favor of SCIP_jll
1010
exit()
1111
end
12-
if Sys.iswindows()
13-
@warn("SCIP_jll still doesn't work with windows, segfaults are likely!")
14-
end
1512

1613
depsfile = joinpath(dirname(@__FILE__), "deps.jl")
1714
if isfile(depsfile)

src/init.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ const depsjl_path = joinpath(@__DIR__, "..", "deps", "deps.jl")
99
if isfile(depsjl_path)
1010
# User-provided SCIP library
1111
include(depsjl_path)
12+
elseif Sys.iswindows()
13+
using SCIP_jll: libscip
1214
else
13-
if Sys.iswindows()
14-
@warn(
15-
"SCIP_jll still doesn't work with Windows, segfaults are likely! See the README for instructions on how to manually install SCIP."
16-
)
17-
end
1815
# Artifact from BinaryBuilder package
1916
import SCIP_PaPILO_jll
2017
if SCIP_PaPILO_jll.is_available()

test/MINLPTests/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[deps]
22
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
33
MINLPTests = "ee0a3090-8ee9-5cdb-b8cb-8eeba3165522"
4-
SCIP = "82193955-e24f-5292-bf16-6f2c5261a85f"
54

65
[compat]
76
JuMP = "1"

0 commit comments

Comments
 (0)