Skip to content

Commit f76209f

Browse files
author
Oleh Kulykov
committed
1722334348
1 parent 9684cb8 commit f76209f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ jobs:
5858
shell: bash
5959
run: |
6060
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
61+
echo "build-artifacts-dir=${{ github.workspace }}/artifacts" >> "$GITHUB_ARTIFACTS"
6162
6263
- name: Configure CMake
6364
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
6465
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
6566
run: >
6667
cmake -B ${{ steps.strings.outputs.build-output-dir }}
68+
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-artifacts-dir }}
6769
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
6870
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
6971
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
@@ -78,15 +80,12 @@ jobs:
7880
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
7981
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
8082
run: ctest --extra-verbose --build-config ${{ matrix.build_type }}
81-
82-
- name: List build output dir
83-
working-directory: ${{ steps.strings.outputs.build-output-dir }}
84-
run: |
85-
pwd
86-
ls
87-
88-
- name: List build output dir 2
89-
working-directory: $GITHUB_OUTPUT
83+
84+
- name: Install artifacts
85+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --target Install
86+
87+
- name: List artifacts
88+
working-directory: ${{ steps.strings.outputs.build-artifacts-dir }}
9089
run: |
9190
pwd
9291
ls

0 commit comments

Comments
 (0)