Skip to content

Commit 02dd589

Browse files
committed
cmake find build test for hipo ubuntu
1 parent 68d7387 commit 02dd589

File tree

1 file changed

+115
-0
lines changed

1 file changed

+115
-0
lines changed

.github/workflows/hipo-ubuntu-510.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,121 @@ jobs:
9191
run: |
9292
ctest --parallel --timeout 300 --output-on-failure
9393
94+
hipo_find_build:
95+
runs-on: ${{ matrix.os }}
96+
strategy:
97+
fail-fast: false
98+
matrix:
99+
os: [ubuntu-latest]
100+
branch: [hipo-tt]
101+
102+
steps:
103+
- uses: actions/checkout@v4
104+
105+
- name: Checkout HiGHS
106+
uses: actions/checkout@v4
107+
with:
108+
repository: ERGO-Code/HiGHS
109+
ref: ${{matrix.branch}}
110+
path: HiGHS
111+
112+
- name: Checkout METIS
113+
uses: actions/checkout@v4
114+
with:
115+
repository: galabovaa/METIS
116+
ref: 510-w
117+
path: METIS
118+
119+
- name: Create installs dir
120+
working-directory: ${{runner.workspace}}
121+
run: |
122+
mkdir installs
123+
124+
- name: Install METIS
125+
run: |
126+
cd METIS
127+
pwd
128+
cmake -S. -B build \
129+
-DGKLIB_PATH=${{ github.workspace }}/METIS/GKlib \
130+
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/installs \
131+
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
132+
cmake --build build --parallel
133+
cmake --install build
134+
135+
- name: Cache APT packages
136+
uses: actions/cache@v4
137+
with:
138+
path: |
139+
/var/cache/apt/archives
140+
/var/lib/apt/lists
141+
key: ${{ runner.os }}-apt-libopenblas
142+
143+
- name: Install OpenBLAS
144+
shell: bash
145+
run: |
146+
sudo apt update
147+
sudo apt install libopenblas-dev
148+
149+
- name: Create Build Environment
150+
run: cmake -E make_directory ${{runner.workspace}}/build
151+
152+
- name: Configure CMake
153+
run: |
154+
cmake \
155+
-S ${{runner.workspace}}/highs-tests/HiGHS \
156+
-B ${{runner.workspace}}/build \
157+
-DHIPO=ON \
158+
-DMETIS_ROOT=${{runner.workspace}}/installs \
159+
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
160+
-DALL_TESTS=${{ matrix.all_tests}}
161+
162+
- name: Build
163+
working-directory: ${{runner.workspace}}/build
164+
run: |
165+
cmake --build . --parallel
166+
167+
- name: Test executable
168+
working-directory: ${{runner.workspace}}/build
169+
run: |
170+
./bin/highs --solver=hipo \
171+
${{runner.workspace}}/highs-tests/HiGHS/check/instances/afiro.mps
172+
173+
- name: Checkout CMakeHighsFindPackage
174+
uses: actions/checkout@v4
175+
with:
176+
repository: galabovaa/CMakeHighsFindPackage
177+
ref: master
178+
path: CMakeHighsFindPackage
179+
180+
- name: Create Build Environment
181+
run: cmake -E make_directory ${{runner.workspace}}/build-find
182+
183+
- name: Build CMakeFindHighsPackage
184+
working-directory: ${{runner.workspace}}/build-find
185+
shell: bash
186+
run: |
187+
cmake ${{runner.workspace}}/highs-tests/CMakeHighsFindPackage \
188+
-DHIGHS_DIR=${{runner.workspace}}/build \
189+
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-find-highs
190+
cmake --build . --parallel
191+
cmake --install .
192+
193+
- name: Test build
194+
working-directory: ${{runner.workspace}}/build-find
195+
shell: bash
196+
run: |
197+
./main
198+
199+
- name: Test install
200+
working-directory: ${{runner.workspace}}/install-find-highs
201+
shell: bash
202+
run: |
203+
echo "----- ls"
204+
ls
205+
echo "----- ls installs/lib"
206+
ls ${{runner.workspace}}/installs/lib
207+
LD_LIBRARY_PATH=${{runner.workspace}}/installs/lib ./bin/main
208+
94209
hipo_install_and_cmake:
95210
runs-on: ${{ matrix.os }}
96211
strategy:

0 commit comments

Comments
 (0)