Skip to content

Commit fcfb534

Browse files
authored
Merge pull request ERGO-Code#1986 from ERGO-Code/latest
Ready for release
2 parents 5ce7a27 + e60cbb3 commit fcfb534

File tree

144 files changed

+27085
-18112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+27085
-18112
lines changed

.github/workflows/build-nuget-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ jobs:
185185

186186
- name: Dotnet pack
187187
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
188-
run: dotnet pack -c Release /p:Version=1.7.2
188+
run: dotnet pack -c Release /p:Version=1.8.0
189189

190190
- uses: actions/upload-artifact@v4
191191
with:

.github/workflows/clang-format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88

99
steps:
1010
- uses: actions/checkout@v4
11-
- uses: DoozyX/clang-format-lint-action@v0.14
11+
- uses: DoozyX/clang-format-lint-action@v0.18
1212
with:
1313
source: 'app/ src/Highs.h ./src/lp_data ./src/mip ./src/model ./src/simplex ./src/presolve ./src/simplex ./src/util ./src/test'
1414
#./src/test ./interfaces'
1515
extensions: 'h,cpp,c'
16-
clangFormatVersion: 14
16+
clangFormatVersion: 18
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: sanitizers-cmake
2+
on: [] #push
3+
4+
jobs:
5+
sanitizer_release:
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
# os: [ubuntu-latest, macos-latest]
11+
os: [ubuntu-latest]
12+
sanitizer: [Address, Thread, Leak]
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Create Build Environment
17+
run: cmake -E make_directory ${{runner.workspace}}/build
18+
19+
- name: Configure CMake and Build
20+
shell: bash
21+
working-directory: ${{runner.workspace}}/build
22+
run: |
23+
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEBUG_MEMORY=${{ matrix.sanitizer }}
24+
cmake --build . --parallel
25+
26+
- name: Run
27+
working-directory: ${{runner.workspace}}/build
28+
shell: bash
29+
run: ./bin/highs $GITHUB_WORKSPACE/check/instances/afiro.mps
30+
31+
sanitizer_debug:
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
# os: [ubuntu-latest, macos-latest]
37+
os: [ubuntu-latest]
38+
sanitizer: [Address, Thread, Leak]
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Create Build Environment
43+
run: cmake -E make_directory ${{runner.workspace}}/build
44+
45+
- name: Configure CMake and Build
46+
shell: bash
47+
working-directory: ${{runner.workspace}}/build
48+
run: |
49+
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DDEBUG_MEMORY=${{ matrix.sanitizer }}
50+
cmake --build . --parallel
51+
52+
- name: Run
53+
working-directory: ${{runner.workspace}}/build
54+
shell: bash
55+
run: ./bin/highs $GITHUB_WORKSPACE/check/instances/afiro.mps

.github/workflows/test-nuget-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Dotnet pack
3737
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
38-
run: dotnet pack -c Release /p:Version=1.7.2
38+
run: dotnet pack -c Release /p:Version=1.8.0
3939

4040
- name: Add local feed
4141
run: dotnet nuget add source ${{runner.workspace}}/nugets
@@ -81,7 +81,7 @@ jobs:
8181

8282
- name: Dotnet pack
8383
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
84-
run: dotnet pack -c Release /p:Version=1.7.2
84+
run: dotnet pack -c Release /p:Version=1.8.0
8585

8686
- name: Add local feed
8787
run: dotnet nuget add source ${{runner.workspace}}/nugets

.github/workflows/test-nuget-package.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Dotnet pack
3737
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
38-
run: dotnet pack -c Release /p:Version=1.7.2
38+
run: dotnet pack -c Release /p:Version=1.8.0
3939

4040
- name: Add local feed
4141
run: dotnet nuget add source ${{runner.workspace}}/nugets
@@ -81,7 +81,7 @@ jobs:
8181

8282
- name: Dotnet pack
8383
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
84-
run: dotnet pack -c Release /p:Version=1.7.2
84+
run: dotnet pack -c Release /p:Version=1.8.0
8585

8686
- name: Add local feed
8787
run: dotnet nuget add source ${{runner.workspace}}/nugets
@@ -124,7 +124,7 @@ jobs:
124124

125125
- name: Dotnet pack
126126
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
127-
run: dotnet pack -c Release /p:Version=1.7.2
127+
run: dotnet pack -c Release /p:Version=1.8.0
128128

129129
- name: Add local feed
130130
run: dotnet nuget add source ${{runner.workspace}}/nugets
@@ -167,7 +167,7 @@ jobs:
167167

