Skip to content

Commit 073b504

Browse files
committed
New workflow
1 parent f8cd5fd commit 073b504

1 file changed

Lines changed: 80 additions & 0 deletions

File tree

.github/workflows/hipo-mangle.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: hipo-mangle
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
check-metis:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
config: [Release]
12+
all_tests: [OFF]
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Checkout METIS
18+
uses: actions/checkout@v4
19+
with:
20+
repository: galabovaa/METIS
21+
ref: 510-w
22+
path: METIS
23+
24+
- name: Create installs dir
25+
working-directory: ${{runner.workspace}}
26+
run: |
27+
mkdir installs
28+
ls
29+
30+
- name: Install METIS
31+
run: |
32+
cmake \
33+
-S $GITHUB_WORKSPACE/METIS \
34+
-B build \
35+
-DGKLIB_PATH=${{ github.workspace }}/METIS/GKlib \
36+
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/installs
37+
cmake --build build
38+
cmake --install build
39+
40+
- name: Create Build Environment
41+
run: cmake -E make_directory ${{runner.workspace}}/build
42+
43+
- name: Configure CMake
44+
working-directory: ${{runner.workspace}}/build
45+
run: |
46+
cmake $GITHUB_WORKSPACE -DHIPO=ON -DBUILD_OPENBLAS=ON \
47+
-DALL_TESTS=${{ matrix.all_tests }}
48+
49+
- name: Build HiGHS
50+
working-directory: ${{runner.workspace}}/build
51+
run: |
52+
cmake --build . -j2
53+
54+
- name: Generate METIS symbols
55+
working-directory: ${{runner.workspace}}
56+
run: |
57+
nm installs/lib/libmetis.a | grep -e "[tT] [^ ]+$" -oE | sort > metis.txt
58+
59+
- name: Generate HiGHS symbols
60+
working-directory: ${{runner.workspace}}
61+
run: |
62+
nm build/lib/libhighs.a | grep -e "[tT] [^ ]+$" -oE | sort > highs.txt
63+
64+
- name: Compare symbols
65+
working-directory: ${{runner.workspace}}
66+
run: comm -12 highs.txt metis.txt > common.txt
67+
68+
- name: Check
69+
working-directory: ${{runner.workspace}}
70+
run: |
71+
if [[ "$(wc -l < common.txt)" -eq 0 ]]; then
72+
exit 0
73+
fi
74+
echo "Metis symbols"
75+
cat metis.txt
76+
echo "Highs symbols"
77+
cat highs.txt
78+
echo "Common symbols"
79+
cat compare.txt
80+
exit 1

0 commit comments

Comments
 (0)