-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (89 loc) · 2.55 KB
/
Copy pathinvoke-ci-cxx11.yml
File metadata and controls
98 lines (89 loc) · 2.55 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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Copyright Agustin K-ballo Berge, Fusion Fenix 2020
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
name: Eggs.Invoke C++11
on:
push:
branches:
paths:
- 'CMakeLists.txt'
- 'example/**'
- 'include/**'
- 'test/**'
- '.github/workflows/invoke-ci-cxx11.yml'
pull_request:
defaults:
run:
shell: bash
jobs:
build:
name: ${{ matrix.config.name }} - ${{ matrix.build_type }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Linux GCC 9",
os: ubuntu-latest,
generator: Ninja,
cc: "gcc-9", cxx: "g++-9",
cxxflags: "-Wall -Wextra -Werror"
}
- {
name: "Linux Clang 9",
os: ubuntu-latest,
generator: Ninja,
cc: "clang-9", cxx: "clang++-9",
cxxflags: "-Wall -Wextra -Werror"
}
- {
name: "macOS Clang",
os: macos-latest,
generator: Ninja,
cc: "clang", cxx: "clang++",
cxxflags: "-Wall -Wextra -Werror"
}
- {
name: "Windows MSVC 2019",
os: windows-latest,
generator: Visual Studio 16 2019,
cc: "cl", cxx: "cl",
cxxflags: "-W4 -WX -permissive- -Zc:preprocessor -wd5105"
}
- {
name: "Windows MSVC 2019 (permissive)",
os: windows-latest,
generator: Visual Studio 16 2019,
cc: "cl", cxx: "cl",
cxxflags: "-W4 -WX"
}
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v1
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Configure
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
CXXFLAGS: ${{ matrix.config.cxxflags }}
run: |
mkdir build
cd build
cmake -G"${{ matrix.config.generator }}" \
-DCMAKE_CXX_STANDARD=11 \
-DCMAKE_CXX_EXTENSIONS=OFF \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_BENCHMARKS=OFF \
-DBUILD_EXAMPLE=ON \
-DBUILD_TESTING=ON \
..
- name: Build
working-directory: build
run: |
cmake --build . --config ${{ matrix.build_type }}
- name: Test
working-directory: build
run: |
ctest --build-config ${{ matrix.build_type }} --output-on-failure