168168
- name: Dotnet pack
169169
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
170-
run: dotnet pack -c Release /p:Version=1.7.2
170+
run: dotnet pack -c Release /p:Version=1.8.0
171171

172172
- name: Add local feed
173173
run: dotnet nuget add source ${{runner.workspace}}/nugets
@@ -212,7 +212,7 @@ jobs:
212212

213213
- name: Dotnet pack
214214
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
215-
run: dotnet pack -c Release /p:Version=1.7.2
215+
run: dotnet pack -c Release /p:Version=1.8.0
216216

217217
- name: Add local feed
218218
run: dotnet nuget add source -n name ${{runner.workspace}}\nugets
@@ -228,5 +228,5 @@ jobs:
228228
dotnet new console
229229
rm Program.cs
230230
cp ${{runner.workspace}}\HiGHS\examples\call_highs_from_csharp.cs .
231-
dotnet add package Highs.Native -v 1.7.2 -s ${{runner.workspace}}\nugets
231+
dotnet add package Highs.Native -v 1.8.0 -s ${{runner.workspace}}\nugets
232232
dotnet run

.github/workflows/test-nuget-ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: Dotnet pack
3333
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
34-
run: dotnet pack -c Release /p:Version=1.7.2
34+
run: dotnet pack -c Release /p:Version=1.8.0
3535

3636
- name: Add local feed
3737
run: dotnet nuget add source ${{runner.workspace}}/nugets
@@ -74,7 +74,7 @@ jobs:
7474

7575
- name: Dotnet pack
7676
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
77-
run: dotnet pack -c Release /p:Version=1.7.2
77+
run: dotnet pack -c Release /p:Version=1.8.0
7878

7979
- name: Add local feed
8080
run: dotnet nuget add source ${{runner.workspace}}/nugets

.github/workflows/test-nuget-win.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
- name: Dotnet pack
3535
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
36-
run: dotnet pack -c Release /p:Version=1.7.2
36+
run: dotnet pack -c Release /p:Version=1.8.0
3737

3838
- name: Add local feed
3939
run: dotnet nuget add source -n name ${{runner.workspace}}\nugets
@@ -49,5 +49,5 @@ jobs:
4949
dotnet new console
5050
rm Program.cs
5151
cp ${{runner.workspace}}\HiGHS\examples\call_highs_from_csharp.cs .
52-
dotnet add package Highs.Native -v 1.7.2 -s ${{runner.workspace}}\nugets
52+
dotnet add package Highs.Native -v 1.8.0 -s ${{runner.workspace}}\nugets
5353
dotnet run

CMakeLists.txt

Lines changed: 73 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,23 @@ if(EXISTS "${LOC_PATH}")
3838
endif()
3939
option(FAST_BUILD "Fast build: " ON)
4040

41+
find_program(GIT git)
42+
43+
if((GIT) AND(EXISTS ${HIGHS_SOURCE_DIR}/.git))
44+
execute_process(
45+
COMMAND ${GIT} status
46+
WORKING_DIRECTORY ${HIGHS_SOURCE_DIR} OUTPUT_QUIET)
47+
48+
execute_process(
49+
COMMAND ${GIT} describe --always
50+
WORKING_DIRECTORY ${HIGHS_SOURCE_DIR}
51+
OUTPUT_VARIABLE GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE)
52+
# string(REGEX REPLACE "^.*-g" "" GITHASH ${GITHASH})
53+
else()
54+
set(GITHASH "n/a")
55+
endif()
56+
57+
message(STATUS "Git hash: " ${GITHASH})
4158
# By default only build the C++ library.
4259
option(BUILD_CXX "Build C++ library" ON)
4360
message(STATUS "Build C++ library: ${BUILD_CXX}")
@@ -71,6 +88,12 @@ if (PYTHON_BUILD_SETUP)
7188
set(ZLIB OFF)
7289
endif()
7390

91+
# Address | Thread | Leak
92+
# Linux atm
93+
# Only Debug is theted atm
94+
# See below for RelWithDeb info, todo test wip
95+
set(DEBUG_MEMORY "Off" CACHE STRING "Sanitizers")
96+
7497
# emscripten
7598
option(EMSCRIPTEN_HTML "Emscripten HTML output" OFF)
7699

@@ -358,12 +381,6 @@ if(NOT FAST_BUILD OR CSHARP)
358381
endif(CMAKE_CSharp_COMPILER)
359382
endif()
360383

