-
Notifications
You must be signed in to change notification settings - Fork 25
40 lines (32 loc) · 1.01 KB
/
cmake.yml
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
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Release
jobs:
build:
strategy:
matrix:
config:
- { name: Windows MSVC, os: windows-latest }
- { name: Linux GCC, os: ubuntu-latest }
- { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: MacOS XCode, os: macos-latest }
runs-on: ${{ matrix.config.os }}
steps:
- name: ${{ matrix.config.name }}
uses: actions/checkout@v2
- name: Configure CMake
shell: bash
run: |
cmake -S $GITHUB_WORKSPACE \
-B $GITHUB_WORKSPACE/build \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install \
${{ matrix.config.flags }}
- name: Build
shell: bash
run: cmake --build $GITHUB_WORKSPACE/build --config $BUILD_TYPE --target install -j16