Skip to content

Commit 82dc11e

Browse files
committed
🔨 Another CMake github actions attempt
1 parent d6ce3fa commit 82dc11e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

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

+12-3
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,17 @@ jobs:
7070
restore-keys: |
7171
${{ runner.os }}-conan-
7272
73-
- name: Install Conan Dependencies
73+
- name: Install Conan Dependencies (Linux)
74+
if: runner.os == 'Linux'
7475
run: |
7576
conan install . --build=missing -s build_type=${{ matrix.build_type }}
7677
78+
- name: Install Conan Dependencies (Windows)
79+
if: runner.os == 'Windows'
80+
shell: pwsh
81+
run: |
82+
conan install . --build=missing -s build_type=${{ matrix.build_type }} -c tools.cmake.cmake_layout:build_folder_vars=['generators'] -c tools.cmake.cmaketoolchain:generator=Ninja
83+
7784
- name: Set Build Directory
7885
id: strings
7986
shell: bash
@@ -93,14 +100,16 @@ jobs:
93100
run: |
94101
if [ "${{ runner.os }}" == "Windows" ]; then
95102
build_dir="${{ github.workspace }}\\build\\${{ matrix.build_type }}"
103+
toolchain_path="${{ github.workspace }}\\build\\${{ matrix.build_type }}\\generators\\conan_toolchain.cmake"
96104
else
97105
build_dir="${{ github.workspace }}/build/${{ matrix.build_type }}"
106+
toolchain_path="${{ github.workspace }}/build/${{ matrix.build_type }}/generators/conan_toolchain.cmake"
98107
fi
99108
100-
cmake --preset ${{ steps.strings.outputs.preset }} \
101-
-S . \
109+
cmake -S . \
102110
-B "$build_dir" \
103111
-G Ninja \
112+
-DCMAKE_TOOLCHAIN_FILE="$toolchain_path" \
104113
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
105114
106115
- name: Build

0 commit comments

Comments
 (0)