Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
fix travis (#36)
Browse files Browse the repository at this point in the history
* fix travis

* switch to GLPK

* remove Clp from Project
  • Loading branch information
matbesancon authored Feb 25, 2020
1 parent 838078f commit de45c23
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
22 changes: 19 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ after_success:
- julia -e 'cd(Pkg.dir("LightGraphsFlows")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
# push coverage results to Codecov
- julia -e 'cd(Pkg.dir("LightGraphsFlows")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
# Build documentation
- julia -e 'Pkg.add("Documenter")'
- julia -e 'cd(Pkg.dir("LightGraphsFlows")); include(joinpath("docs", "make.jl"))'

branches:
only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/

jobs:
allow_failures:
- julia: nightly
fast_finish: true
include:
- stage: "Documentation"
julia: 1.0
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate()'
- julia --project=docs/ docs/make.jl
after_success: skip
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ SimpleTraits = "0.9"
julia = "1"

[extras]
Clp = "e2554f3b-3117-50c0-817c-e040a3ddf72d"
GLPK = "60bf3e95-4087-53dc-ae20-288a0d20c6a6"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Clp", "Test"]
test = ["GLPK", "Test"]
4 changes: 2 additions & 2 deletions test/mincost.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Clp
import GLPK
using JuMP

using SparseArrays: spzeros
Expand Down Expand Up @@ -27,7 +27,7 @@ using SparseArrays: spzeros
demand[4,6] = 1
capacity = ones(6,6)

o = with_optimizer(Clp.Optimizer)
o = with_optimizer(GLPK.Optimizer)
node_demand = spzeros(lg.nv(g))
flow = mincost_flow(g, node_demand, capacity, cost, o, edge_demand=demand, source_nodes=[5], sink_nodes=[6])
@test flow[5,1] 1
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const lg = LightGraphs

using LinearAlgebra: diag

using JuMP
import GLPK

const testdir = dirname(@__FILE__)

testgraphs(g) = [g, lg.Graph{UInt8}(g), lg.Graph{Int16}(g)]
Expand Down

0 comments on commit de45c23

Please sign in to comment.