Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ca5adc

Browse files
committed
Start cleaning up build system and CI
1 parent 663e251 commit 8ca5adc

32 files changed

+460
-535
lines changed

.github/workflows/ccpp.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,14 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v1
12-
- name: Git Submodules
13-
run: git submodule update --init --recursive --depth 50
14-
- name: CMake
15-
run: cmake .. -DCMAKE_BUILD_TYPE=Asan
16-
working-directory: build
12+
- name: Install dependencies
13+
run: sudo ./scripts/install-gtest.sh Debug /usr/local
14+
- name: Configure
15+
run: cmake -S. --preset ci
1716
env:
1817
CC: gcc-9
1918
CXX: g++-9
2019
- name: Build
21-
run: make -j4
22-
working-directory: build
23-
- name: Run tests
24-
run: make check
25-
working-directory: build
20+
run: cmake --build --preset ci -j
21+
- name: Test
22+
run: ctest --preset ci

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ __pycache__/
99

1010
*.tmp
1111
*.hex
12+
13+
build

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
[submodule "googletest"]
2-
path = googletest
3-
url = https://github.com/google/googletest.git
4-
shallow = true

.vscode/c_cpp_properties.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

.vscode/cmake-variants.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 3 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -3,102 +3,15 @@
33
"*.axbm": "cpp",
44
"*.ipp": "cpp",
55
"*.tcc": "cpp",
6-
"array": "cpp",
7-
"initializer_list": "cpp",
8-
"utility": "cpp",
9-
"deque": "cpp",
10-
"forward_list": "cpp",
11-
"unordered_map": "cpp",
12-
"vector": "cpp",
13-
"typeinfo": "cpp",
14-
"chrono": "cpp",
15-
"functional": "cpp",
16-
"future": "cpp",
17-
"istream": "cpp",
18-
"tuple": "cpp",
19-
"type_traits": "cpp",
20-
"optional": "cpp",
21-
"ratio": "cpp",
22-
"system_error": "cpp",
23-
"atomic": "cpp",
24-
"exception": "cpp",
25-
"list": "cpp",
26-
"unordered_set": "cpp",
27-
"cctype": "cpp",
28-
"clocale": "cpp",
29-
"cmath": "cpp",
30-
"csignal": "cpp",
31-
"cstdarg": "cpp",
32-
"cstddef": "cpp",
33-
"cstdio": "cpp",
34-
"cstdlib": "cpp",
35-
"cstring": "cpp",
36-
"ctime": "cpp",
37-
"cwchar": "cpp",
38-
"cwctype": "cpp",
39-
"strstream": "cpp",
40-
"bitset": "cpp",
41-
"codecvt": "cpp",
42-
"complex": "cpp",
43-
"condition_variable": "cpp",
44-
"cstdint": "cpp",
45-
"fstream": "cpp",
46-
"iomanip": "cpp",
47-
"iosfwd": "cpp",
48-
"iostream": "cpp",
49-
"limits": "cpp",
50-
"memory": "cpp",
51-
"mutex": "cpp",
52-
"new": "cpp",
53-
"ostream": "cpp",
54-
"numeric": "cpp",
55-
"sstream": "cpp",
56-
"stdexcept": "cpp",
57-
"streambuf": "cpp",
58-
"thread": "cpp",
59-
"cinttypes": "cpp",
60-
"typeindex": "cpp",
61-
"__mutex_base": "cpp",
62-
"random": "cpp",
63-
"algorithm": "cpp",
64-
"string": "cpp",
65-
"string_view": "cpp",
66-
"__bit_reference": "cpp",
67-
"__hash_table": "cpp",
68-
"__split_buffer": "cpp",
69-
"__tree": "cpp",
70-
"iterator": "cpp",
71-
"map": "cpp",
72-
"set": "cpp",
73-
"__functional_base": "cpp",
74-
"__functional_base_03": "cpp",
75-
"locale": "cpp",
76-
"memory_resource": "cpp",
77-
"bit": "cpp",
78-
"climits": "cpp",
796
"*.dox": "cpp"
807
},
81-
"files.exclude": {
82-
"**/.git": true,
83-
"**/.svn": true,
84-
"**/.hg": true,
85-
"**/CVS": true,
86-
"**/.DS_Store": true,
87-
},
88-
"editor.dragAndDrop": false,
89-
"editor.formatOnSave": false,
908
"editor.minimap.maxColumn": 80,
919
"editor.minimap.renderCharacters": false,
92-
"editor.quickSuggestions": {
93-
"other": true,
94-
"comments": true,
95-
"strings": true
96-
},
97-
"editor.renderControlCharacters": true,
98-
"editor.renderWhitespace": "boundary",
9910
"editor.rulers": [
10011
80
10112
],
13+
"editor.renderControlCharacters": true,
14+
"editor.renderWhitespace": "boundary",
10215
"files.defaultLanguage": "cpp",
10316
"files.trimFinalNewlines": true,
10417
"files.trimTrailingWhitespace": false,
@@ -109,9 +22,5 @@
10922
"**/docs/Doxygen": true,
11023
"**/docs/Coverage": true
11124
},
112-
"search.smartCase": true,
113-
"C_Cpp.default.cppStandard": "c++14",
114-
"editor.scrollBeyondLastColumn": 0,
115-
"terminal.integrated.cwd": "build",
116-
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json"
25+
"cmake.useCMakePresets": "always",
11726
}

