Skip to content

Commit

Permalink
Merge pull request #1305 from ERGO-Code/latest
Browse files Browse the repository at this point in the history
Latest
  • Loading branch information
galabovaa authored May 27, 2023
2 parents e6fe8a7 + 975dfc3 commit 45a127b
Show file tree
Hide file tree
Showing 331 changed files with 12,763 additions and 8,353 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build-bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ jobs:
with:
path: "~/.cache/bazel"
key: bazel
- run: bazel build //...

- name: bazel clean
run: bazel clean

- name: build bazel
run: |
bazel build //...
- name: test
- run: ./bazel-bin/examples/call_highs_example
run: ./bazel-bin/call-highs-example
10 changes: 6 additions & 4 deletions .github/workflows/build-fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ jobs:
shell: bash
run: ctest

- name: Doctest
working-directory: ${{runner.workspace}}/build
shell: bash
run: ./bin/doctest
# disable for now, py11 changes broke it. something trivial but
# not necessary, that was proof of concept. leaving here for now.
# - name: Doctest
# working-directory: ${{runner.workspace}}/build
# shell: bash
# run: ./bin/doctest

- name: Install
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DFAST_BUILD=OFF
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug

- name: Build
working-directory: ${{runner.workspace}}/build
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release -DFAST_BUILD=OFF
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release

- name: Build
working-directory: ${{runner.workspace}}/build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-10.15] # windows-2019 ubuntu-20.04,
os: [macOS-12] # windows-2019 ubuntu-20.04,

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:

- name: Build wheels
run: |
cd $GITHUB_WORKSPACE/src/interfaces/highspy
cd $GITHUB_WORKSPACE
export REPAIR_LIBRARY_PATH=${{runner.workspace}}/installs/highs/lib
export LD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Documentation
on:
push:
branches: [latest]
tags: '*'
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.6'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia --project=docs/ docs/make.jl
10 changes: 5 additions & 5 deletions .github/workflows/test-c-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
- name: Create Build Environment
run: |
mkdir build
mkdir install
mkdir installs
- name: Build HiGHS library
shell: bash
working-directory: build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX=../install \
-DCMAKE_INSTALL_PREFIX=../installs/highs \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DFAST_BUILD=ON \
Expand All @@ -32,6 +32,6 @@ jobs:
run: |
g++ $GITHUB_WORKSPACE/examples/call_highs_from_c.c \
-o c_example \
-I install/include/highs \
-L install/lib -lhighs
LD_LIBRARY_PATH=install/lib ./c_example
-I installs/highs/include/highs \
-L installs/highs/lib -lhighs
LD_LIBRARY_PATH=installs/highs/lib ./c_example
51 changes: 51 additions & 0 deletions .github/workflows/test-python-api-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: test-python-api-mac

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
python: [3.9]

steps:
- uses: actions/checkout@v3

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Create Install dir
run: cmake -E make_directory ${{runner.workspace}}/installs

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DFAST_BUILD=ON -DBUILD_SHARED_LIBS=ON

- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build . --parallel
cmake --install .
- name: Install correct python version
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}

- name: Install Python Dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install pybind11 numpy pyomo pytest
- name: Test Python Interface
shell: bash
working-directory: ${{runner.workspace}}
run: |
pip install -e ./HiGHS
pytest -v ./HiGHS/highspy/tests/
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-python-api
name: test-python-api-ubuntu

on: [push, pull_request]

Expand All @@ -16,7 +16,7 @@ jobs:
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Create Install Directory
- name: Create Install dir
run: cmake -E make_directory ${{runner.workspace}}/installs

- name: Configure CMake
Expand All @@ -29,8 +29,8 @@ jobs:
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build . --parallel --config Release
make install
cmake --build . --parallel
cmake --install .
HIGHS_LIB_DIR=${{runner.workspace}}/installs/highs/lib
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HIGHS_LIB_DIR" >> $GITHUB_ENV
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$HIGHS_LIB_DIR" >> $GITHUB_ENV
Expand All @@ -44,11 +44,11 @@ jobs:
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install pybind11 numpy pyomo nose pip
python -m pip install pybind11 numpy pyomo pytest
- name: Test Python Interface
shell: bash
working-directory: ${{runner.workspace}}
run: |
pip install -e ./HiGHS/src/interfaces/highspy/
nosetests -v ./HiGHS/src/interfaces/highspy/
pip install -e ./HiGHS
pytest -v ./HiGHS/highspy/tests/
55 changes: 55 additions & 0 deletions .github/workflows/test-python-api-win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: test-python-api-win

on: []

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
python: [3.9]

steps:
- uses: actions/checkout@v3

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DFAST_BUILD=ON -DBUILD_SHARED_LIBS=ON

- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build . --parallel --config Release
cmake --install .
# $Env:HIGHS_LIB_DIR=${{runner.workspace}}/build/highs/lib
# $Env:Path=$Env:Path+";"+ $Env:HIGHS_LIB_DIR
# $Env:LIBPATH=$Env:LIBPATH+";"+ $Env:HIGHS_LIB_DIR
# $Env:PYTHONPATH=$Env:PYTHONPATH+";"+ $Env:HIGHS_LIB_DIR
# echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HIGHS_LIB_DIR" >> $GITHUB_ENV
# echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$HIGHS_LIB_DIR" >> $GITHUB_ENV

- name: Install correct python version
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}

- name: Install Python Dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install pybind11 numpy pyomo pytest
- name: Test Python Interface
shell: bash
working-directory: ${{runner.workspace}}
run: |
pip install -e ./HiGHS
pytest -v ./HiGHS/highspy/tests/
4 changes: 2 additions & 2 deletions .github/workflows/test-python-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}
run: |
pip install -e ./HiGHS/src/interfaces/highspy/
nosetests -v ./HiGHS/src/interfaces/highspy/
pip install -e ./HiGHS
nosetests -v ./HiGHS
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ pip-log.txt
#SCIP interface
lpi_highs.cpp

src/interfaces/highspy/highspy/highs_bindings.*.so
highspy/highs_bindings.*.so

# Model written with HiGHSDEV=on
HighsRunModel.mps
Expand All @@ -268,4 +268,4 @@ qjh.mps
bazel*

# webdemo
build_webdemo
build_webdemo
11 changes: 10 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_binary")
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")

copy_file(
Expand Down Expand Up @@ -66,3 +66,12 @@ cc_library(
"@zlib",
],
)

cc_binary(
name = "call-highs-example",
srcs= ["examples/call_highs_from_cpp.cpp"],
deps = [
"//:highs",
],
visibility = ["//visibility:public"]
)
Loading

0 comments on commit 45a127b

Please sign in to comment.