Skip to content

Commit aaa9fb2

Browse files
committed
merge
2 parents c9188b7 + 0825c4e commit aaa9fb2

File tree

4 files changed

+202
-36
lines changed

4 files changed

+202
-36
lines changed

.github/workflows/hipo-fetch.yml

Lines changed: 162 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,43 @@ on: [push, pull_request]
44

55
jobs:
66
ubuntu:
7+
runs-on: [ubuntu-latest, ubuntu-24.04-arm]
8+
9+
strategy:
10+
matrix:
11+
config: [Release]
12+
all_tests: [ON]
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Create Build Environment
18+
run: cmake -E make_directory ${{runner.workspace}}/build
19+
20+
- name: Configure CMake
21+
working-directory: ${{runner.workspace}}/build
22+
run: |
23+
cmake $GITHUB_WORKSPACE -DHIPO=ON -DBUILD_OPENBLAS=ON \
24+
-DALL_TESTS=${{ matrix.all_tests }}
25+
26+
- name: Build
27+
working-directory: ${{runner.workspace}}/build
28+
run: |
29+
cmake --build . --parallel
30+
31+
- name: Test executable
32+
working-directory: ${{runner.workspace}}/build
33+
run: ./bin/highs --solver=hipo $GITHUB_WORKSPACE/check/instances/afiro.mps
34+
35+
- name: Ctest
36+
working-directory: ${{runner.workspace}}/build
37+
run: |
38+
ctest --parallel --timeout 300 --output-on-failure
39+
40+
ubuntu_32:
741
runs-on: ubuntu-latest
842
strategy:
943
matrix:
10-
# config: [Release, Debug]
1144
config: [Release]
1245
all_tests: [ON]
1346

@@ -17,11 +50,60 @@ jobs:
1750
- name: Create Build Environment
1851
run: cmake -E make_directory ${{runner.workspace}}/build
1952

