Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6a54e17

Browse files
Merge pull request #118 from arduino-libraries/ota
Firmware Over-The-Air (OTA) update capability
2 parents e888adb + 50927c8 commit 6a54e17

38 files changed

+28601
-36
lines changed

‎.github/workflows/compile-examples.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
# WiFi boards
4242
- board:
4343
type: "wifi"
44-
libraries: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "WiFi101" "WiFiNINA"'
44+
libraries: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "WiFi101" "WiFiNINA" "Arduino_MKRMEM"'
4545
sketch-paths: '"examples/utility/Provisioning" "examples/utility/WiFi_Cloud_Blink"'
4646
# LoRaWAN boards
4747
- board:
@@ -51,12 +51,12 @@ jobs:
5151
# GSM boards
5252
- board:
5353
type: "gsm"
54-
libraries: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "MKRGSM"'
54+
libraries: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "MKRGSM" "Arduino_MKRMEM"'
5555
sketch-paths: '"examples/utility/Provisioning" "examples/utility/GSM_Cloud_Blink"'
5656
# NB boards
5757
- board:
5858
type: "nb"
59-
libraries: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "MKRNB"'
59+
libraries: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "MKRNB" "Arduino_MKRMEM"'
6060
sketch-paths: '"examples/utility/Provisioning" "examples/utility/NB_Cloud_Blink"'
6161
# ESP8266 boards
6262
- board:

‎.github/workflows/spell-check.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ jobs:
1414
uses: arduino/actions/libraries/spell-check@master
1515
with:
1616
ignore-words-list: extras/codespell-ignore-words-list.txt
17+
skip-paths: ./extras/test/external

‎.github/workflows/unit-tests.yml‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Unit Tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/unit-tests.yml"
7+
- 'extras/test/**'
8+
- 'src/**'
9+
10+
push:
11+
paths:
12+
- ".github/workflows/unit-tests.yml"
13+
- 'extras/test/**'
14+
- 'src/**'
15+
16+
jobs:
17+
test:
18+
name: Run unit tests
19+
runs-on: ubuntu-latest
20+
21+
env:
22+
BUILD_PATH: "${{ github.workspace }}/extras/test/build"
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
28+
- name: Run unit tests
29+
run: |
30+
mkdir "$BUILD_PATH"
31+
cd "$BUILD_PATH"
32+
cmake ..
33+
make
34+
bin/testArduinoIoTCloud
35+
36+
- name: Check code coverage
37+
run: |
38+
cd "$BUILD_PATH"
39+
sudo apt-get --assume-yes install lcov > /dev/null
40+
lcov --directory . --capture --output-file coverage.info
41+
lcov --quiet --remove coverage.info '*/extras/test/*' '/usr/*' --output-file coverage.info
42+
lcov --list coverage.info
43+
44+
- name: Upload coverage report to Codecov
45+
uses: codecov/codecov-action@v1
46+
with:
47+
file: "${{ env.BUILD_PATH }}/coverage.info"
48+
fail_ci_if_error: true

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
*~
44
.vscode
55
*.orig
6-
.vs
6+
.vs
7+
build

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
=================
33
[![Compile Examples](https://github.com/arduino-libraries/ArduinoIoTCloud/workflows/Compile%20Examples/badge.svg)](https://github.com/arduino-libraries/ArduinoIoTCloud/actions?workflow=Compile+Examples)
44
[![Spell Check](https://github.com/arduino-libraries/ArduinoIoTCloud/workflows/Spell%20Check/badge.svg)](https://github.com/arduino-libraries/ArduinoIoTCloud/actions?workflow=Spell+Check)
5+
[![Unit Tests](https://github.com/arduino-libraries/ArduinoIoTCloud/workflows/Unit%20Tests/badge.svg)](https://github.com/arduino-libraries/ArduinoIoTCloud/actions?workflow=Unit+Tests)
6+
[![codecov](https://codecov.io/gh/arduino-libraries/ArduinoIoTCloud/branch/master/graph/badge.svg)](https://codecov.io/gh/arduino-libraries/ArduinoIoTCloud)
57

68
### What?
79
The `ArduinoIoTCloud` library is the central element of the firmware enabling certain Arduino boards to connect to the [Arduino IoT Cloud](https://www.arduino.cc/en/IoT/HomePage). The following boards are supported:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
wan
2+
nd
3+
atleast
4+
derrived
5+
aline
6+
anid

‎extras/test/CMakeLists.txt‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
##########################################################################
2+
3+
cmake_minimum_required(VERSION 2.8)
4+
5+
##########################################################################
6+
7+
project(testArduinoIoTCloud)
8+
9+
##########################################################################
10+
11+
include_directories(include)
12+
include_directories(../../src/utility/ota)
13+
include_directories(external/catch/v2.12.1/include)
14+
include_directories(external/fakeit/v2.0.5/include)
15+
16+
##########################################################################
17+
18+
set(CMAKE_CXX_STANDARD 11)
19+
20+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
21+
22+
##########################################################################
23+
24+
set(TEST_TARGET testArduinoIoTCloud)
25+
26+
set(TEST_SRCS
27+
src/test_main.cpp
28+
src/test_OTALogic.cpp
29+
src/OTATestData.cpp
30+
../../src/utility/ota/crc.cpp
31+
../../src/utility/ota/OTALogic.cpp
32+
)
33+
34+
##########################################################################
35+
36+
add_compile_definitions(HOST)
37+
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
38+
39+
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "--coverage")
40+
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "--coverage")
41+
42+
##########################################################################
43+
44+
add_executable(
45+
${TEST_TARGET}
46+
${TEST_SRCS}
47+
)
48+
49+
##########################################################################
50+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /