aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: e99fc8b62cb4ca4f8ec74763aa618b61676d45c6 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CI

on:
  push:
    branches: [main]
    paths-ignore:
      - "docs/**"
      - "**/README.md"
  pull_request:
    branches: [main]
    paths-ignore:
      - "docs/**"
      - "**/README.md"

jobs:
  macos-build:
    name: macOS Build
    runs-on: macos-latest

    steps:
      - uses: actions/checkout@v2

      - name: Restore Cache
        uses: actions/cache@v2
        with:
          path: ~/.cache/vcpkg/archives
          key: vcpkg-${{ runner.os }}

      - name: Setup Ninja
        uses: ashutoshvarma/setup-ninja@master
        with:
          version: 1.10.2

      - name: Build
        run: |
          cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -H. -B./build -G Ninja
          cmake --build ./build --config Debug --target all

      - name: Test
        working-directory: build
        run: |
          ctest -C Debug -T test --output-on-failure

  windows-build:
    name: Windows Build
    runs-on: windows-latest

    steps:
      - uses: actions/checkout@v2

      - name: Restore Cache
        uses: actions/cache@v2
        with:
          path: ~/AppData/Local/vcpkg/archives
          key: vcpkg-${{ runner.os }}

      - name: Setup Ninja
        uses: ashutoshvarma/setup-ninja@master
        with:
          version: 1.10.2

      - name: Build
        run: |
          cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -H. -B./build -G Ninja
          cmake --build ./build --config Debug --target all

      - name: Test
        working-directory: build
        run: |
          ctest -C Debug -T test --output-on-failure