Skip to content

Commit f367cbe

Browse files
committed
vcpkg gklib 2023, build from source
1 parent 3cb385d commit f367cbe

File tree

2 files changed

+164
-14
lines changed

2 files changed

+164
-14
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: hipo-win-vcpkg
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
release:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [windows-latest]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
# 2. Set up caching for vcpkg
17+
- name: Cache vcpkg
18+
uses: actions/cache@v3
19+
with:
20+
path: |
21+
./vcpkg/installed
22+
./vcpkg/downloads
23+
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
24+
restore-keys: |
25+
vcpkg-${{ runner.os }}-
26+
27+
- name: Install GKlib
28+
run: vcpkg install gklib
29+
30+
- name: ls
31+
run: ls C:/vcpkg/packages/gklib_x64-windows/share/gklib
32+
33+
- name: Install METIS
34+
run: vcpkg install metis
35+
36+
# run: ls C:/vcpkg/packages/metis_x64-windows/
37+
# run: ls C:/vcpkg/packages/metis_x64-windows/lib
38+
# run: ls C:/vcpkg/packages/metis_x64-windows/share
39+
# run: ls C:/vcpkg/packages/gklib_x64-windows/share/gklib
40+
41+
- name: Install OpenBLAS
42+
run: vcpkg install openblas
43+
44+
- name: Create build dir
45+
run: cmake -E make_directory ${{runner.workspace}}/build
46+
47+
- name: Configure cmake
48+
shell: bash
49+
working-directory: ${{runner.workspace}}/build
50+
run: |
51+
cmake $GITHUB_WORKSPACE \
52+
-DHIPO=ON \
53+
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
54+
55+
- name: Build
56+
shell: bash
57+
working-directory: ${{runner.workspace}}/build
58+
run: |
59+
cmake --build . --parallel --config Release
60+
61+
- name: Test executable
62+
shell: bash
63+
working-directory: ${{runner.workspace}}/build
64+
run: ./Release/bin/highs --solver=hipo $GITHUB_WORKSPACE/check/instances/afiro.mps
65+
66+
- name: Ctest
67+
shell: bash
68+
working-directory: ${{runner.workspace}}/build
69+
run: |
70+
ctest --parallel --timeout 300 --output-on-failure -C Release
71+
72+
# debug:
73+
# runs-on: ${{ matrix.os }}
74+
# strategy:
75+
# fail-fast: false
76+
# matrix:
77+
# os: [windows-latest]
78+
79+
# steps:
80+
# - uses: actions/checkout@v4
81+
82+
# - name: Install METIS
83+
# run: vcpkg install metis
84+
85+
# # run: ls C:/vcpkg/packages/metis_x64-windows/
86+
# # run: ls C:/vcpkg/packages/metis_x64-windows/lib
87+
# # run: ls C:/vcpkg/packages/metis_x64-windows/share
88+
# # run: ls C:/vcpkg/packages/gklib_x64-windows/share/gklib
89+
90+
# - name: Install OpenBLAS
91+
# run: vcpkg install openblas
92+
93+
# - name: Create build dir
94+
# run: cmake -E make_directory ${{runner.workspace}}/build
95+
96+
# - name: Configure cmake
97+
# shell: bash
98+
# working-directory: ${{runner.workspace}}/build
99+
# # Here is _DIR because with vcpkg CMake find_package works.
100+
# run: |
101+
# cmake $GITHUB_WORKSPACE \
102+
# -DHIPO=ON \
103+
# -Dmetis_DIR=C:/vcpkg/packages/metis_x64-windows/share/metis \
104+
# -DGKlib_DIR=C:/vcpkg/packages/gklib_x64-windows/share/gklib \
105+
# -DOpenBLAS_DIR=C:/vcpkg/packages/openblas_x64-windows/share/openblas
106+
107+
# - name: Build
108+
# shell: bash
109+
# working-directory: ${{runner.workspace}}/build
110+
# run: |
111+
# cmake --build . --parallel --config Debug
112+
113+
# - name: Test executable
114+
# shell: bash
115+
# working-directory: ${{runner.workspace}}/build
116+
# run: ./Debug/bin/highs --solver=hipo $GITHUB_WORKSPACE/check/instances/afiro.mps
117+
118+
# - name: Ctest
119+
# shell: bash
120+
# working-directory: ${{runner.workspace}}/build
121+
# run: |
122+
# ctest --parallel --timeout 300 --output-on-failure -C Debug

.github/workflows/hipo-win.yml

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,53 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
# 2. Set up caching for vcpkg
17-
- name: Cache vcpkg
18-
uses: actions/cache@v3
16+
- name: Checkout GKlib
17+
uses: actions/checkout@v4
1918
with:
20-
path: |
21-
./vcpkg/installed
22-
./vcpkg/downloads
23-
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
24-
restore-keys: |
25-
vcpkg-${{ runner.os }}-
19+
repository: KarypisLab/GKlib
20+
ref: master
21+
path: GKlib
2622

27-
- name: Install GKlib
28-
run: vcpkg install gklib
23+
- name: Checkout METIS
24+
uses: actions/checkout@v4
25+
with:
26+
repository: KarypisLab/METIS
27+
ref: master
28+
path: METIS
29+
30+
- name: Create installs dir
31+
working-directory: ${{runner.workspace}}
32+
run: |
33+
mkdir installs
34+
ls
35+
36+
- name: Install GKLIB
37+
run: |
38+
cd GKlib
39+
cmake -S. -B build -DCMAKE_INSTALL_PREFIX==${{runner.workspace}}/installs
40+
cmake --build build --config Release
41+
cmake --install build
2942
30-
- name: ls
31-
run: ls C:/vcpkg/packages/gklib_x64-windows/share/gklib
43+
- name: Check GKlib
44+
working-directory: ${{runner.workspace}}
45+
run: |
46+
cd installs
47+
ls
48+
ls lib
3249
3350
- name: Install METIS
34-
run: vcpkg install metis
51+
run: |
52+
cd METIS
53+
make config prefix=${{runner.workspace}}/installs
54+
make
55+
make install
56+
57+
- name: Check METIS
58+
working-directory: ${{runner.workspace}}
59+
run: |
60+
cd installs
61+
ls
62+
ls lib
3563
3664
# run: ls C:/vcpkg/packages/metis_x64-windows/
3765
# run: ls C:/vcpkg/packages/metis_x64-windows/lib

0 commit comments

Comments
 (0)