Skip to content

Commit 08be39e

Browse files
committed
Merge branch 'latest' of https://github.com/ERGO-Code/HiGHS into neos4LargeBnds
2 parents e8812c2 + 78df449 commit 08be39e

File tree

8 files changed

+70
-14
lines changed

8 files changed

+70
-14
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: test-fortran-macos
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
fast_build_release:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [macos-latest]
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install GFortran
16+
run: brew install gfortran
17+
18+
- name: Create Build Environment
19+
run: cmake -E make_directory ${{runner.workspace}}/build
20+
21+
- name: Configure CMake
22+
shell: bash
23+
working-directory: ${{runner.workspace}}/build
24+
run: cmake $GITHUB_WORKSPACE -DFORTRAN=ON
25+
26+
- name: Build
27+
shell: bash
28+
working-directory: ${{runner.workspace}}/build
29+
run: cmake --build . --parallel
30+
31+
- name: Test
32+
shell: bash
33+
working-directory: ${{runner.workspace}}/build
34+
run: |
35+
ls
36+
./bin/fortrantest

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: test-fortran
1+
name: test-fortran-ubuntu
22

33
on: [push, pull_request]
44

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ if (BUILD_CXX)
209209
"but it is not supported by the compiler. The check failed with this output:\n"
210210
"${check_ipo_support_output}")
211211
endif()
212-
elseif(NOT ipo_supported)
212+
elseif(NOT ipo_supported OR (APPLE AND FORTRAN))
213213
message(STATUS "IPO / LTO: disabled because it is not supported")
214214
elseif(NOT BUILD_SHARED_LIBS)
215215
# For a static library, we can't be sure whether the final linking will

check/TestHighsVersion.cpp

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ TEST_CASE("HighsVersion", "[highs_version]") {
1313
const HighsInt major = highsVersionMajor();
1414
const HighsInt minor = highsVersionMinor();
1515
const HighsInt patch = highsVersionPatch();
16+
const std::string compilation = highsCompilationDate();
17+
const std::string githash = std::string(highsGithash());
1618
std::stringstream ss;
1719
ss << major << "." << minor << "." << patch;
1820
std::string local_version = ss.str();
@@ -21,15 +23,31 @@ TEST_CASE("HighsVersion", "[highs_version]") {
2123
printf("HiGHS major version %d\n", int(major));
2224
printf("HiGHS minor version %d\n", int(minor));
2325
printf("HiGHS patch version %d\n", int(patch));
24-
printf("HiGHS githash: %s\n", highsGithash());
25-
// Compilation date is deprecated.
26-
// printf("HiGHS compilation date: %s\n", highsCompilationDate());
26+
printf("HiGHS githash: %s\n", githash.c_str());
27+
// Compilation date is deprecated, but make sure that the
28+
// deprecated method is still tested.
29+
printf("HiGHS compilation date: %s\n", compilation.c_str());
2730
printf("HiGHS local version: %s\n", local_version.c_str());
2831
}
2932
REQUIRE(major == HIGHS_VERSION_MAJOR);
3033
REQUIRE(minor == HIGHS_VERSION_MINOR);
3134
REQUIRE(patch == HIGHS_VERSION_PATCH);
32-
REQUIRE(local_version == version);
35+
REQUIRE(githash == std::string(HIGHS_GITHASH));
36+
REQUIRE(version == local_version);
37+
// Check that the corresponding methods
38+
Highs highs;
39+
const std::string version0 = highs.version();
40+
REQUIRE(version0 == version);
41+
const HighsInt major0 = highs.versionMajor();
42+
REQUIRE(major0 == major);
43+
const HighsInt minor0 = highs.versionMinor();
44+
REQUIRE(minor0 == minor);
45+
const HighsInt patch0 = highs.versionPatch();
46+
REQUIRE(patch0 == patch);
47+
const std::string githash0 = highs.githash();
48+
REQUIRE(githash0 == githash);
49+
const std::string compilation0 = highs.compilationDate();
50+
REQUIRE(compilation == compilation);
3351
}
3452

3553
TEST_CASE("sizeof-highs-int", "[highs_version]") {

cmake/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| OS | C++ | Fortran | Python | CSharp Example | .NET |
44
|:-------- | :---: | :------: | :----: | :----: | :----: |
55
| Linux | [![Status][linux_cpp_svg]][linux_cpp_link] | [![Status][linux_fortran_svg]][linux_fortran_link] | [![Status][linux_python_svg]][linux_python_link] | *(1)* | [![Status][linux_dotnet_svg]][linux_dotnet_link] |
6-
| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | *(2)* | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] |
6+
| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | [![Status][macos_fortran_svg]][macos_fortran_link] | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] |
77
| Windows | [![Status][windows_cpp_svg]][windows_cpp_link] | *(2)* | [![Status][windows_python_svg]][windows_python_link] | [![Status][windows_csharp_svg]][windows_csharp_link] | [![Status][windows_dotnet_svg]][windows_dotnet_link] |
88

99
[linux_cpp_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-linux-cpp.yml/badge.svg

docs/src/guide/basic.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ and [classes](@ref classes-overview), and are referred to below.
2222

2323
Enums are scalar identifier types that can take only a limited range of values.
2424

25-
#### [Classes](@id guide-basic-classes) The advantage of using the
26-
native `C++` classes in HiGHS is that many fewer parameters are needed
25+
#### [Classes](@id guide-basic-classes)
26+
27+
The advantage of using the native `C++` classes in HiGHS is that many fewer parameters are needed
2728
when passing data to and from HiGHS. The binding of the data members
2829
of these classes to `highspy` structures allows them to be used when
2930
calling HiGHS from Python, although they are not necessary for the

docs/src/interfaces/python/example-py.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ print('Basis validity = ', h.basisValidityToString(info.basis_validity))
210210
* `changeColCost`
211211
* `changeColBounds`
212212
* `changeRowBounds`
213-
* `changeColsCosts`
213+
* `changeColsCost`
214214
* `changeColsBounds`
215215
* `changeRowsBounds`
216216
* `changeCoeff`

src/Highs.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ HighsInt highsVersionMajor();
3737
HighsInt highsVersionMinor();
3838
HighsInt highsVersionPatch();
3939
const char* highsGithash();
40-
const char* highsCompilationDate();
4140

4241
/**
4342
* @brief Class to set parameters and run HiGHS
@@ -1213,9 +1212,6 @@ class Highs {
12131212

12141213
// Start of deprecated methods
12151214

1216-
/**
1217-
* @brief Return compilation date
1218-
*/
12191215
std::string compilationDate() const { return "deprecated"; }
12201216

12211217
HighsStatus setLogCallback(void (*user_log_callback)(HighsLogType,
@@ -1525,4 +1521,9 @@ class Highs {
15251521
const double ill_conditioning_bound);
15261522
bool infeasibleBoundsOk();
15271523
};
1524+
1525+
// Start of deprecated methods not in the Highs class
1526+
1527+
const char* highsCompilationDate();
1528+
15281529
#endif

0 commit comments

Comments
 (0)