Skip to content

Commit d9e641e

Browse files
committed
add tests for BLA_VENDOR
1 parent 7547cd1 commit d9e641e

File tree

2 files changed

+158
-0
lines changed

2 files changed

+158
-0
lines changed

.github/workflows/hipo-bla.yml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: hipo-bla
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
8+
win-bla:
9+
runs-on: windows-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
config: [Release]
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Checkout METIS
19+
uses: actions/checkout@v4
20+
with:
21+
repository: galabovaa/METIS
22+
ref: 510-w
23+
path: METIS
24+
25+
- name: Create installs dir
26+
working-directory: ${{runner.workspace}}
27+
run: |
28+
ls
29+
mkdir installs
30+
ls
31+
32+
- name: Install METIS
33+
shell: pwsh
34+
run: |
35+
cd METIS
36+
pwd
37+
cmake -S. -B build `
38+
-DGKLIB_PATH="$env:GITHUB_WORKSPACE/METIS/GKlib" `
39+
-DCMAKE_INSTALL_PREFIX="${{ runner.workspace }}/installs"
40+
cmake --build build --parallel --config ${{ matrix.config }}
41+
cmake --install build --config ${{ matrix.config }}
42+
43+
- name: Install OpenBLAS
44+
shell: pwsh
45+
run: vcpkg install openblas[threads]
46+
47+
- name: Configure CMake
48+
shell: pwsh
49+
run: |
50+
cmake `
51+
-S "$env:GITHUB_WORKSPACE" `
52+
-B "${{ runner.workspace }}/build" `
53+
-DHIPO=ON `
54+
-DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" `
55+
-DMETIS_ROOT="${{ runner.workspace }}/installs" `
56+
-DBLA_VENDOR=OpenBLAS
57+
58+
- name: Build
59+
shell: pwsh
60+
working-directory: ${{runner.workspace}}/build
61+
run: |
62+
cmake --build . --parallel --config ${{ matrix.config }}
63+
64+
- name: Test executable
65+
shell: pwsh
66+
working-directory: ${{runner.workspace}}/build
67+
run: |
68+
& ".\${{ matrix.config }}\bin\highs.exe" --solver=hipo `
69+
"$env:GITHUB_WORKSPACE/check/instances/afiro.mps"
70+
71+
- name: Ctest
72+
shell: pwsh
73+
working-directory: ${{runner.workspace}}/build
74+
run: |
75+
ctest --parallel --timeout 300 --output-on-failure -C ${{ matrix.config }}
76+
77+
hipo-bla:
78+
strategy:
79+
fail-fast: false
80+
matrix:
81+
os: [ubuntu-latest, macos-latest]
82+
config: [Release]
83+
84+
steps:
85+
- uses: actions/checkout@v4
86+
87+
- name: Checkout METIS
88+
uses: actions/checkout@v4
89+
with:
90+
repository: galabovaa/METIS
91+
ref: 510-w
92+
path: METIS
93+
94+
- name: Create installs dir
95+
working-directory: ${{runner.workspace}}
96+
run: |
97+
mkdir installs
98+
ls
99+
100+
- name: Install METIS
101+
run: |
102+
cmake \
103+
-S $GITHUB_WORKSPACE/METIS \
104+
-B build \
105+
-DGKLIB_PATH=${{ github.workspace }}/METIS/GKlib \
106+
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/installs \
107+
cmake --build build --parallel
108+
cmake --install build
109+
110+
# no default blas available on runner
111+
112+
- name: Cache APT packages
113+
uses: actions/cache@v4
114+
with:
115+
path: |
116+
/var/cache/apt/archives
117+
/var/lib/apt/lists
118+
key: ${{ runner.os }}-apt-libopenblas
119+
120+
- name: Install OpenBLAS
121+
shell: bash
122+
run: |
123+
sudo apt update
124+
sudo apt install libopenblas-dev
125+
126+
- name: Create Build Environment
127+
run: cmake -E make_directory ${{runner.workspace}}/build
128+
129+
- name: Configure CMake ubuntu
130+
working-directory: ${{runner.workspace}}/build
131+
if: ${{ matrix.os == 'ubuntu-latest' }}
132+
run: |
133+
cmake $GITHUB_WORKSPACE -DHIPO=ON \
134+
-DMETIS_ROOT=${{runner.workspace}}/installs \
135+
-DBLA_VENDOR=OpenBLAS
136+
137+
- name: Configure CMake macos
138+
working-directory: ${{runner.workspace}}/build
139+
if: ${{ matrix.os == 'macos-latest' }}
140+
run: |
141+
cmake $GITHUB_WORKSPACE -DHIPO=ON \
142+
-DMETIS_ROOT=${{runner.workspace}}/installs \
143+
-DBLA_VENDOR=Apple
144+
145+
- name: Build
146+
working-directory: ${{runner.workspace}}/build
147+
run: |
148+
cmake --build . --parallel
149+
150+
- name: Test executable
151+
working-directory: ${{runner.workspace}}/build
152+
run: ./bin/highs --solver=hipo $GITHUB_WORKSPACE/check/instances/afiro.mps
153+
154+
- name: Ctest
155+
working-directory: ${{runner.workspace}}/build
156+
run: |
157+
ctest --parallel --timeout 300 --output-on-failure

.github/workflows/hipo-win.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ jobs:
114114
-B "${{ runner.workspace }}/build" `
115115
-DHIPO=ON `
116116
-DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" `
117+
-DMETIS_ROOT="${{ runner.workspace }}/installs" `
117118
-DALL_TESTS=${{ matrix.all_tests }}
118119
119120
- name: Build

0 commit comments

Comments
 (0)