361-
# uncomment for memory debugging
362-
# set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined")
363-
# set (CMAKE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_LINKER_FLAGS_RELWITHDEBINFO} -fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined")
364-
# set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined")
365-
# set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined")
366-
367384
# if zlib is found, then we can enable reading zlib-compressed input
368385
if(ZLIB AND NOT TARGET ZLIB::ZLIB)
369386
find_package(ZLIB 1.2.3)
@@ -375,25 +392,63 @@ set(CPACK_PACKAGE_VERSION_MINOR "${HIGHS_VERSION_MINOR}")
375392
set(CPACK_PACKAGE_VERSION_PATCH "${HIGHS_VERSION_PATCH}")
376393
set(CPACK_PACKAGE_VENDOR "University of Edinburgh")
377394

378-
find_program(GIT git)
379-
380-
if((GIT) AND(EXISTS ${HIGHS_SOURCE_DIR}/.git))
381-
execute_process(
382-
COMMAND ${GIT} describe --always --dirty
383-
WORKING_DIRECTORY ${HIGHS_SOURCE_DIR}
384-
OUTPUT_VARIABLE GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE)
385-
string(REGEX REPLACE "^.*-g" "" GITHASH ${GITHASH})
386-
else()
387-
set(GITHASH "n/a")
388-
endif()
389-
message(STATUS "Git hash: " ${GITHASH})
390395

391396
# Deprecate
392397
# string(TIMESTAMP TODAY "%Y-%m-%d")
393398
# message(STATUS "Compilation date: " ${TODAY})
394399

395400
configure_file(${HIGHS_SOURCE_DIR}/src/HConfig.h.in ${HIGHS_BINARY_DIR}/HConfig.h)
396401

402+
if (DEBUG_MEMORY STREQUAL "Address")
403+
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} \
404+
-fsanitize=address,undefined \
405+
-fno-omit-frame-pointer \
406+
-fsanitize-address-use-after-scope")
407+
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} \
408+
-fsanitize=address,undefined \
409+
-fno-omit-frame-pointer \
410+
-fsanitize-address-use-after-scope")
411+
412+
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} \
413+
-fsanitize=address,undefined \
414+
-fno-omit-frame-pointer \
415+
-fno-optimize-sibling-calls ")
416+
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} \
417+
-fsanitize=address,undefined \
418+
-fno-omit-frame-pointer \
419+
-fno-optimize-sibling-calls ")
420+
421+
elseif (DEBUG_MEMORY STREQUAL "Thread")
422+
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} \
423+
-fsanitize=thread,undefined \
424+
-fno-omit-frame-pointer")
425+
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} \
426+
-fsanitize=thread,undefined \
427+
-fno-omit-frame-pointer")
428+
429+
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} \
430+
-fsanitize=thread,undefined \
431+
-fno-omit-frame-pointer ")
432+
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} \
433+
-fsanitize=thread,undefined \
434+
-fno-omit-frame-pointer ")
435+
436+
elseif (DEBUG_MEMORY STREQUAL "Leak")
437+
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} \
438+
-fsanitize=leak,undefined \
439+
-fno-omit-frame-pointer")
440+
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} \
441+
-fsanitize=leak,undefined \
442+
-fno-omit-frame-pointer")
443+
444+
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} \
445+
-fsanitize=leak,undefined \
446+
-fno-omit-frame-pointer ")
447+
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} \
448+
-fsanitize=leak,undefined \
449+
-fno-omit-frame-pointer ")
450+
endif()
451+
397452
if(NOT FAST_BUILD)
398453
# For the moment keep above coverage part in case we are testing at CI.
399454
option(CI "CI extended tests" ON)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Contact [Julian](https://github.com/jajhall) (General issues and solvers), [Ivet
1212

1313
## Improve the documentation
1414

15-
The top level [documentation](https://ergo-code.github.io/HiGHS/) is created using [Docsy](https://www.docsy.dev/), with the files held on the [HiGHS repository](https://github.com/ERGO-Code/HiGHS/tree/docsy). If your change is small (like fixing typos, or one or two sentence corrections), the easiest way to do this is to fork the branch and create a pull request. (See *Contribute code to HiGHS* below for more on this.) If your change is larger, or touches multiple files, please raise an issue describing what you want to do.
15+
The top level [documentation](https://ergo-code.github.io/HiGHS/) is created using [Docsy](https://www.docsy.dev/), with the files held on the [HiGHS repository](https://github.com/ERGO-Code/HiGHS/tree/master/docs). If your change is small (like fixing typos, or one or two sentence corrections), the easiest way to do this is to fork the branch and create a pull request. (See *Contribute code to HiGHS* below for more on this.) If your change is larger, or touches multiple files, please raise an issue describing what you want to do.
1616

1717
## Raise an issue
1818

0 commit comments

Comments
 (0)