Skip to content

Commit d1ae8dd

Browse files
committed
cmake build type for metis too in tests
1 parent 0b34e0a commit d1ae8dd

File tree

4 files changed

+244
-27
lines changed

4 files changed

+244
-27
lines changed

.github/workflows/hipo-macos.yml

Lines changed: 80 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: hipo-macos
33
on: [push, pull_request]
44

55
jobs:
6-
macos:
6+
macos_gh:
77
runs-on: macos-latest
88
strategy:
99
fail-fast: false
1010
matrix:
1111
config: [Release, Debug]
12-
all_tests: [ON, OFF]
12+
all_tests: [OFF]
1313

1414
steps:
1515
- uses: actions/checkout@v4
@@ -35,18 +35,21 @@ jobs:
3535
ls
3636
3737
- name: Install GKLIB
38-
run: |
38+
run:
3939
cd GKlib
40-
make config prefix=${{runner.workspace}}/installs
41-
make
42-
make install
40+
cmake -S. -B build \
41+
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/installs \
42+
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
43+
cmake --build build --parallel
44+
cmake --install build
4345

4446
- name: Install METIS
4547
run: |
46-
cd METIS
47-
make config prefix=${{runner.workspace}}/installs
48-
make
49-
make install
48+
cmake -S. -B build \
49+
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/installs \
50+
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
51+
cmake --build build --parallel
52+
cmake --install build
5053
5154
- name: Check METIS and GKlib
5255
working-directory: ${{runner.workspace}}
@@ -80,3 +83,70 @@ jobs:
8083
working-directory: ${{runner.workspace}}/build
8184
run: |
8285
ctest --parallel --timeout 300 --output-on-failure
86+
87+
macos_510:
88+
runs-on: macos-latest
89+
strategy:
90+
fail-fast: false
91+
matrix:
92+
config: [Release, Debug]
93+
all_tests: [ON, OFF]
94+
95+
steps:
96+
- uses: actions/checkout@v4
97+
98+
- name: Checkout METIS
99+
uses: actions/checkout@v4
100+
with:
101+
repository: galabovaa/METIS
102+
ref: 510-w
103+
path: METIS
104+
105+
- name: Create installs dir
106+
working-directory: ${{runner.workspace}}
107+
run: |
108+
mkdir installs
109+
ls
110+
111+
- name: Install METIS
112+
run: |
113+
cmake -S. -B build \
114+
-DGKLIB_PATH=${{ github.workspace }}/METIS/GKlib \
115+
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/installs \
116+
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
117+
cmake --build build --parallel
118+
cmake --install build
119+
120+
- name: Check METIS and GKlib
121+
working-directory: ${{runner.workspace}}
122+
run: |
123+
cd installs
124+
ls
125+
ls lib
126+
127+
- name: Create Build Environment
128+
run: cmake -E make_directory ${{runner.workspace}}/build
129+
130+
- name: Configure CMake
131+
working-directory: ${{runner.workspace}}/build
132+
run: |
133+
cmake $GITHUB_WORKSPACE -DHIPO=ON \
134+
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
135+
-DALL_TESTS=${{ matrix.all_tests }} \
136+
-DMETIS_ROOT=${{runner.workspace}}/installs \
137+
138+
# -DGKLIB_ROOT=${{runner.workspace}}/installs
139+
140+
- name: Build
141+
working-directory: ${{runner.workspace}}/build
142+
run: |
143+
cmake --build . --parallel
144+
145+
- name: Test executable
146+
working-directory: ${{runner.workspace}}/build
147+
run: ./bin/highs --solver=hipo $GITHUB_WORKSPACE/check/instances/afiro.mps
148+
149+
- name: Ctest
150+
working-directory: ${{runner.workspace}}/build
151+
run: |
152+
ctest --parallel --timeout 300 --output-on-failure

.github/workflows/hipo-ubuntu.yml

Lines changed: 88 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: hipo-ubuntu
33
on: [push, pull_request]
44

