-
Notifications
You must be signed in to change notification settings - Fork 1
151 lines (142 loc) · 4.48 KB
/
cmake-multi-platform.yml
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
141
142
143
144
145
146
147
148
149
150
151
# Github CI config
# Inspired by https://github.com/libcpr/cpr/blob/master/.github/workflows/ci.yml
# Runs: clang format check, g++ & clang, release & debug, on Fedora
name: OSTree-TUI CI
on: [push, workflow_dispatch, pull_request]
env:
# ctest not used yet
# standard dependencies for building & project
BUILD_DEPENDENCIES: "gcc-c++ clang git gcc gdb make cmake automake autoconf"
OSTREE_TUI_DEPENDENCIES: "glib2-devel gtk-doc ostree-devel libtool bison liblzf e2fsprogs-devel xz-devel gpgme-devel fuse-devel"
jobs:
fedora-clang:
strategy:
matrix:
buildType: [Debug, Release]
runs-on: ubuntu-latest
container: "fedora:latest"
steps:
- name: Update package list
run: dnf update -y
- name: Install Dependencies
run: |
sudo dnf install -y ${{ env.BUILD_DEPENDENCIES }}
sudo dnf install -y ${{ env.OSTREE_TUI_DEPENDENCIES }}
- name: Checkout
uses: actions/checkout@v3
- name: "Build" # & Test"
env:
CPR_BUILD_TESTS: OFF # ON
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ github.workspace }}/build
source-dir: ${{ github.workspace }}
cc: clang
cxx: clang++
build-type: Release
run-test: false # true
# ctest-options: ${{ env.CTEST_OPTIONS }}
fedora-gcc:
strategy:
matrix:
buildType: [Debug, Release]
runs-on: ubuntu-latest
container: "fedora:latest"
steps:
- name: Update package list
run: dnf update -y
- name: Install Dependencies
run: |
sudo dnf install -y ${{ env.BUILD_DEPENDENCIES }}
sudo dnf install -y ${{ env.OSTREE_TUI_DEPENDENCIES }}
- name: Checkout
uses: actions/checkout@v3
- name: "Build" # & Test"
env:
CPR_BUILD_TESTS: OFF # ON
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ github.workspace }}/build
source-dir: ${{ github.workspace }}
cc: gcc
cxx: g++
build-type: ${{ matrix.buildType }}
run-test: false # true
# ctest-options: ${{ env.CTEST_OPTIONS }}
fedora-gcc-sanitizer:
strategy:
matrix:
buildType: [UdefSan, LeakSan, AddrSan, ThreadSan]
runs-on: ubuntu-latest
container: "fedora:latest"
steps:
- name: Update package list
run: dnf update -y
- name: Install Dependencies
run: |
sudo dnf install -y ${{ env.BUILD_DEPENDENCIES }}
sudo dnf install -y ${{ env.OSTREE_TUI_DEPENDENCIES }}
sudo dnf install -y libasan libubsan liblsan libtsan
- name: Checkout
uses: actions/checkout@v3
- name: "Build" # & Test
env:
CPR_BUILD_TESTS: OFF
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ github.workspace }}/build
source-dir: ${{ github.workspace }}
cc: gcc
cxx: g++
build-type: ${{ matrix.buildType }}
run-test: false # true
# ctest-options: ${{ env.CTEST_OPTIONS }}
clang-tidy:
runs-on: ubuntu-latest
container: "fedora:latest"
steps:
- name: Update package list
run: sudo dnf update -y
- name: Install dependencies
run: |
sudo dnf install -y cmake git gcc-c++ clang ninja-build automake autoconf clang-tools-extra
sudo dnf install -y ${{ env.OSTREE_TUI_DEPENDENCIES }}
- name: Checkout
uses: actions/checkout@v3
- name: "Build Debug" # & Test"
env:
CPR_BUILD_TESTS: OFF # ON
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{github.workspace}}/build
source-dir: ${{github.workspace}}
cc: clang
cxx: clang++
build-type: Debug
run-test: false
configure-options: -DCPR_ENABLE_LINTING=ON
clang-format:
runs-on: ubuntu-latest
container: "fedora:latest"
steps:
- name: Update package list
run: sudo dnf update -y
- name: Install clang-format
run: sudo dnf install -y clang-tools-extra
- name: Checkout
uses: actions/checkout@v3
- name: Check format
run: bash scripts/check_clang_format.sh
cppcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Run cppcheck"
uses: deep5050/cppcheck-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
check_library: enable
enable: warning,style,performance,missingInclude
output_file: cppcheck_report.txt
- name: "Print report"
run: cat cppcheck_report.txt