Skip to content

Commit 614a469

Browse files
committed
cmake fetch content
1 parent 4b7cd4b commit 614a469

File tree

3 files changed

+58
-84
lines changed

3 files changed

+58
-84
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: cmake-fetch-content
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 CMakeHighsFetchContent
18+
uses: actions/checkout@v4
19+
with:
20+
repository: galabovaa/CMakeHighsFetchContent
21+
ref: master
22+
path: CMakeHighsFetchContent-master-${{matrix.branch}}
23+
24+
- name: Create build dir
25+
run: |
26+
cmake -E make_directory ${{runner.workspace}}/build-fetch-content-${{matrix.branch}}
27+
28+
- name: Build CMakeFindHighsPackage
29+
working-directory: ${{runner.workspace}}/build-fetch-content-${{matrix.branch}}
30+
shell: bash
31+
run: |
32+
cmake ${{runner.workspace}}/highs-tests/CMakeHighsFetchContent-master-${{matrix.branch}} \
33+
-DBRANCH=${{matrix.branch}}
34+
cmake --build . --parallel
35+
36+
- name: Test
37+
working-directory: ${{runner.workspace}}/build-fetch-content-${{matrix.branch}}
38+
shell: bash
39+
run: |
40+
./bin/main
41+
42+
# todo, not implemented yet in CMakeHighsFetchContent
43+
# - name: Test install

.github/workflows/cmake-find-highs copy.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/cmake-find-highs.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ jobs:
2626
with:
2727
repository: galabovaa/CMakeHighsFindPackage
2828
ref: master
29-
path: CMakeHighsFindPackage-master
29+
path: CMakeHighsFindPackage-master-${{matrix.branch}}
3030

3131
- name: Create build and install dirs
3232
run: |
3333
cmake -E make_directory ${{runner.workspace}}/build-highs-${{matrix.branch}}
3434
cmake -E make_directory ${{runner.workspace}}/install-highs-${{matrix.branch}}
3535
cmake -E make_directory ${{runner.workspace}}/build-find-highs-${{matrix.branch}}
36-
cmake -E make_directory ${{runner.workspace}}/install-find-highs-${{matrix.branch}}
36+
37+
# cmake -E make_directory ${{runner.workspace}}/install-find-highs-${{matrix.branch}}
3738

3839
- name: Configure CMake HiGHS
3940
shell: bash
@@ -50,24 +51,27 @@ jobs:
5051
ctest
5152
cmake --install .
5253
53-
- name: Build and install CMakeFindHighsPackage
54+
# - name: Build and install CMakeFindHighsPackage
55+
- name: Build CMakeFindHighsPackage
5456
working-directory: ${{runner.workspace}}/build-find-highs-${{matrix.branch}}
5557
shell: bash
5658
run: |
57-
cmake ${{runner.workspace}}/highs-tests/CMakeHighsFindPackage-master \
59+
cmake ${{runner.workspace}}/highs-tests/CMakeHighsFindPackage-master-${{matrix.branch}} \
5860
-DHIGHS_DIR=${{runner.workspace}}/install-highs-${{matrix.branch}}/lib/cmake/highs \
59-
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-find-highs-${{matrix.branch}}
6061
cmake --build . --parallel
61-
cmake --install .
62+
63+
# cmake --install .
64+
# -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install-find-highs-${{matrix.branch}}
6265

6366
- name: Test build
6467
working-directory: ${{runner.workspace}}/build-find-highs-${{matrix.branch}}
6568
shell: bash
6669
run: |
6770
./bin/main
6871
69-
- name: Test install
70-
working-directory: ${{runner.workspace}}/install-find-highs-${{matrix.branch}}
71-
shell: bash
72-
run: |
73-
./bin/main
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

Comments
 (0)