name: builds

on:
  push:
    paths-ignore:
      - '**.md'
  pull_request:
    paths-ignore:
      - '**.md'

jobs:
  build-windows-2022:
    runs-on: windows-2022
    strategy:
      fail-fast: false
      matrix:
        target:
          - raddbg
          - radlink
          - radbin
        compiler:
          - msvc
          - clang
        mode:
          - debug
          - release
    steps:
      - name: checkout
        uses: actions/checkout@v2
      - name: build (vs 2022)
        shell: cmd
        run: |
          call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
          call build ${{ matrix.target }} ${{ matrix.compiler }} ${{ matrix.mode }} || exit /b 1
