Skip to content

Commit

Permalink
Update cmake-multi-platform.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinQu authored Mar 31, 2024
1 parent dec14aa commit 434bfe9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,19 @@ jobs:
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- uses: turtlebrowser/[email protected]

- name: Create default conan profile
run: conan profile detect --force

- name: Conan install
run: conan install conanfile.py --build=missing -s compiler.cppstd=20 -s build_type=${{ matrix.build_type }} -s compiler=${{ matrix.cc }}

- uses: actions/[email protected]
id: cache-conan
with:
key: ${{ matrix.os}}-${{ matrix.build_type }}-${{ matrix.cc }}
path: ~/.conan2

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
Expand All @@ -53,7 +62,7 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cc }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
Expand Down

0 comments on commit 434bfe9

Please sign in to comment.