Skip to content

Commit

Permalink
Merge pull request #177 from scipopt/rs/jll
Browse files Browse the repository at this point in the history
Add SCIP_jll as dependency
  • Loading branch information
rschwarz authored Jan 25, 2021
2 parents df8d76c + 1ccb7da commit 07728ff
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 107 deletions.
30 changes: 0 additions & 30 deletions .appveyor.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: ['1.3', '1'] # Test against current minor release (at least 1.3)
os: [ubuntu-latest, macOS-latest]
arch: [x64]
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
54 changes: 0 additions & 54 deletions .travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ uuid = "82193955-e24f-5292-bf16-6f2c5261a85f"
version = "0.9.7"

[deps]
Ipopt_jll = "9cc047cb-c261-5740-88fc-0cf96f7bdcc7"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
SCIP_jll = "e5ac4fe4-a920-5659-9bf8-f9f73e9e79ce"

[compat]
Ipopt_jll = "^3.13.2"
MathOptInterface = "^0.9.6"
julia = "^1.0.0"
SCIP_jll = "^0.1.2"
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,28 @@

Julia interface to [SCIP](http://scip.zib.de) solver.

[![Build Status](https://travis-ci.org/SCIP-Interfaces/SCIP.jl.svg?branch=master)](https://travis-ci.org/SCIP-Interfaces/SCIP.jl)
[![Build Status](https://github.com/scipopt/SCIP.jl/workflows/CI/badge.svg?branch=master)](https://github.com/scipopt/SCIP.jl/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/SCIP-Interfaces/SCIP.jl/badge.svg?branch=master)](https://coveralls.io/github/SCIP-Interfaces/SCIP.jl?branch=master)
[![codecov](https://codecov.io/gh/SCIP-Interfaces/SCIP.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/SCIP-Interfaces/SCIP.jl)

See [NEWS.md](https://github.com/SCIP-Interfaces/SCIP.jl/blob/master/NEWS.md) for changes in each (recent) release.

## Update (August 2020)

On MacOS and Linux, it is no longer required to install the [SCIP](https://scipopt.org/) binaries using this package. There now exists a
[BinaryBuilder.jl](https://github.com/JuliaPackaging/BinaryBuilder.jl) generated
package [SCIP_jll.jl](https://github.com/JuliaBinaryWrappers/SCIP_jll.jl) which
is installed automatically as a dependency.


On Windows, the separate installation of SCIP is still mandatory.

Under Julia 1.3 or more recent, you can use this default installation:

pkg> add SCIP

If you use an older Julia version, Windows or want a custom SCIP installation, see below for the build steps.

## Update (March 2019)

We have completely rewritten the interface from scratch, using
Expand All @@ -23,26 +39,19 @@ Currently, we support LP, MIP and QCP problems, as well as some nonlinear constr
It is now possible to implement SCIP constraint handlers in Julia. Other plugin
types are not yet supported.

## Getting Started

To use SCIP.jl, you will need [SCIP](http://scip.zib.de) installed on your
system. [SCIP's license](https://scip.zib.de/index.php#license) does not allow
(automatic) redistribution, so please
[download](https://scip.zib.de/index.php#download) and install it yourself.
## Custom SCIP installations.

Currently, Linux, OS X and Windows are tested and supported.
If you prefer to link to your own installation of SCIP, please set the
environment variable `SCIPOPTDIR` to point to the **installation path**. That
is, either `$SCIPOPTDIR/lib/libscip.so`, `$SCIPOPTDIR/lib/libscip.dylib` or
`$SCIPOPTDIR/bin/scip.dll` should exist, depending on your operating system.

We recommend using one of the provided installers, e.g.,
`SCIPOptSuite-6.0.1-Linux.deb` for systems based on Debian. Adding the SCIP.jl
package should then work out of the box:

pkg> add SCIP
When this is set before you install this package, it should be recognized
automatically. Afterwards, you can trigger the build with

If you [build SCIP from source](https://scip.zib.de/doc-6.0.1/html/CMAKE.php)
you should set the environment variable `SCIPOPTDIR` to point the the
**installation path**. That is, either `$SCIPOPTDIR/lib/libscip.so`,
`$SCIPOPTDIR/lib/libscip.dylib` or `$SCIPOPTDIR/bin/scip.dll` should exist,
depending on your operating system.
pkg> build SCIP

This step is also required if your Julia version is older than 1.3.

## Setting Parameters

Expand Down
5 changes: 5 additions & 0 deletions deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
using Libdl

if VERSION >= v"1.3" && !Sys.iswindows() && !haskey(ENV, "SCIPOPTDIR")
# Skip build in favor of SCIP_jll
exit()
end

depsfile = joinpath(dirname(@__FILE__), "deps.jl")
if isfile(depsfile)
rm(depsfile)
Expand Down
15 changes: 11 additions & 4 deletions src/init.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import Libdl
const depsjl_path = joinpath(@__DIR__, "..", "deps", "deps.jl")
if !isfile(depsjl_path)
error("SCIP was not built properly, please run Pkg.build(\"SCIP\")")

if VERSION < v"1.3" || haskey(ENV, "SCIPOPTDIR")
# User-provided SCIP library
const depsjl_path = joinpath(@__DIR__, "..", "deps", "deps.jl")
if !isfile(depsjl_path)
error("SCIP was not built properly, please run Pkg.build(\"SCIP\")")
end
include(depsjl_path)
else
# Artifact from BinaryBuilder package
using SCIP_jll: libscip
end
include(depsjl_path)

function __init__()
major = SCIPmajorVersion()
Expand Down

0 comments on commit 07728ff

Please sign in to comment.