summaryrefslogtreecommitdiff
path: root/.github/workflows/cmake.yml
blob: d8ed318e05c4ffa6570d5693ce000cc03112c140 (plain)
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
name: CMake

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]

    runs-on: ${{ matrix.os }}

    steps:
    - uses: actions/checkout@v3

    - name: Configure CMake (Windows)
      run: cmake -B ${{github.workspace}}/build -G "Visual Studio 17 2022" -A x64
      if: runner.os == 'Windows'

    - name: Configure CMake (non-Windows)
      run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
      if: runner.os != 'Windows'

    - name: Build
      # Build your program with the given configuration
      run: cmake --build ${{github.workspace}}/build --config Release