Skip to content

improve .github/workflows/build.yml #2

improve .github/workflows/build.yml

improve .github/workflows/build.yml #2

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build-msvc:
strategy:
matrix:
os: [windows-latest]
toolset: ['14.2', '14.1'] # VS 2019 and 2017 (see below)
arch: [i386, amd64]
config: [Debug, Release]
fail-fast: false
runs-on: ${{matrix.os}}
steps:
- name: Install ninja
run: choco install -y ninja
- name: Activate VS cmd (x86)
if: ${{ matrix.arch == 'i386' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
toolset: ${{matrix.toolset}}
- name: Activate VS cmd (amd64)
if: ${{ matrix.arch == 'amd64' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
toolset: ${{matrix.toolset}}
- name: Source checkout
uses: actions/checkout@v3
with:
path: src
- name: Configure
run: cmake -S src -B build -G Ninja -DARCH:STRING=${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.config}}
- name: Build
run: cmake --build build -- -k0