53+
- name: Install 32-bit deps
54+
run: |
55+
sudo apt-get update
56+
sudo apt-get install -y gcc-multilib g++-multilib
57+
sudo apt-get install -y libc6-dev-i386 libstdc++-devel.i686
58+
59+
- name: Configure CMake
60+
working-directory: ${{runner.workspace}}/build
61+
run: |
62+
cmake $GITHUB_WORKSPACE -DHIPO=ON -DBUILD_OPENBLAS=ON \
63+
-DALL_TESTS=${{ matrix.all_tests }} \
64+
-DCMAKE_C_FLAGS="-m32" \
65+
-DCMAKE_CXX_FLAGS="-m32" \
66+
-DCMAKE_SHARED_LINKER_FLAGS="-m32"
67+
68+
- name: Build
69+
working-directory: ${{runner.workspace}}/build
70+
run: |
71+
cmake --build . --parallel
72+
73+
- name: Test executable
74+
working-directory: ${{runner.workspace}}/build
75+
run: ./bin/highs --solver=hipo $GITHUB_WORKSPACE/check/instances/afiro.mps
76+
77+
- name: Ctest
78+
working-directory: ${{runner.workspace}}/build
79+
run: |
80+
ctest --parallel --timeout 300 --output-on-failure ubuntu_32:
81+
82+
ubuntu_32_arm:
83+
runs-on: ubuntu-24.04-arm
84+
strategy:
85+
matrix:
86+
config: [Release]
87+
all_tests: [ON]
88+
89+
steps:
90+
- uses: actions/checkout@v4
91+
92+
- name: Create Build Environment
93+
run: cmake -E make_directory ${{runner.workspace}}/build
94+
95+
- name: Install 32-bit deps
96+
run: |
97+
sudo apt-get update
98+
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
99+
20100
- name: Configure CMake
21101
working-directory: ${{runner.workspace}}/build
22102
run: |
103+
export CC=arm-linux-gnueabihf-gcc
104+
export CXX=arm-linux-gnueabihf-g++
23105
cmake $GITHUB_WORKSPACE -DHIPO=ON -DBUILD_OPENBLAS=ON \
24-
-DALL_TESTS=${{ matrix.all_tests }}
106+
-DALL_TESTS=${{ matrix.all_tests }}
25107
26108
- name: Build
27109
working-directory: ${{runner.workspace}}/build
@@ -38,11 +120,56 @@ jobs:
38120
ctest --parallel --timeout 300 --output-on-failure
39121
40122
windows:
41-
runs-on: windows-latest
123+
runs-on: [windows-latest]
124+
fail-fast: false
125+
strategy:
126+
matrix:
127+
config: [Release]
128+
all_tests: [ON]
129+
arch: ["x64", "Win32"]
130+
131+
steps:
132+
- uses: actions/checkout@v4
133+
134+
- name: Configure CMake
135+
shell: pwsh
136+
run: |
137+
cmake `
138+
-S "$env:GITHUB_WORKSPACE" `
139+
-B "${{ runner.workspace }}/build" `
140+
-A ${{ matrix.arch }} `
141+
-DHIPO=ON `
142+
-DALL_TESTS=${{ matrix.all_tests }} `
143+
-DBUILD_OPENBLAS=ON
144+
145+
- name: Build
146+
shell: pwsh
147+
working-directory: ${{runner.workspace}}/build
148+
run: |
149+
cmake --build . --parallel --config ${{ matrix.config }}
150+
151+
- name: Test executable
152+
shell: pwsh
153+
working-directory: ${{runner.workspace}}/build
154+
run: |
155+
& ".\${{ matrix.config }}\bin\highs.exe" --solver=hipo `
156+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"
157+
158+
- name: Ctest
159+
shell: pwsh
160+
working-directory: ${{runner.workspace}}/build
161+
run: |
162+
ctest --parallel --timeout 300 --output-on-failure -C ${{ matrix.config }}
163+
164+
windows_arm_64:
165+
runs-on: [windows-11-arm]
42166
strategy:
43167
matrix:
44168
config: [Release]
45169
all_tests: [ON]
170+
# ARM32 Windows development is basically deprecated:
171+
# https://learn.microsoft.com/en-us/windows/arm/arm32-to-arm64
172+
arch: ["x64"]
46173

47174
steps:
48175
- uses: actions/checkout@v4
@@ -53,6 +180,7 @@ jobs:
53180
cmake `
54181
-S "$env:GITHUB_WORKSPACE" `
55182
-B "${{ runner.workspace }}/build" `
183+
-A ${{ matrix.arch }} `
56184
-DHIPO=ON `
57185
-DALL_TESTS=${{ matrix.all_tests }} `
58186
-DBUILD_OPENBLAS=ON
@@ -75,3 +203,34 @@ jobs:
75203
working-directory: ${{runner.workspace}}/build
76204
run: |
77205
ctest --parallel --timeout 300 --output-on-failure -C ${{ matrix.config }}
206+
207+
# linux shared is default, static build tested in the release artifacts
208+
# windows static is default so test shared
209+
windows_shared:
210+
runs-on: [windows-latest]
211+
212+
steps:
213+
- uses: actions/checkout@v4
214+
215+
- name: Configure CMake
216+
shell: pwsh
217+
run: |
218+
cmake `
219+
-S "$env:GITHUB_WORKSPACE" `
220+
-B "${{ runner.workspace }}/build" `
221+
-DHIPO=ON `
222+
-DBUILD_OPENBLAS=ON `
223+
-DBUILD_SHARED_LIBS=ON
224+
225+
- name: Build
226+
shell: pwsh
227+
working-directory: ${{runner.workspace}}/build
228+
run: |
229+
cmake --build . --parallel --config Release
230+
231+
- name: Test executable
232+
shell: pwsh
233+
working-directory: ${{runner.workspace}}/build
234+
run: |
235+
& ".\${{ matrix.config }}\bin\highs.exe" --solver=hipo `
236+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"

.github/workflows/release-cpack.yml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ jobs:
6262
cd build
6363
cpack -C Release
6464
65-
# -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL
66-
# Win32
67-
6865
- name: Upload artifacts
6966
uses: actions/upload-artifact@v4
7067
with:
@@ -82,34 +79,7 @@ jobs:
8279
- name: Build
8380
run: |
8481
cmake -B build -G "Visual Studio 17 2022" -A ${{ matrix.arch }} `
85-
-DHIPO=ON -DBUILD_OPENBLAS=ON -DBUILD_STATIC_EXE=ON `
86-
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL
87-
cmake --build build --config Release --parallel
88-
cd build
89-
cpack -C Release
90-
91-
# -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL
92-
# Win32
93-
94-
- name: Upload artifacts
95-
uses: actions/upload-artifact@v4
96-
with:
97-
name: windows-${{ matrix.arch }}
98-
path: build/*.zip
99-
100-
build-windows-arm-32:
101-
runs-on: windows-11-arm
102-
strategy:
103-
matrix:
104-
arch: [ARM]
105-
steps:
106-
- uses: actions/checkout@v3
107-
- name: Build
108-
run: |
109-
cmake -B build -G "Visual Studio 17 2022" -A ${{ matrix.arch }} `
110-
-DHIPO=ON -DBUILD_OPENBLAS=ON -DBUILD_STATIC_EXE=ON `
111-
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL `
112-
-DCMAKE_VS_WINDOWS_SDK_VERSION=10.0.20348.0
82+
-DHIPO=ON -DBUILD_OPENBLAS=ON -DBUILD_STATIC_EXE=ON
11383
cmake --build build --config Release --parallel
11484
cd build
11585
cpack -C Release

