aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/build.yml
blob: 3cee61b392a82eda0b3b1d23828fb03a008472b9 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build

on: [push, pull_request]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    env:
      BUILD_TYPE: ${{ matrix.type }}
    strategy:
      matrix:
        os: [ubuntu-20.04, windows-2019, macos-10.15]
        type: [Release, Debug]

    steps:
    - uses: actions/checkout@v2
      with:
        submodules: true

    - name: Install Dependencies (Linux)
      run: sudo apt-get update && sudo apt-get install libpulse-dev pulseaudio
      if: matrix.os == 'ubuntu-20.04'

    - name: Start Sound Server (Linux)
      run: pulseaudio -D --start
      if: matrix.os == 'ubuntu-20.04'

    - name: Configure CMake
      shell: bash
      run: cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE

    - name: Build
      shell: bash
      run: cmake --build build

    - name: Test
      shell: bash
      run: (cd build && ctest -V)
      if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-10.15' }}

  check_format:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: true

    - name: Configure CMake
      shell: bash
      run: cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE

    - name: Check format
      shell: bash
      run: cmake --build build --target clang-format-check