Skip to content

Commit

Permalink
Merge pull request #1641 from ERGO-Code/rel18-clean
Browse files Browse the repository at this point in the history
Changes to highspy and cmake for release 1.8
  • Loading branch information
galabovaa authored Mar 4, 2024
2 parents 2eab602 + 7721555 commit 8f477fc
Show file tree
Hide file tree
Showing 68 changed files with 2,799 additions and 2,087 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
os: [macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: bazelbuild/setup-bazelisk@v2

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -34,7 +34,7 @@ jobs:
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --parallel 2 --timeout 300 --output-on-failure -C $BUILD_TYPE
run: ctest --parallel 2 --timeout 300 --output-on-failure

release:
runs-on: ${{ matrix.os }}
Expand All @@ -43,7 +43,7 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -100,7 +100,7 @@ jobs:
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --parallel 2 --timeout 300 --output-on-failure -C $BUILD_TYPE
run: ctest --parallel 2 --timeout 300 --output-on-failure

release64:
runs-on: ${{ matrix.os }}
Expand All @@ -109,7 +109,7 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
os: [macOS-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -37,7 +37,7 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -32,7 +32,7 @@ jobs:
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --parallel 2 --timeout 300 --output-on-failure -C $BUILD_TYPE
run: ctest --parallel 2 --timeout 300 --output-on-failure

release:
runs-on: ${{ matrix.os }}
Expand All @@ -41,7 +41,7 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
os: [macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -32,7 +32,7 @@ jobs:
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --parallel 2 --timeout 300 --output-on-failure -C $BUILD_TYPE
run: ctest --parallel 2 --timeout 300 --output-on-failure

release:
runs-on: ${{ matrix.os }}
Expand All @@ -41,7 +41,7 @@ jobs:
os: [macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
os: [macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
os: [macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/build-meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest] # windows-latest takes to long
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: "recursive"
fetch-depth: 0
Expand All @@ -33,11 +33,15 @@ jobs:
run: |
meson setup bbdir -Duse_zlib=enabled -Dwith_tests=True
meson test -C bbdir
- name: Test compiled highspy
shell: bash -l {0}
run: |
meson configure bbdir -Dwith_pybind11=True
meson compile -C bbdir
LD_LIBRARY_PATH=$(pwd)/bbdir/src \
PYTHONPATH=$(pwd)/bbdir \
python examples/call_highs_from_python.py
# highspy no longer compiled with meson, back to
# setuptools and CMakeBuild
# todo: use it optionally in some way
# - name: Test compiled highspy
# shell: bash -l {0}
# run: |
# meson configure bbdir -Dwith_pybind11=True
# meson compile -C bbdir
# LD_LIBRARY_PATH=$(pwd)/bbdir/src \
# PYTHONPATH=$(pwd)/bbdir \
# python examples/call_highs_from_python.py
5 changes: 3 additions & 2 deletions .github/workflows/build-mingw.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: build-mingw

on: [push, pull_request]
# on: [push, pull_request]
on: [pull_request]

jobs:
mingw:
Expand Down Expand Up @@ -41,7 +42,7 @@ jobs:
${{ matrix.target-prefix }}-cc
${{ matrix.target-prefix }}-ninja
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Configure CMake
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
- [macos-12, macosx_x86_64]
- [macos-12, macosx_arm64]
- [windows-2019, win_amd64]
python: ["cp38", "cp39","cp310", "cp311"]
python: ["cp38", "cp39","cp310", "cp311","cp312"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
Expand All @@ -43,7 +43,7 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build sdist
shell: bash -l {0}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: DoozyX/[email protected]
with:
source: 'app/ src/Highs.h ./src/lp_data ./src/mip ./src/model ./src/simplex ./src/presolve ./src/simplex ./src/util ./src/test'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: '1.9'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
os: [ubuntu-latest, macos-latest]
sanitizer: [address, undefined, thread]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: "recursive"
fetch-depth: 0
Expand Down
36 changes: 32 additions & 4 deletions .github/workflows/test-c-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ name: test-c-example
on: [push, pull_request]

jobs:
build:
fast-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Create Build Environment
run: |
mkdir build
Expand All @@ -23,14 +23,42 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DFAST_BUILD=ON \
-DIPX=OFF \
$GITHUB_WORKSPACE
cmake --build . --config Release --parallel
make install
- name: Compile and test C example
shell: bash
run: |
g++ $GITHUB_WORKSPACE/examples/call_highs_from_c.c \
gcc $GITHUB_WORKSPACE/examples/call_highs_from_c.c \
-o c_example \
-I installs/highs/include/highs \
-L installs/highs/lib -lhighs
LD_LIBRARY_PATH=installs/highs/lib ./c_example
fast-build-off:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Build Environment
run: |
mkdir build
mkdir installs
- name: Build HiGHS library
shell: bash
working-directory: build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX=../installs/highs \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DFAST_BUILD=OFF \
$GITHUB_WORKSPACE
cmake --build . --config Release --parallel
make install
- name: Compile and test C example
shell: bash
run: |
gcc $GITHUB_WORKSPACE/examples/call_highs_from_c.c \
-o c_example \
-I installs/highs/include/highs \
-L installs/highs/lib -lhighs
Expand Down
Loading

0 comments on commit 8f477fc

Please sign in to comment.