55
jobs:
6-
ubuntu:
6+
ubuntu_gh:
77
runs-on: ubuntu-latest
88
strategy:
99
fail-fast: false
1010
matrix:
1111
config: [Release, Debug]
12-
all_tests: [ON, OFF]
12+
all_tests: [OFF]
1313

1414
steps:
1515
- uses: actions/checkout@v4
@@ -34,12 +34,14 @@ jobs:
3434
mkdir installs
3535
ls
3636
37-
- name: Install GKlib
38-
run: |
37+
- name: Install GKLIB
38+
run:
3939
cd GKlib
40-
make config shared=1 prefix=${{runner.workspace}}/installs
41-
make
42-
make install
40+
cmake -S. -B build \
41+
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/installs \
42+
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
43+
cmake --build build --parallel
44+
cmake --install build
4345

4446
# - name: Check installs
4547
# working-directory: ${{runner.workspace}}
@@ -58,10 +60,11 @@ jobs:
5860
5961
- name: Install METIS
6062
run: |
61-
cd METIS
62-
make config shared=1 prefix=${{runner.workspace}}/installs
63-
make
64-
make install
63+
cmake -S. -B build \
64+
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/installs \
65+
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
66+
cmake --build build --parallel
67+
cmake --install build
6568
6669
# no default blas available on runner
6770

@@ -104,3 +107,77 @@ jobs:
104107
working-directory: ${{runner.workspace}}/build
105108
run: |
106109
ctest --parallel --timeout 300 --output-on-failure
110+
111+
ubuntu_510:
112+
runs-on: ubuntu-latest
113+
strategy:
114+
fail-fast: false
115+
matrix:
116+
config: [Release, Debug]
117+
all_tests: [ON, OFF]
118+
119+
steps:
120+
- uses: actions/checkout@v4
121+
122+
- name: Checkout METIS
123+
uses: actions/checkout@v4
124+
with:
125+
repository: galabovaa/METIS
126+
ref: 510-w
127+
path: METIS
128+
129+
- name: Create installs dir
130+
working-directory: ${{runner.workspace}}
131+
run: |
132+
mkdir installs
133+
ls
134+
135+
- name: Install METIS
136+
run: |
137+
cmake -S. -B build \
138+
-DGKLIB_PATH=${{ github.workspace }}/METIS/GKlib \
139+
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/installs \
140+
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
141+
cmake --build build --parallel
142+
cmake --install build
143+
144+
# no default blas available on runner
145+
146+
- name: Cache APT packages
147+
uses: actions/cache@v4
148+
with:
149+
path: |
150+
/var/cache/apt/archives
151+
/var/lib/apt/lists
152+
key: ${{ runner.os }}-apt-libopenblas
153+
154+
- name: Install OpenBLAS
155+
shell: bash
156+
run: |
157+
sudo apt update
158+
sudo apt install libopenblas-dev
159+
160+
- name: Create Build Environment
161+
run: cmake -E make_directory ${{runner.workspace}}/build
162+
163+
- name: Configure CMake
164+
working-directory: ${{runner.workspace}}/build
165+
run: |
166+
cmake $GITHUB_WORKSPACE -DHIPO=ON \
167+
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
168+
-DALL_TESTS=${{ matrix.all_tests }} \
169+
-DMETIS_ROOT=${{runner.workspace}}/installs
170+
171+
- name: Build
172+
working-directory: ${{runner.workspace}}/build
173+
run: |
174+
cmake --build . --parallel
175+
176+
- name: Test executable
177+
working-directory: ${{runner.workspace}}/build
178+
run: ./bin/highs --solver=hipo $GITHUB_WORKSPACE/check/instances/afiro.mps
179+
180+
- name: Ctest
181+
working-directory: ${{runner.workspace}}/build
182+
run: |
183+
ctest --parallel --timeout 300 --output-on-failure

.github/workflows/hipo-win.yml

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: hipo-win
33
on: [push, pull_request]
44

55
jobs:
6-
windows:
6+
win-vcpkg:
77
runs-on: windows-latest
88
strategy:
99
fail-fast: false
1010
matrix:
1111
config: [Release, Debug]
12-
all_tests: [ON, OFF]
12+
all_tests: [OFF]
1313

