Skip to content

Commit fb72986

Browse files
committed
Updated the test yaml to use pure cmake commands. Updated the README to reflect how to build.
1 parent cb415c7 commit fb72986

3 files changed

Lines changed: 17 additions & 24 deletions

File tree

‎.github/workflows/tests.yml‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@ jobs:
2222
run: cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -Bbuild -H.
2323

2424
- name: Build the library
25-
run: |
26-
cd build
27-
make -j$(nproc)
25+
run: cmake --build build
2826

2927
- name: Run unit tests
30-
run: |
31-
cd build
32-
ctest --output-on-failure
28+
run: ctest --output-on-failure --test-dir build
3329

3430
format-check:
3531
runs-on: ubuntu-latest

‎.gitignore‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Build folders
22
bin/
33
build/
4+
Testing/
45

56
# -- Git -- #
67
*.bak
@@ -15,4 +16,5 @@ __pycache__/
1516
*.sublime-*
1617

1718
# -- Static Analyzers -- #
18-
.cache/
19+
.cache/
20+

‎README.md‎

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,6 @@ This is to provide a library header only file to read in DBC files. I was lookin
44
find a simple library that didn't have dependencies. So here we are making one. I got some inspiration
55
from the python dbc library here: https://pypi.org/project/cantools/
66

7-
## Testing
8-
9-
I am trying to always make sure that this is very well tested code. I am using Catch2 to do this
10-
testing and if you aren't familiar here is the documentation: https://github.com/catchorg/Catch2/blob/master/docs/Readme.md#top
11-
12-
To run the tests locally you can use the following:
13-
```bash
14-
mkdir build
15-
cd build
16-
cmake ..
17-
make test -j
18-
```
19-
207
## Building
218

229
I am using Cmake to be able to build the tests and the lib. I plan on doing more with it but this is what it
@@ -26,10 +13,18 @@ needs. Feel free to submit changes so the building process will be more robust.
2613

2714
Here are the steps to get started:
2815
```bash
29-
mkdir build
30-
cd build
31-
cmake ..
32-
make
16+
cmake -DCMAKE_BUILD_TYPE=Release -Bbuild -H.
17+
cmake --build build
18+
```
19+
20+
## Testing
21+
22+
I am trying to always make sure that this is very well tested code. I am using Catch2 to do this
23+
testing and if you aren't familiar here is the documentation: https://github.com/catchorg/Catch2/blob/master/docs/Readme.md#top
24+
25+
To run the tests locally you can use the following. Assuming you have built the project you should get a test executable.
26+
```bash
27+
ctest --output-on-failure --test-dir build
3328
```
3429

3530
## Scripts

0 commit comments

Comments
 (0)