workflows: minor fixes to the cmake build

- build as release with debug info
- change a job id from `clang` to `vs2019`
- use the v142 (2019) toolset instead of the v141 (2017) one
- build when root CMakeLists.txt changes
This commit is contained in:
David Hrdlička 2021-01-31 17:21:40 +01:00
parent a42b4263f9
commit f277faa6ad

View File

@ -5,17 +5,19 @@ on:
push: push:
paths: paths:
- src/** - src/**
- "**/CMakeLists.txt"
- .github/workflows/** - .github/workflows/**
- vcpkg.json - vcpkg.json
pull_request: pull_request:
paths: paths:
- src/** - src/**
- "**/CMakeLists.txt"
- .github/workflows/** - .github/workflows/**
- vcpkg.json - vcpkg.json
env: env:
BUILD_TYPE: Release BUILD_TYPE: RelWithDebInfo
jobs: jobs:
mingw: mingw:
@ -56,14 +58,14 @@ jobs:
run: >- run: >-
cmake -S . -B build cmake -S . -B build
-G "MSYS Makefiles" -G "MSYS Makefiles"
-D CMAKE_BUILD_TYPE=$BUILD_TYPE -D CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-D DEV_BRANCH=${{ matrix.dev-build }} -D DEV_BRANCH=${{ matrix.dev-build }}
-D NEW_DYNAREC=${{ matrix.new-dynarec }} -D NEW_DYNAREC=${{ matrix.new-dynarec }}
-D VNC=OFF -D VNC=OFF
- name: Build - name: Build
run: cmake --build build --config $BUILD_TYPE run: cmake --build build
clang: vs2019:
name: VS2019 ${{ matrix.toolset }} ${{ matrix.target-arch }} build (DEV_BUILD=${{ matrix.dev-build }}, NEW_DYNAREC=${{ matrix.new-dynarec }}) name: VS2019 ${{ matrix.toolset }} ${{ matrix.target-arch }} build (DEV_BUILD=${{ matrix.dev-build }}, NEW_DYNAREC=${{ matrix.new-dynarec }})
runs-on: windows-latest runs-on: windows-latest
@ -74,7 +76,7 @@ jobs:
dev-build: ['ON', 'OFF'] dev-build: ['ON', 'OFF']
new-dynarec: ['ON', 'OFF'] new-dynarec: ['ON', 'OFF']
target-arch: ['Win32', 'x64', 'ARM', 'ARM64'] target-arch: ['Win32', 'x64', 'ARM', 'ARM64']
toolset: ['clangcl', 'v141'] toolset: ['clangcl', 'v142']
exclude: exclude:
- target-arch: 'ARM' - target-arch: 'ARM'
new-dynarec: 'OFF' new-dynarec: 'OFF'
@ -94,9 +96,8 @@ jobs:
cmake -S . -B build cmake -S . -B build
-G "Visual Studio 16 2019" -A ${{ matrix.target-arch }} -T ${{ matrix.toolset }} -G "Visual Studio 16 2019" -A ${{ matrix.target-arch }} -T ${{ matrix.toolset }}
-D CMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -D CMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
-D CMAKE_BUILD_TYPE=$BUILD_TYPE
-D DEV_BRANCH=${{ matrix.dev-build }} -D DEV_BRANCH=${{ matrix.dev-build }}
-D NEW_DYNAREC=${{ matrix.new-dynarec }} -D NEW_DYNAREC=${{ matrix.new-dynarec }}
-D VNC=OFF -D VNC=OFF
- name: Build - name: Build
run: cmake --build build --config $BUILD_TYPE run: cmake --build build --config ${{ env.BUILD_TYPE }}