.vscode/tasks.json

Lines changed: 4 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,81 +3,15 @@
33
// for the documentation about the tasks.json format
44
"version": "2.0.0",
55
"tasks": [
6-
// Build tasks :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
76
{
87
"type": "shell",
9-
"label": "Make All",
10-
"command": "make -j$[$(nproc) * 2]",
11-
"options": {
12-
"cwd": "${workspaceFolder}/build",
13-
},
14-
"problemMatcher": "$gcc",
15-
"group": {
16-
"kind": "build",
17-
"isDefault": true,
18-
},
19-
},
20-
{
21-
"type": "shell",
22-
"label": "Clear Build Directory and Run CMake",
23-
"command": "./setup-build.sh \"${workspaceFolder}\"",
24-
"options": {
25-
"cwd": "${workspaceFolder}/scripts",
26-
},
27-
"problemMatcher": [],
28-
},
29-
// Tests :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
30-
{
31-
"type": "shell",
32-
"label": "Make Test",
33-
"command": "make test",
34-
"options": {
35-
"cwd": "${workspaceFolder}/build",
36-
},
37-
"dependsOn": "Make All",
38-
"problemMatcher": "$gcc",
39-
"group": "test",
40-
},
41-
{
42-
"type": "shell",
43-
"label": "Make Check",
44-
"command": "make check",
45-
"options": {
46-
"cwd": "${workspaceFolder}/build",
47-
},
48-
"dependsOn": "Make All",
8+
"label": "Build examples",
9+
"command": "python3 arduino-example-builder.py 'AVR'",
4910
"problemMatcher": "$gcc",
50-
"group": "test",
51-
},
52-
{
53-
"type": "shell",
54-
"label": "Make & Test & Build examples",
55-
"command": "./build-arduino-examples.sh $[$(nproc) * 2]",
56-
"problemMatcher": "$gcc",
57-
"options": {
58-
"cwd": "${workspaceFolder}/scripts",
59-
},
60-
"dependsOn": "Make Test",
61-
"group": "test",
62-
},
63-
// Documentation & Coverage ::::::::::::::::::::::::::::::::::::::::::::
64-
{
65-
"type": "shell",
66-
"label": "Generate Documentation",
67-
"command": "make documentation",
68-
"options": {
69-
"cwd": "${workspaceFolder}/build",
70-
},
71-
"problemMatcher": [],
72-
},
73-
{
74-
"type": "shell",
75-
"label": "Generate Coverage Information",
76-
"command": "make coverage",
7711
"options": {
78-
"cwd": "${workspaceFolder}/build/coverage",
12+
"cwd": "${workspaceFolder}/tools",
7913
},
80-
"problemMatcher": [],
14+
"group": "build",
8115
},
8216
]
8317
}

0 commit comments

Comments
 (0)