Repository navigation
111 lines (92 loc) · 2.6 KB
/
Copy pathc-cpp.yml
File metadata and controls
111 lines (92 loc) · 2.6 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
name: CI - Circular Buffer Library
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
linux-gcc:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Debug, Release]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ cmake libgtest-dev build-essential
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_TESTING=ON
- name: Build
run: cmake --build build --config ${{ matrix.build_type }} --parallel 4
- name: Run tests
working-directory: ./build
run: ctest --output-on-failure
- name: Run demos
working-directory: ./build
run: |
./demo
./demo_mutex
./demo_bulk
./demo_overwrite
./demo_enhanced
./demo_stats
./demo_timeout
linux-clang:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Debug, Release]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang clang-tidy cmake libgtest-dev build-essential
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBUILD_TESTING=ON
- name: Build
run: cmake --build build --config ${{ matrix.build_type }} --parallel 4
- name: Run tests
working-directory: ./build
run: ctest --output-on-failure
- name: Run demos
working-directory: ./build
run: |
./demo
./demo_mutex
./demo_bulk
./demo_overwrite
./demo_enhanced
./demo_stats
./demo_timeout
macos-clang:
runs-on: macos-latest
strategy:
matrix:
build_type: [Debug, Release]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: brew install cmake googletest
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_TESTING=ON
- name: Build
run: cmake --build build --config ${{ matrix.build_type }} --parallel 4
- name: Run tests
working-directory: ./build
run: ctest --output-on-failure
- name: Run demos
working-directory: ./build
run: |
./demo
./demo_mutex
./demo_bulk
./demo_overwrite
./demo_enhanced
./demo_stats
./demo_timeout