Skip to content

Commit 04024d7

Browse files
authored
Merge pull request #3127 from ERGO-Code/latest
Latest in master for release 1.15.1
2 parents 8396001 + 2709311 commit 04024d7

31 files changed

Lines changed: 334 additions & 69 deletions

.github/julia/build_tarballs.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,35 @@ cd $WORKSPACE/srcdir/HiGHS
2020
# Remove system CMake to use the jll version
2121
apk del cmake
2222
23-
mkdir -p build
24-
cd build
23+
rm -rf build
24+
mkdir build
2525
2626
# Do fully static build only on Windows
2727
if [[ "${BUILD_SHARED}" == "OFF" ]] && [[ "${target}" == *-mingw* ]]; then
2828
export CXXFLAGS="-static"
2929
fi
3030
31-
cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
31+
cmake -S . -B build \
32+
-DCMAKE_INSTALL_PREFIX=${prefix} \
3233
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
3334
-DCMAKE_BUILD_TYPE=Release \
3435
-DBUILD_SHARED_LIBS=${BUILD_SHARED} \
3536
-DZLIB_USE_STATIC_LIBS=${BUILD_STATIC} \
3637
-DHIPO=ON -DBUILD_SHARED_EXTRAS_LIB=OFF \
37-
-DBLAS_LIBRARIES="${libdir}/libopenblas.${dlext}" \
38-
..
38+
-DBLAS_LIBRARIES="${libdir}/libopenblas.${dlext}"
3939
4040
if [[ "${target}" == *-linux-* ]]; then
41-
make -j ${nproc}
41+
make -C build -j ${nproc}
4242
else
4343
if [[ "${target}" == *-mingw* ]]; then
44-
cmake --build . --config Release
44+
cmake --build build --config Release
4545
else
46-
cmake --build . --config Release --parallel
46+
cmake --build build --config Release --parallel
4747
fi
4848
fi
49-
make install
49+
cmake --install build
5050
51-
install_license ../LICENSE.txt
51+
install_license LICENSE.txt
5252
"""
5353

5454
products = [

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'Package version (e.g. 1.15.0-preview.1)'
7+
description: 'Package version (e.g. 1.15.1-preview.1)'
88
required: true
9-
default: '1.15.0-preview.1'
9+
default: '1.15.1-preview.1'
1010
push_package:
1111
description: 'Push package to NuGet.org'
1212
type: boolean
@@ -205,7 +205,7 @@ jobs:
205205

206206
- name: Dotnet pack
207207
working-directory: ${{github.workspace}}/build/dotnet/Highs.Native
208-
run: dotnet pack -c Release /p:Version=${{ inputs.version || '1.15.0' }}
208+
run: dotnet pack -c Release /p:Version=${{ inputs.version || '1.15.1' }}
209209

210210
- uses: actions/upload-artifact@v7
211211
with:

.github/workflows/conan-cpp20.yml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: conan-cpp20
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
cmake-cpp20-libcxx:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
15+
- name: Install libc++
16+
run: sudo apt-get install -y libc++-dev libc++abi-dev
17+
18+
- name: Patch CMakeLists.txt
19+
run: |
20+
sed -i 's/set(CMAKE_CXX_STANDARD /## set(CMAKE_CXX_STANDARD /' CMakeLists.txt
21+
22+
- name: Create Build Environment
23+
run: cmake -E make_directory ${{github.workspace}}/build
24+
25+
- name: Configure CMake
26+
working-directory: ${{github.workspace}}/build
27+
run: |
28+
cmake $GITHUB_WORKSPACE \
29+
-DCMAKE_BUILD_TYPE=Release \
30+
-DCMAKE_CXX_STANDARD=20 \
31+
-DCMAKE_C_COMPILER=clang \
32+
-DCMAKE_CXX_COMPILER=clang++ \
33+
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
34+
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++"
35+
36+
- name: Build
37+
working-directory: ${{github.workspace}}/build
38+
run: cmake --build . --parallel
39+
40+
conan-cpp20-libcxx:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v6
44+
45+
- name: Install dependencies
46+
run: |
47+
sudo apt-get install -y libc++-dev libc++abi-dev python3-pip
48+
pip3 install conan
49+
50+
- name: Create conan profile
51+
run: |
52+
mkdir -p ~/.conan2/profiles
53+
cat > ~/.conan2/profiles/default << 'EOF'
54+
[settings]
55+
arch=x86_64
56+
build_type=Release
57+
compiler=clang
58+
compiler.version=18
59+
compiler.libcxx=libc++
60+
compiler.cppstd=20
61+
os=Linux
62+
[conf]
63+
tools.build:compiler_executables={'c': 'clang', 'cpp': 'clang++'}
64+
EOF
65+
66+
- name: Create conan recipe
67+
env:
68+
HIGHS_SOURCE: ${{ github.workspace }}
69+
run: |
70+
mkdir -p /tmp/conan-highs
71+
cat > /tmp/conan-highs/conanfile.py << 'CONANEOF'
72+
import os
73+
from conan import ConanFile
74+
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
75+
from conan.tools.files import copy, replace_in_file
76+
77+
class HiGHSConan(ConanFile):
78+
name = "highs"
79+
settings = "os", "arch", "compiler", "build_type"
80+
options = {"shared": [True, False], "fPIC": [True, False]}
81+
default_options = {"shared": False, "fPIC": True}
82+
83+
def config_options(self):
84+
if self.settings.os == "Windows":
85+
del self.options.fPIC
86+
87+
def configure(self):
88+
if self.options.shared:
89+
self.options.rm_safe("fPIC")
90+
91+
def layout(self):
92+
cmake_layout(self, src_folder="src")
93+
94+
def source(self):
95+
copy(self, "*", src=os.environ["HIGHS_SOURCE"], dst=self.source_folder,
96+
excludes=[".git/*"])
97+
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"),
98+
"set(CMAKE_CXX_STANDARD ", "## set(CMAKE_CXX_STANDARD ")
99+
100+
def generate(self):
101+
tc = CMakeToolchain(self)
102+
tc.variables["FAST_BUILD"] = True
103+
tc.variables["BUILD_TESTING"] = False
104+
tc.variables["PYTHON"] = False
105+
tc.variables["FORTRAN"] = False
106+
tc.variables["CSHARP"] = False
107+
tc.variables["EXP"] = False
108+
tc.variables["BUILD_EXAMPLES"] = False
109+
tc.variables["JULIA"] = False
110+
tc.generate()
111+
CMakeDeps(self).generate()
112+
113+
def build(self):
114+
cmake = CMake(self)
115+
cmake.configure()
116+
cmake.build()
117+
118+
def package(self):
119+
copy(self, "LICENSE*", src=self.source_folder,
120+
dst=os.path.join(self.package_folder, "licenses"))
121+
cmake = CMake(self)
122+
cmake.install()
123+
124+
def package_info(self):
125+
self.cpp_info.libs = ["highs"]
126+
CONANEOF
127+
128+
- name: Build conan package
129+
env:
130+
HIGHS_SOURCE: ${{ github.workspace }}
131+
run: |
132+
conan create /tmp/conan-highs --version 1.15.1 --build=missing

.github/workflows/hipo-fetch.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ jobs:
332332
shell: pwsh
333333
working-directory: ${{github.workspace}}/build
334334
run: |
335-
ctest --parallel --timeout 300 --output-on-failure -C ${{ matrix.config }}
335+
ctest --parallel --timeout 300 --output-on-failure -C ${{ matrix.config }} `
336+
-E "openblas_utest|openblas_utest_ext|xscblat|xdcblat|xccblat|xzcblat"
336337
337338
windows_arm_64:
338339
runs-on: [windows-11-arm]
@@ -375,7 +376,8 @@ jobs:
375376
shell: pwsh
376377
working-directory: ${{github.workspace}}/build
377378
run: |
378-
ctest --parallel --timeout 300 --output-on-failure -C ${{ matrix.config }}
379+
ctest --parallel --timeout 300 --output-on-failure -C ${{ matrix.config }} `
380+
-E "openblas_utest|openblas_utest_ext|xscblat|xdcblat|xccblat|xzcblat"
379381
380382
# linux shared is default, static build tested in the release artifacts
381383
# windows static is default so test shared

.github/workflows/release-cpack.yml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: release-cpack
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
5+
# tags:
6+
# - 'v*'
77
pull_request:
88

99
concurrency:
@@ -25,6 +25,9 @@ jobs:
2525
cmake --build build -j2
2626
cd build && cpack
2727
28+
- name: Test
29+
run: ./build/bin/highs --solver=hipo $GITHUB_WORKSPACE/check/instances/afiro.mps
30+
2831
- name: Upload artifacts
2932
uses: actions/upload-artifact@v7
3033
with:
@@ -54,6 +57,9 @@ jobs:
5457
cmake --build build -j2
5558
cd build && cpack
5659
60+
- name: Test
61+
run: ./build/bin/highs --solver=hipo $GITHUB_WORKSPACE/check/instances/afiro.mps
62+
5763
- name: Upload artifacts
5864
uses: actions/upload-artifact@v7
5965
with:
@@ -83,6 +89,11 @@ jobs:
8389
cd build
8490
cpack -C Release
8591
92+
- name: Test
93+
run: |
94+
& ".\build\Release\bin\highs.exe" --solver=hipo `
95+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"
96+
8697
- name: Upload artifacts
8798
uses: actions/upload-artifact@v7
8899
with:
@@ -113,6 +124,11 @@ jobs:
113124
cd build
114125
cpack -C Release
115126
127+
- name: Test
128+
run: |
129+
& ".\build\Release\bin\highs.exe" --solver=hipo `
130+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"
131+
116132
- name: Upload artifacts
117133
uses: actions/upload-artifact@v7
118134
with:
@@ -134,6 +150,11 @@ jobs:
134150
cd build
135151
cpack -C Release
136152
153+
- name: Test
154+
run: |
155+
& ".\build\Release\bin\highs.exe" --solver=hipo `
156+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"
157+
137158
- name: Upload artifacts
138159
uses: actions/upload-artifact@v7
139160
with:
@@ -159,6 +180,9 @@ jobs:
159180
cmake --build build --parallel
160181
cd build && cpack
161182
183+
- name: Test
184+
run: ./build/bin/highs --solver=hipo $GITHUB_WORKSPACE/check/instances/afiro.mps
185+
162186
- name: Upload artifacts
163187
uses: actions/upload-artifact@v7
164188
with:
@@ -186,6 +210,9 @@ jobs:
186210
cmake --build build -j2
187211
cd build && cpack
188212
213+
- name: Test
214+
run: ./build/bin/highs $GITHUB_WORKSPACE/check/instances/afiro.mps
215+
189216
- name: Upload artifacts
190217
uses: actions/upload-artifact@v7
191218
with:
@@ -214,6 +241,9 @@ jobs:
214241
cmake --build build -j2
215242
cd build && cpack
216243
244+
- name: Test
245+
run: ./build/bin/highs $GITHUB_WORKSPACE/check/instances/afiro.mps
246+
217247
- name: Upload artifacts
218248
uses: actions/upload-artifact@v7
219249
with:
@@ -243,6 +273,11 @@ jobs:
243273
cd build
244274
cpack -C Release
245275
276+
- name: Test
277+
run: |
278+
& ".\build\Release\bin\highs.exe" `
279+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"
280+
246281
- name: Upload artifacts
247282
uses: actions/upload-artifact@v7
248283
with:
@@ -272,6 +307,11 @@ jobs:
272307
cd build
273308
cpack -C Release
274309
310+
- name: Test
311+
run: |
312+
& ".\build\Release\bin\highs.exe" `
313+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"
314+
275315
- name: Upload artifacts
276316
uses: actions/upload-artifact@v7
277317
with:
@@ -302,6 +342,11 @@ jobs:
302342
cd build
303343
cpack -C Release
304344
345+
- name: Test
346+
run: |
347+
& ".\build\Release\bin\highs.exe" `
348+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"
349+
305350
- name: Upload artifacts
306351
uses: actions/upload-artifact@v7
307352
with:
@@ -323,6 +368,11 @@ jobs:
323368
cd build
324369
cpack -C Release
325370
371+
- name: Test
372+
run: |
373+
& ".\build\Release\bin\highs.exe" `
374+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"
375+
326376
- name: Upload artifacts
327377
uses: actions/upload-artifact@v7
328378
with:
@@ -348,6 +398,9 @@ jobs:
348398
cmake --build build --parallel
349399
cd build && cpack
350400
401+
- name: Test
402+
run: ./build/bin/highs $GITHUB_WORKSPACE/check/instances/afiro.mps
403+
351404
- name: Upload artifacts
352405
uses: actions/upload-artifact@v7
353406
with:

0 commit comments

Comments
 (0)