-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close #28: Refactor message parsing: Use single-threaded state machin…
…e in place of two-threaded implementation (#29) * [#28] Add googletest * [#28] Fix bug in macro print_dbgmsg * [#28] Log ACK confirmation only if DEBUG mode enabled * [#28] api_report_callback: print dbgmsg if message decoding failed * [#28] Fix incorrect callback ptr checking in 'parse' * Close #28: Refactor messaging parsing: Use single-threaded state machine in place of two-threaded implementation * [#28] Add unit-tests * Add GitHub actions: code-style and googe-tests * [#28] Add GitHub action 'build' * [#28] Fix GitHub actions * [#28] Fix GitHub action 'build' * [#28] Fix GitHub action 'build' * [#28] Increase the stack size for "uart_rx_task" from 2 to 4kB
- Loading branch information
1 parent
3ba8835
commit dd29ebf
Showing
16 changed files
with
708 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
submodules: true | ||
|
||
- name: Checkout submodules | ||
run: git submodule update --init --recursive | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y gcc g++ cmake make ninja-build | ||
sudo apt-get install -y libdbus-1-dev | ||
- name: Run build.sh | ||
run: ./build.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Clang-Format | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
clang-format: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
|
||
- name: Install Clang-Format 14 | ||
run: | | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" | ||
sudo apt-get update | ||
sudo apt-get install -y clang-format-14 | ||
- name: Run clang-format | ||
run: ./clang_format_all.sh | ||
|
||
- name: Check formatting | ||
run: git diff --exit-code --diff-filter=d --color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Google Test | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
google-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Checkout submodules | ||
run: git submodule update --init --recursive | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install -y gcc g++ cmake make ninja-build | ||
sudo apt-get install -y locales | ||
sudo locale-gen de_DE.UTF-8 | ||
- name: Build | ||
run: | | ||
cd tests | ||
mkdir cmake-build-unit-tests | ||
cd cmake-build-unit-tests | ||
cmake -G "Ninja" .. | ||
ninja | ||
- name: Run tests | ||
run: | | ||
cd tests/cmake-build-unit-tests | ||
ctest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "components/ruuvi.endpoints.c"] | ||
path = components/ruuvi.endpoints.c | ||
url = https://github.com/ruuvi/ruuvi.endpoints.c.git | ||
[submodule "tests/googletest"] | ||
path = tests/googletest | ||
url = https://github.com/google/googletest.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.