Update cmake-multi-platform.yml

This commit is contained in:
Sakimotor 2025-03-03 11:21:01 +01:00 committed by GitHub
parent 223514cae9
commit 745f0715a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,6 @@ on:
pull_request: pull_request:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -37,21 +36,46 @@ jobs:
run: choco install ninja run: choco install ninja
shell: powershell shell: powershell
- name: Configure CMake - name: Configure CMake (Linux)
if: runner.os == 'Linux'
run: > run: >
cmake -B ${{ github.workspace }}/build cmake -B build
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-G Ninja -G Ninja
-S ${{ github.workspace }} -S .
shell: bash shell: bash
- name: Build - name: Configure CMake (Windows)
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }} if: runner.os == 'Windows'
run: >
cmake -B build
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-G Ninja
-S .
shell: powershell
- name: Build (Linux)
if: runner.os == 'Linux'
run: cmake --build build --config ${{ matrix.build_type }}
shell: bash shell: bash
- name: Test - name: Build (Windows)
working-directory: ${{ github.workspace }}/build if: runner.os == 'Windows'
run: cmake --build build --config ${{ matrix.build_type }}
shell: powershell
- name: Test (Linux)
if: runner.os == 'Linux'
working-directory: build
run: ctest --build-config ${{ matrix.build_type }} run: ctest --build-config ${{ matrix.build_type }}
shell: bash shell: bash
- name: Test (Windows)
if: runner.os == 'Windows'
working-directory: build
run: ctest --build-config ${{ matrix.build_type }}
shell: powershell