1414
steps:
1515
- uses: actions/checkout@v4
@@ -64,3 +64,73 @@ jobs:
6464
working-directory: ${{runner.workspace}}/build
6565
run: |
6666
ctest --parallel --timeout 300 --output-on-failure -C ${{ matrix.config }}
67+
68+
win-510:
69+
runs-on: windows-latest
70+
strategy:
71+
fail-fast: false
72+
matrix:
73+
config: [Release, Debug]
74+
all_tests: [ON, OFF]
75+
76+
steps:
77+
- uses: actions/checkout@v4
78+
79+
- name: Checkout METIS
80+
uses: actions/checkout@v4
81+
with:
82+
repository: galabovaa/METIS
83+
ref: 510-w
84+
path: METIS
85+
86+
- name: Create installs dir
87+
working-directory: ${{runner.workspace}}
88+
run: |
89+
ls
90+
mkdir installs
91+
ls
92+
93+
- name: Install METIS
94+
shell: pwsh
95+
run: |
96+
cd METIS
97+
pwd
98+
cmake -S. -B build `
99+
-DGKLIB_PATH="env:$GITHUB_WORKSPACE/METIS/GKlib"
100+
-DCMAKE_INSTALL_PREFIX="${{ runner.workspace }}/installs" `
101+
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
102+
cmake --build build --parallel --config ${{ matrix.config }}
103+
cmake --install build --config ${{ matrix.config }}
104+
105+
- name: Install OpenBLAS
106+
shell: pwsh
107+
run: vcpkg install openblas[threads]
108+
109+
- name: Configure CMake
110+
shell: pwsh
111+
run: |
112+
cmake `
113+
-S "$env:GITHUB_WORKSPACE" `
114+
-B "${{ runner.workspace }}/build" `
115+
-DHIPO=ON `
116+
-DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" `
117+
-DALL_TESTS=${{ matrix.all_tests }}
118+
119+
- name: Build
120+
shell: pwsh
121+
working-directory: ${{runner.workspace}}/build
122+
run: |
123+
cmake --build . --parallel --config ${{ matrix.config }}
124+
125+
- name: Test executable
126+
shell: pwsh
127+
working-directory: ${{runner.workspace}}/build
128+
run: |
129+
& ".\${{ matrix.config }}\bin\highs.exe" --solver=hipo `
130+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"
131+
132+
- name: Ctest
133+
shell: pwsh
134+
working-directory: ${{runner.workspace}}/build
135+
run: |
136+
ctest --parallel --timeout 300 --output-on-failure -C ${{ matrix.config }}

cmake/FindHipoDeps.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ if (WIN32)
1111

1212
if(OpenBLAS_FOUND)
1313
message(STATUS "OpenBLAS CMake config path: ${OpenBLAS_DIR}")
14-
else()
14+
else()
1515
message(STATUS "OpenBLAS not found in ${BLAS_ROOT}")
1616
endif()
1717

1818
endif()
1919
if ((BLAS_ROOT STREQUAL "") OR (NOT OpenBLAS_FOUND))
2020
message(STATUS "Looking for blas")
2121

22-
find_package(OpenBLAS CONFIG REQUIRED)
22+
find_package(OpenBLAS REQUIRED)
2323

2424
if(OpenBLAS_FOUND)
2525
if(TARGET OpenBLAS::OpenBLAS)
@@ -90,9 +90,9 @@ message(STATUS "METIS_ROOT is " ${METIS_ROOT})
9090
# If a METIS install was specified try to use it first.
9191
if (NOT (METIS_ROOT STREQUAL ""))
9292
message(STATUS "Looking for METIS CMake targets file in " ${METIS_ROOT})
93-
find_package(metis CONFIG NO_DEFAULT_PATH)
93+
find_package(metis CONFIG NO_DEFAULT_PATH QUIET)
9494
else()
95-
find_package(metis CONFIG)
95+
find_package(metis CONFIG QUIET)
9696
endif()
9797

9898
if(metis_FOUND)

0 commit comments

Comments
 (0)