Skip to content

Commit

Permalink
Merge pull request #9 from GUVWAF/CI
Browse files Browse the repository at this point in the history
New CI working for Arduino UNO R4 and ESP8266
  • Loading branch information
GUVWAF authored Sep 26, 2023
2 parents ae0833a + 53f64db commit 6608c27
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .arduino-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
only_boards:
- esp8266:esp8266:generic
- arduino:renesas_uno:unor4wifi
library_archives:
- Nanopb=https://github.com/nanopb/nanopb/archive/refs/tags/0.4.7.tar.gz=17yaz3sn0fjhxbhjy27hc2960d4h4j4m5xvxqv3psbpi0r8w82hj
29 changes: 15 additions & 14 deletions .github/workflows/build_arduino.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: Build Arduino

name: "CI"
on:
pull_request:
push:
branches: [ master ]
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
ci:
runs-on: ubuntu-20.04
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Arduino CI
uses: Arduino-CI/[email protected]
env:
EXPECT_EXAMPLES: true
EXPECT_UNITTESTS: false
- name: Checkout this repository
uses: actions/checkout@v2
- name: Cache for arduino-ci
uses: actions/cache@v2
with:
path: |
~/.arduino15
key: ${{ runner.os }}-arduino
- name: Install nix
uses: cachix/install-nix-action@v12
- run: nix-shell -I nixpkgs=channel:nixpkgs-unstable -p arduino-ci --run "arduino-ci"
33 changes: 33 additions & 0 deletions .github/workflows/update_protobufs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Update protobufs and regenerate classes"
on: workflow_dispatch

jobs:
update-protobufs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true

- name: Update submodule
run: |
git submodule update --remote protobufs
- name: Download nanopb
run: |
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.7-linux-x86.tar.gz
tar xvzf nanopb-0.4.7-linux-x86.tar.gz
mv nanopb-0.4.7-linux-x86 nanopb-0.4.7
- name: Re-generate protocol buffers
run: |
./bin/regen-protos.sh
- name: Create pull request
uses: peter-evans/create-pull-request@v3
with:
add-paths: |
protobufs
src/
6 changes: 3 additions & 3 deletions examples/SendReceiveClient/SendReceiveClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
// A different baud rate to communicate with the Meshtastic device can be specified here
#define BAUD_RATE 9600

// Send a text message every this many msec
#define SEND_PERIOD (300 * 1000)
// Send a text message every this many seconds
#define SEND_PERIOD 300

uint32_t next_send_time = 0;

Expand Down Expand Up @@ -89,6 +89,6 @@ void loop() {

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

next_send_time = now + SEND_PERIOD;
next_send_time = now + SEND_PERIOD * 1000;
}
}

0 comments on commit 6608c27

Please sign in to comment.