aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/build.yml
blob: 42ce58df70a76852848a063da4a499766fafdd51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Build

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  build:
    runs-on: windows-latest
    strategy:
      matrix:
        preset: [x64-debug, x64-release]
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up MSVC environment
        uses: ilammy/msvc-dev-cmd@v1
        with:
          arch: x64

      - name: Sync vcpkg baseline
        run: |
          $baseline = git -C $env:VCPKG_INSTALLATION_ROOT rev-parse HEAD
          $json = Get-Content vcpkg.json | ConvertFrom-Json
          $json.'builtin-baseline' = $baseline
          $json | ConvertTo-Json | Set-Content vcpkg.json

      - name: Configure
        run: cmake --preset ${{ matrix.preset }}

      - name: Build
        run: cmake --build out/build/${{ matrix.preset }}