Skip to content

Commit

Permalink
Merge pull request #15 from msakai/github-actions-gurobi
Browse files Browse the repository at this point in the history
GitHub Actions: test using gurobi_cl
  • Loading branch information
msakai committed Jan 8, 2021
2 parents aa55a1a + 6be753a commit 080c399
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/build.yaml
Expand Up @@ -14,36 +14,36 @@ jobs:
stack_yaml: 'stack-ghc-8.8.yaml'
stack_args: '--coverage --haddock --no-haddock-deps'
stack_test_args: ''
flags: '--flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve'
flags: '--flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve --flag MIP:TestGurobiCl'
coveralls: true
- ghc: '8.8.4'
os: ubuntu-latest
stack_yaml: 'stack-ghc-8.8.yaml'
stack_args: ''
stack_test_args: ''
flags: '--flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve --flag MIP:-WithZLIB'
flags: '--flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve --flag MIP:TestGurobiCl --flag MIP:-WithZLIB'
coveralls: false
- ghc: '8.8.4'
os: macos-latest
stack_yaml: 'stack-ghc-8.8.yaml'
stack_args: ''
stack_test_args: ''
flags: '--flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve'
flags: '--flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve --flag MIP:TestGurobiCl'
coveralls: false
- ghc: '8.8.4'
os: windows-latest
stack_yaml: 'stack-ghc-8.8.yaml'
stack_args: '--arch x86_64'
stack_test_args: '-j1' # https://github.com/commercialhaskell/stack/issues/5024
flags: '--flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve'
flags: '--flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve --flag MIP:TestGurobiCl'
coveralls: false
windows_32_or_64: '64'
- ghc: '8.6.3'
os: windows-latest
stack_yaml: 'stack-windows-i386.yaml'
stack_args: '--arch i386'
stack_test_args: '-j1' # https://github.com/commercialhaskell/stack/issues/5024
flags: '--flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve'
flags: '--flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve --flag MIP:TestGurobiCl'
coveralls: false
windows_32_or_64: '32'
steps:
Expand All @@ -58,6 +58,14 @@ jobs:
stack-no-global: true
stack-setup-ghc: true

- uses: s-weigand/setup-conda@v1
name: Setup Conda
with:
conda-channels: 'http://conda.anaconda.org/gurobi'

- name: Install Gurobi
run: conda install gurobi

- name: Install packages (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install coinor-cbc glpk-utils libglpk-dev lp-solve
Expand Down
4 changes: 2 additions & 2 deletions MIP/test/Test/MIPSolver.hs
Expand Up @@ -133,8 +133,8 @@ case_gurobiCl = do
sol @?=
MIP.Solution
{ MIP.solStatus = MIP.StatusOptimal
, MIP.solObjectiveValue = Just 122.50000000000006
, MIP.solVariables = Map.fromList [("x1", 40), ("x2", 10.5), ("x3", 19.500000000000018), ("x4", 3)]
, MIP.solObjectiveValue = Just 122.5
, MIP.solVariables = Map.fromList [("x1", 40), ("x2", 10.5), ("x3", 19.5), ("x4", 3)]
}

case_gurobiCl_unbounded :: Assertion
Expand Down

0 comments on commit 080c399

Please sign in to comment.