Repository navigation
140 lines (135 loc) · 3.36 KB
/
Copy pathbasic.yml
File metadata and controls
140 lines (135 loc) · 3.36 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
name: Basic builds
on:
push:
pull_request:
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- uses: DoozyX/clang-format-lint-action@v0.14
with:
clangFormatVersion: 14
source: examples
automake:
strategy:
matrix:
include:
# Mac OSX
- os: macos-latest
cc: gcc
cxx: g++
- os: macos-latest
cc: clang
cxx: clang++
# Linux
- os: ubuntu-latest
cc: gcc
cxx: g++
- os: ubuntu-latest
cc: clang
cxx: clang++
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@main
- run: brew install automake
if: ${{ startswith(matrix.os, 'macos') }}
- if: ${{ matrix.cxx }}
run: echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
- if: ${{ matrix.cc }}
run: echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV
- name: Configure
run: |
autoreconf -i .
./configure
- name: Build and test
run: make tdd
cmake:
strategy:
matrix:
include:
# Windows
- os: windows-latest
cpp_version: 17
# Linux
# CMake different C++ versions with clang
- os: ubuntu-latest
cpp_version: 98
cxx: clang++
cc: clang
- os: ubuntu-latest
cpp_version: 11
cxx: clang++
cc: clang
- os: ubuntu-latest
cpp_version: 14
cxx: clang++
cc: clang
- os: ubuntu-latest
cpp_version: 17
cxx: clang++
cc: clang
# CMake different C++ versions with gcc
- os: ubuntu-latest
cpp_version: 98
cxx: g++
cc: gcc
- os: ubuntu-latest
cpp_version: 11
cxx: g++
cc: gcc
- os: ubuntu-latest
cpp_version: 14
cxx: g++
cc: gcc
- os: ubuntu-latest
cpp_version: 17
cxx: g++
cc: gcc
# Mac OSX
- os: macos-latest
cpp_version: 98
- os: macos-latest
cpp_version: 17
cxx: clang++
cc: clang
- os: macos-latest
cpp_version: 14
cxx: g++
cc: gcc
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@main
- if: ${{ matrix.cxx }}
run: echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
- if: ${{ matrix.cc }}
run: echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV
- name: Configure
run: >
cmake
-B build
-S .
-D CMAKE_CXX_STANDARD=${{ matrix.cpp_version }}
- name: Build
run: cmake --build build --verbose
- name: Test
run: ctest --test-dir build
visualstudio-clangcl:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Configure
run: >
cmake
-B build
-G "Visual Studio 17 2022"
-T ClangCL
- name: Build
run: cmake --build build --verbose
- name: Test
run: ctest --test-dir build