Skip to content

Commit

Permalink
Fix/python linear solver py (#23)
Browse files Browse the repository at this point in the history
* fix linear_solver.i

* enable CI for fix branches

* try activate python tests for windows

* fix python tests for windows

* fix type yml
  • Loading branch information
sgatto authored Apr 1, 2022
1 parent 61dd388 commit c8ec536
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ubuntu-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- feature/*
- merge*
- fix/*
release:
types: [ created ]
Expand Down Expand Up @@ -307,7 +308,7 @@ jobs:
working-directory: ./build
run: ctest --output-on-failure -C Release -R cxx_cpp -E cxx_cpp_linear_programming
- name: Run other python tests
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.python == 'ON' && matrix.xprs == 'ON' && matrix.sirius == 'ON' }}
if: ${{ matrix.python == 'ON' && matrix.xprs == 'ON' && matrix.sirius == 'ON' }}
working-directory: ./build
run: ctest --output-on-failure -C Release -R python_python -E python_python_linear_programming
- name: Run other java tests
Expand Down
15 changes: 6 additions & 9 deletions ortools/linear_solver/python/linear_solver.i
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@
%pythonbegin %{
import os as _os
if hasattr(_os, 'add_dll_directory'):
try:
_os.add_dll_directory(_os.getenv('SIRIUS'))
except AttributeError:
pass
try:
_os.add_dll_directory(_os.getenv('XPRESS'))
except AttributeError:
pass
sirius=_os.getenv('SIRIUS')
if sirius:
_os.add_dll_directory(sirius)
xpress=_os.getenv('XPRESS')
if xpress:
_os.add_dll_directory(xpress)
%}

%include "ortools/base/base.i"

%include "std_string.i"
Expand Down

0 comments on commit c8ec536

Please sign in to comment.