-
Notifications
You must be signed in to change notification settings - Fork 0
127 lines (119 loc) · 3.54 KB
/
ci.yaml
File metadata and controls
127 lines (119 loc) · 3.54 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
name: ci
on:
push:
branches:
- master
- ci
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
env:
CONAN_REVISIONS_ENABLED: '1'
CONAN_PRINT_RUN_COMMANDS: '1'
jobs:
build-gcc:
name: Build and Install (gcc)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/configure-project
with:
build_dir: build_gcc
build_type: Release
c_compiler: gcc
cpp_compiler: g++
- run: cmake --build build_gcc --config Release --verbose
- run: tree .
- run: cmake --install build_gcc --prefix=./build_gcc/install
- run: tree .
build-clang:
name: Build with clang
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/configure-project
with:
build_dir: build_clang
build_type: Release
c_compiler: clang
cpp_compiler: clang++
- run: cmake --build build_clang --config Release --verbose
- run: tree .
build-with-libcplusplus:
name: Build with libc++
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/configure-project
with:
build_dir: build_libcplusplus
cpp_compiler: clang++
extra_conan_options: '--settings:host compiler.libcxx=libc++'
extra_cmake_options: '-DUSE_LIBC++=ON'
- run: cmake --build build_libcplusplus --verbose
- run: tree .
build-msvc:
name: Build with Visual Studio
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: python -m pip install --upgrade conan
- run: conan profile detect --name default --force
- run: (Get-Content $(conan profile path default)).replace("compiler.runtime=dynamic","compiler.runtime=static") | Set-Content $(conan profile path default)
- run: conan profile show
- run: mkdir build_msvc
- run: >
conan install
--settings:host build_type=Release
--settings:host compiler.cppstd=17
--output-folder build_msvc
--build=missing
./conanfile.txt
- run: >
conan install
--settings:host build_type=Debug
--settings:host compiler.cppstd=17
--output-folder build_msvc
--build=missing
./conanfile.txt
- run: >
cmake
-DCMAKE_BUILD_TYPE=Release
-G "Visual Studio 17 2022"
-S . -B build_msvc
- run: cmake --build build_msvc --config Release --verbose
- run: cmake --build build_msvc --config Debug --verbose
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/configure-project
with:
build_dir: build_test
build_type: RelWithDebInfo
- run: cmake --build build_test --target cppsample_test --config RelWithDebInfo --verbose
- run: ./build_test/test/cppsample_test
static-analyse:
name: Static Analyse
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/configure-project
with:
build_dir: build_tidy
c_compiler: clang
cpp_compiler: clang++
- run: python3 run-clang-tidy.py -p build_tidy