-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (37 loc) · 1.09 KB
/
Copy pathbuild.yml
File metadata and controls
43 lines (37 loc) · 1.09 KB
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
name: CMake Build and Test
on:
[push, pull_request]
jobs:
build:
name: ${{ matrix.config.name }} ${{ matrix.build_type }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
build_type:
[Release, Debug]
config:
- name: "Windows"
os: "windows-latest"
cc: "cl"
cxx: "cl"
- name: "Linux GCC"
os: "ubuntu-latest"
cc: "gcc"
cxx: "g++"
- name: "Linux CLang"
os: "ubuntu-latest"
cc: "clang"
cxx: "clang++"
steps:
- uses: actions/checkout@v2
- name: Configure
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCPPLOG_BUILD_TEST=ON -DCPPLOG_NAMESPACE=logger
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.build_type }}
- name: Test
if: ${{ matrix.config.os != 'windows-latest' }}
run: ${{github.workspace}}/build/cpplog-test --short-test