Skip to content

Commit 53f64db

Browse files
committed
New CI working for Arduino UNO R4 and ESP8266
1 parent 46f74dc commit 53f64db

File tree

4 files changed

+56
-17
lines changed

4 files changed

+56
-17
lines changed

.arduino-ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
only_boards:
2+
- esp8266:esp8266:generic
3+
- arduino:renesas_uno:unor4wifi
4+
library_archives:
5+
- Nanopb=https://github.com/nanopb/nanopb/archive/refs/tags/0.4.7.tar.gz=17yaz3sn0fjhxbhjy27hc2960d4h4j4m5xvxqv3psbpi0r8w82hj
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
name: Build Arduino
2-
1+
name: "CI"
32
on:
3+
pull_request:
44
push:
5-
branches: [ master ]
6-
workflow_dispatch:
7-
85
jobs:
9-
lint:
10-
runs-on: ubuntu-latest
6+
ci:
7+
runs-on: ubuntu-20.04
118
steps:
12-
- name: Check out repository
13-
uses: actions/checkout@v2
14-
- name: Arduino CI
15-
uses: Arduino-CI/action@v0.1.6
16-
env:
17-
EXPECT_EXAMPLES: true
18-
EXPECT_UNITTESTS: false
9+
- name: Checkout this repository
10+
uses: actions/checkout@v2
11+
- name: Cache for arduino-ci
12+
uses: actions/cache@v2
13+
with:
14+
path: |
15+
~/.arduino15
16+
key: ${{ runner.os }}-arduino
17+
- name: Install nix
18+
uses: cachix/install-nix-action@v12
19+
- run: nix-shell -I nixpkgs=channel:nixpkgs-unstable -p arduino-ci --run "arduino-ci"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Update protobufs and regenerate classes"
2+
on: workflow_dispatch
3+
4+
jobs:
5+
update-protobufs:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v3
11+
with:
12+
submodules: true
13+
14+
- name: Update submodule
15+
run: |
16+
git submodule update --remote protobufs
17+
18+
- name: Download nanopb
19+
run: |
20+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.7-linux-x86.tar.gz
21+
tar xvzf nanopb-0.4.7-linux-x86.tar.gz
22+
mv nanopb-0.4.7-linux-x86 nanopb-0.4.7
23+
24+
- name: Re-generate protocol buffers
25+
run: |
26+
./bin/regen-protos.sh
27+
28+
- name: Create pull request
29+
uses: peter-evans/create-pull-request@v3
30+
with:
31+
add-paths: |
32+
protobufs
33+
src/

examples/SendReceiveClient/SendReceiveClient.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
// A different baud rate to communicate with the Meshtastic device can be specified here
2626
#define BAUD_RATE 9600
2727

28-
// Send a text message every this many msec
29-
#define SEND_PERIOD (300 * 1000)
28+
// Send a text message every this many seconds
29+
#define SEND_PERIOD 300
3030

3131
uint32_t next_send_time = 0;
3232

@@ -89,6 +89,6 @@ void loop() {
8989

9090
mt_send_text("Hello, world!", dest, channel_index);
9191

92-
next_send_time = now + SEND_PERIOD;
92+
next_send_time = now + SEND_PERIOD * 1000;
9393
}
9494
}

0 commit comments

Comments
 (0)