HiGHS.sln

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.5.2.0
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuget", "nuget", "{2A18E756-48A1-E247-9A68-57B5E8CBE245}"
6+
EndProject
7+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Highs", "nuget\Highs.csproj", "{906CCF22-9F98-849C-F4C4-760DF67E239A}"
8+
EndProject
9+
Global
10+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
11+
Debug|Any CPU = Debug|Any CPU
12+
Release|Any CPU = Release|Any CPU
13+
EndGlobalSection
14+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15+
{906CCF22-9F98-849C-F4C4-760DF67E239A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{906CCF22-9F98-849C-F4C4-760DF67E239A}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{906CCF22-9F98-849C-F4C4-760DF67E239A}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{906CCF22-9F98-849C-F4C4-760DF67E239A}.Release|Any CPU.Build.0 = Release|Any CPU
19+
EndGlobalSection
20+
GlobalSection(SolutionProperties) = preSolution
21+
HideSolutionNode = FALSE
22+
EndGlobalSection
23+
GlobalSection(NestedProjects) = preSolution
24+
{906CCF22-9F98-849C-F4C4-760DF67E239A} = {2A18E756-48A1-E247-9A68-57B5E8CBE245}
25+
EndGlobalSection
26+
GlobalSection(ExtensibilityGlobals) = postSolution
27+
SolutionGuid = {D1B3989B-6BC8-4A91-B2F9-DFBFBF6D49A1}
28+
EndGlobalSection
29+
EndGlobal

cmake/FindHipoDeps.cmake

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ if (BUILD_OPENBLAS)
1919
)
2020

2121
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|armv8|arm")
22-
message(STATUS "ARM architecture detected. Applying -DTARGET=ARMV8.")
23-
list(APPEND OPENBLAS_MINIMAL_FLAGS -DTARGET=ARMV8)
22+
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
23+
message(STATUS "ARM architecture detected. Applying -DTARGET=ARMV7.")
24+
list(APPEND OPENBLAS_MINIMAL_FLAGS -DTARGET=ARMV7)
25+
else()
26+
message(STATUS "ARM architecture detected. Applying -DTARGET=ARMV8.")
27+
list(APPEND OPENBLAS_MINIMAL_FLAGS -DTARGET=ARMV8)
28+
endif()
2429
endif()
2530

2631
# CMAKE_SIZEOF_VOID_P is 4 for 32-bit builds, 8 for 64-bit builds.
@@ -36,7 +41,10 @@ if (BUILD_OPENBLAS)
3641
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
3742
endif()
3843

44+
<<<<<<< HEAD
3945

46+
=======
47+
>>>>>>> hipo-cpack
4048
# list(APPEND OPENBLAS_MINIMAL_FLAGS -DUSE_THREAD=OFF)
4149
list(APPEND OPENBLAS_MINIMAL_FLAGS -DINTERFACE64=0)
4250

0 commit comments

Comments
 (0)