1+ name : cmake-find-highs
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ master :
7+ runs-on : ${{ matrix.os }}
8+ strategy :
9+ matrix :
10+ # os: [ubuntu-latest, windows-latest]
11+ os : [ubuntu-latest]
12+ branch : [master, latest]
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - name : Checkout HiGHS repo
18+ uses : actions/checkout@v4
19+ with :
20+ repository : ERGO-Code/HiGHS
21+ ref : ${{matrix.branch}}
22+ path : HiGHS-${{matrix.branch}}
23+
24+ - name : Checkout CMakeHighsFindPackage
25+ uses : actions/checkout@v4
26+ with :
27+ repository : galabovaa/CMakeHighsFindPackage
28+ ref : master
29+ path : CMakeHighsFindPackage-master-${{matrix.branch}}
30+
31+ - name : Create build and install dirs
32+ run : |
33+ cmake -E make_directory ${{runner.workspace}}/build-highs-${{matrix.branch}}
34+ cmake -E make_directory ${{runner.workspace}}/install-highs-${{matrix.branch}}
35+ cmake -E make_directory ${{runner.workspace}}/build-find-highs-${{matrix.branch}}
36+
37+ # cmake -E make_directory ${{runner.workspace}}/install-find-highs-${{matrix.branch}}
38+
39+ - name : Configure CMake HiGHS
40+ shell : bash
41+ working-directory : ${{runner.workspace}}/build-highs-${{matrix.branch}}
42+ run : |
43+ cmake ${{runner.workspace}}/highs-tests/HiGHS-${{matrix.branch}} \
44+ -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-highs-${{matrix.branch}}
45+
46+ - name : Build, ctest and install HiGHS
47+ working-directory : ${{runner.workspace}}/build-highs-${{matrix.branch}}
48+ shell : bash
49+ run : |
50+ cmake --build . --parallel
51+ ctest
52+ cmake --install .
53+
54+ # - name: Build and install CMakeFindHighsPackage
55+ - name : Build CMakeFindHighsPackage
56+ working-directory : ${{runner.workspace}}/build-find-highs-${{matrix.branch}}
57+ shell : bash
58+ run : |
59+ cmake ${{runner.workspace}}/highs-tests/CMakeHighsFindPackage-master-${{matrix.branch}} \
60+ -DHIGHS_DIR=${{runner.workspace}}/install-highs-${{matrix.branch}}/lib/cmake/highs
61+ cmake --build . --parallel
62+
63+ # cmake --install .
64+ # -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-find-highs-${{matrix.branch}}
65+
66+ - name : Test build
67+ working-directory : ${{runner.workspace}}/build-find-highs-${{matrix.branch}}
68+ shell : bash
69+ run : |
70+ ./main
71+
72+ # does not find highs lib, needs more cmake code in CMakeFindHighsPackage
73+ # - name: Test install
74+ # working-directory: ${{runner.workspace}}/install-find-highs-${{matrix.branch}}
75+ # shell: bash
76+ # run: |
77+ # ./bin/main
0 commit comments