Skip to content

Commit 272758d

Browse files
committed
Add CI using Github Actions
1 parent cee9cf2 commit 272758d

1 file changed

Lines changed: 95 additions & 0 deletions

File tree

.github/workflows/invoke-ci.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Copyright Agustin K-ballo Berge, Fusion Fenix 2020
2+
#
3+
# Distributed under the Boost Software License, Version 1.0. (See accompanying
4+
# file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5+
6+
name: Eggs.Invoke CI
7+
8+
on:
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- 'CMakeLists.txt'
14+
- 'include/*'
15+
- 'test/*'
16+
- '.github/workflows/invoke-ci.yml'
17+
pull_request:
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
jobs:
24+
build:
25+
name: ${{ matrix.config.name }} - ${{ matrix.build_type }}
26+
runs-on: ${{ matrix.config.os }}
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
config:
31+
- {
32+
name: "Linux GCC 9",
33+
os: ubuntu-latest,
34+
generator: Ninja,
35+
cc: "gcc-9", cxx: "g++-9",
36+
cxxflags: "-Wall -Wextra -Werror"
37+
}
38+
- {
39+
name: "Linux Clang 9",
40+
os: ubuntu-latest,
41+
generator: Ninja,
42+
cc: "clang-9", cxx: "clang++-9",
43+
cxxflags: "-Wall -Wextra -Werror"
44+
}
45+
- {
46+
name: "macOS GCC",
47+
os: macos-latest,
48+
generator: Ninja,
49+
cc: "gcc", cxx: "g++",
50+
cxxflags: "-Wall -Wextra -Werror"
51+
}
52+
- {
53+
name: "macOS Clang",
54+
os: macos-latest,
55+
generator: Ninja,
56+
cc: "clang", cxx: "clang++",
57+
cxxflags: "-Wall -Wextra -Werror"
58+
}
59+
- {
60+
name: "Windows MSVC 2019",
61+
os: windows-latest,
62+
generator: Visual Studio 16 2019,
63+
cc: "cl", cxx: "cl",
64+
cxxflags: "-W4 -WX -permissive-"
65+
}
66+
build_type: [Debug, Release]
67+
68+
steps:
69+
- uses: actions/checkout@v1
70+
71+
- uses: seanmiddleditch/gha-setup-ninja@master
72+
73+
- name: Configure
74+
env:
75+
CC: ${{ matrix.config.cc }}
76+
CXX: ${{ matrix.config.cxx }}
77+
CXXFLAGS: ${{ matrix.config.cxxflags }}
78+
run: |
79+
mkdir build
80+
cd build
81+
cmake -G"${{ matrix.config.generator }}" \
82+
-DCMAKE_CXX_STANDARD=17 \
83+
-DCMAKE_CXX_EXTENSIONS=OFF \
84+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
85+
..
86+
87+
- name: Build
88+
working-directory: build
89+
run: |
90+
cmake --build . --config ${{ matrix.build_type }}
91+
92+
- name: Test
93+
working-directory: build
94+
run: |
95+
ctest --build-config ${{ matrix.build_type }} --output-on-failure

0 commit comments

Comments
 (0)