Skip to content

Commit 3411b43

Browse files
authored
Merge pull request #683 from mcci-catena/issue647
Fix #647: new CI system
2 parents 2e8d26b + 6be147a commit 3411b43

File tree

14 files changed

+489
-464
lines changed

14 files changed

+489
-464
lines changed

.github/workflows/ci-arduinocli.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
##############################################################################
2+
#
3+
# File: ci-arduinocli.yml
4+
#
5+
# Function:
6+
# YAML file specifying how to do continuous integration for Arduino-LMIC
7+
# (using arduino-cli)
8+
#
9+
##############################################################################
10+
11+
# the name that appears in the GitHub UI, the badge, etc
12+
name: Arduino CI
13+
14+
# global environment
15+
env:
16+
MCCI_CI_LIBRARY: arduino-lmic
17+
18+
# specify the events that trigger runs.
19+
on:
20+
# pull requests (default settings)
21+
pull_request:
22+
# pushes (default settings)
23+
push:
24+
# repository operations
25+
repository_dispatch:
26+
schedule:
27+
# do a build once a week at 06:07Z Sunday
28+
- cron: '7 6 * * 0'
29+
30+
# what to do:
31+
jobs:
32+
33+
# define a job named "arduinocli"
34+
arduinocli:
35+
# select a target OS
36+
runs-on: ubuntu-latest
37+
name: ${{ matrix.arch }}
38+
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
arch: [samd, stm32, esp32, avr]
43+
# get info about all the configs.
44+
45+
# step-by-step
46+
steps:
47+
# check out this repo as {root}/arduino-lmic
48+
- uses: actions/checkout@v2
49+
name: Check out the repo
50+
with:
51+
path: libraries/${{ env.MCCI_CI_LIBRARY }}
52+
53+
- uses: actions/checkout@v2
54+
name: Set up mcci-catena-ci
55+
with:
56+
repository: mcci-catena/mcci-catena-ci
57+
path: mcci-catena-ci
58+
59+
- name: "Get library: Adafruit_Sensor"
60+
uses: actions/checkout@v2
61+
with:
62+
repository: adafruit/Adafruit_Sensor
63+
path: libraries/Adafruit_Sensor
64+
65+
- name: "Get library: DHT-sensor-library"
66+
uses: actions/checkout@v2
67+
with:
68+
repository: adafruit/DHT-sensor-library
69+
path: libraries/DHT-sensor-library
70+
71+
- name: "Get library: Time"
72+
uses: actions/checkout@v2
73+
with:
74+
repository: PaulStoffregen/Time
75+
path: libraries/Time
76+
77+
- name: Set up to build
78+
run: bash mcci-catena-ci/setup.sh -l libraries/${{ env.MCCI_CI_LIBRARY }} -a ${{ matrix.arch }}
79+
80+
- name: Display structure of checkout
81+
run: tree -d $(realpath .)
82+
83+
- name: Compile examples
84+
run: bash mcci-catena-ci/arduino-lmic-regress-wrap.sh -l libraries/${{env.MCCI_CI_LIBRARY}} -a ${{ matrix.arch }}
85+
86+
### end of file ###

.travis.yml

Lines changed: 0 additions & 342 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
MIT License
22

33
Copyright (C) 2014-2016 IBM Corporation
4-
Copyright (c) 2016-2019 MCCI Corporation
54
Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman
5+
Copyright (c) 2016-2021 MCCI Corporation
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 62 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ A separate library, [MCCI `arduino-lorawan`](https://github.com/mcci-catena/ardu
1919
This library requires Arduino IDE version 1.6.6 or above, since it
2020
requires C99 mode to be enabled by default.
2121

22-
[![GitHub release](https://img.shields.io/github/release/mcci-catena/arduino-lmic.svg)](https://github.com/mcci-catena/arduino-lmic/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/mcci-catena/arduino-lmic/latest.svg)](https://github.com/mcci-catena/arduino-lmic/compare/v3.3.0...master) [![Build Status](https://travis-ci.com/mcci-catena/arduino-lmic.svg?branch=master)](https://travis-ci.com/mcci-catena/arduino-lmic)
22+
[![GitHub release](https://img.shields.io/github/release/mcci-catena/arduino-lmic.svg)](https://github.com/mcci-catena/arduino-lmic/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/mcci-catena/arduino-lmic/latest.svg)](https://github.com/mcci-catena/arduino-lmic/compare/v3.3.0...master) [![Arduino CI](https://img.shields.io/github/workflow/status/mcci-catena/arduino-lmic/Arduino%20CI)](https://github.com/mcci-catena/arduino-lmic/actions)
2323

2424
**Contents:**
2525

@@ -42,73 +42,73 @@ requires C99 mode to be enabled by default.
4242
- [If you've found a bug](#if-youve-found-a-bug)
4343
- [Features](#features)
4444
- [Additional Documentation](#additional-documentation)
45-
- [PDF/Word Documentation](#pdfword-documentation)
46-
- [Adding Regions](#adding-regions)
47-
- [Known bugs and issues](#known-bugs-and-issues)
48-
- [Timing Issues](#timing-issues)
49-
- [Working with MCCI Murata-based boards](#working-with-mcci-murata-based-boards)
50-
- [Event-Handling Issues](#event-handling-issues)
45+
- [PDF/Word Documentation](#pdfword-documentation)
46+
- [Adding Regions](#adding-regions)
47+
- [Known bugs and issues](#known-bugs-and-issues)
48+
- [Timing Issues](#timing-issues)
49+
- [Working with MCCI Murata-based boards](#working-with-mcci-murata-based-boards)
50+
- [Event-Handling Issues](#event-handling-issues)
5151
- [Configuration](#configuration)
52-
- [Selecting the LoRaWAN Version](#selecting-the-lorawan-version)
53-
- [Selecting V1.0.2](#selecting-v102)
54-
- [Selecting V1.0.3](#selecting-v103)
55-
- [Selecting the LoRaWAN Region Configuration](#selecting-the-lorawan-region-configuration)
56-
- [eu868, as923, in866, kr920](#eu868-as923-in866-kr920)
57-
- [us915, au915](#us915-au915)
58-
- [Selecting the target radio transceiver](#selecting-the-target-radio-transceiver)
59-
- [Controlling use of interrupts](#controlling-use-of-interrupts)
60-
- [Disabling PING](#disabling-ping)
61-
- [Disabling Beacons](#disabling-beacons)
62-
- [Enabling Network Time Support](#enabling-network-time-support)
63-
- [Rarely changed variables](#rarely-changed-variables)
64-
- [Changing debug output](#changing-debug-output)
65-
- [Getting debug from the RF library](#getting-debug-from-the-rf-library)
66-
- [Selecting the AES library](#selecting-the-aes-library)
67-
- [Defining the OS Tick Frequency](#defining-the-os-tick-frequency)
68-
- [Setting the SPI-bus frequency](#setting-the-spi-bus-frequency)
69-
- [Changing handling of runtime assertion failures](#changing-handling-of-runtime-assertion-failures)
70-
- [Disabling JOIN](#disabling-join)
71-
- [Disabling Class A MAC commands](#disabling-class-a-mac-commands)
72-
- [Disabling Class B MAC commands](#disabling-class-b-mac-commands)
73-
- [Disabling user events](#disabling-user-events)
74-
- [Disabling external reference to `onEvent()`](#disabling-external-reference-to-onevent)
75-
- [Enabling long messages](#enabling-long-messages)
76-
- [Enabling LMIC event logging calls](#enabling-lmic-event-logging-calls)
77-
- [Special purpose](#special-purpose)
52+
- [Selecting the LoRaWAN Version](#selecting-the-lorawan-version)
53+
- [Selecting V1.0.2](#selecting-v102)
54+
- [Selecting V1.0.3](#selecting-v103)
55+
- [Selecting the LoRaWAN Region Configuration](#selecting-the-lorawan-region-configuration)
56+
- [eu868, as923, in866, kr920](#eu868-as923-in866-kr920)
57+
- [us915, au915](#us915-au915)
58+
- [Selecting the target radio transceiver](#selecting-the-target-radio-transceiver)
59+
- [Controlling use of interrupts](#controlling-use-of-interrupts)
60+
- [Disabling PING](#disabling-ping)
61+
- [Disabling Beacons](#disabling-beacons)
62+
- [Enabling Network Time Support](#enabling-network-time-support)
63+
- [Rarely changed variables](#rarely-changed-variables)
64+
- [Changing debug output](#changing-debug-output)
65+
- [Getting debug from the RF library](#getting-debug-from-the-rf-library)
66+
- [Selecting the AES library](#selecting-the-aes-library)
67+
- [Defining the OS Tick Frequency](#defining-the-os-tick-frequency)
68+
- [Setting the SPI-bus frequency](#setting-the-spi-bus-frequency)
69+
- [Changing handling of runtime assertion failures](#changing-handling-of-runtime-assertion-failures)
70+
- [Disabling JOIN](#disabling-join)
71+
- [Disabling Class A MAC commands](#disabling-class-a-mac-commands)
72+
- [Disabling Class B MAC commands](#disabling-class-b-mac-commands)
73+
- [Disabling user events](#disabling-user-events)
74+
- [Disabling external reference to `onEvent()`](#disabling-external-reference-to-onevent)
75+
- [Enabling long messages](#enabling-long-messages)
76+
- [Enabling LMIC event logging calls](#enabling-lmic-event-logging-calls)
77+
- [Special purpose](#special-purpose)
7878
- [Supported hardware](#supported-hardware)
7979
- [Pre-Integrated Boards](#pre-integrated-boards)
8080
- [PlatformIO](#platformio)
8181
- [Manual configuration](#manual-configuration)
82-
- [Power](#power)
83-
- [SPI](#spi)
84-
- [DIO pins](#dio-pins)
85-
- [Reset](#reset)
86-
- [RXTX](#rxtx)
87-
- [RXTX Polarity](#rxtx-polarity)
88-
- [Pin mapping](#pin-mapping)
89-
- [Advanced initialization](#advanced-initialization)
90-
- [HalConfiguration_t methods](#halconfiguration_t-methods)
91-
- [LoRa Nexus by Ideetron](#lora-nexus-by-ideetron)
82+
- [Power](#power)
83+
- [SPI](#spi)
84+
- [DIO pins](#dio-pins)
85+
- [Reset](#reset)
86+
- [RXTX](#rxtx)
87+
- [RXTX Polarity](#rxtx-polarity)
88+
- [Pin mapping](#pin-mapping)
89+
- [Advanced initialization](#advanced-initialization)
90+
- [HalConfiguration_t methods](#halconfiguration_t-methods)
91+
- [LoRa Nexus by Ideetron](#lora-nexus-by-ideetron)
9292
- [Example Sketches](#example-sketches)
9393
- [Timing](#timing)
94-
- [Controlling protocol timing](#controlling-protocol-timing)
95-
- [`LMIC_setClockError()`](#lmic_setclockerror)
96-
- [Interrupts and Arduino system timing](#interrupts-and-arduino-system-timing)
94+
- [Controlling protocol timing](#controlling-protocol-timing)
95+
- [`LMIC_setClockError()`](#lmic_setclockerror)
96+
- [Interrupts and Arduino system timing](#interrupts-and-arduino-system-timing)
9797
- [Downlink data rate](#downlink-data-rate)
9898
- [Encoding Utilities](#encoding-utilities)
99-
- [sflt16](#sflt16)
100-
- [JavaScript decoder](#javascript-decoder)
101-
- [uflt16](#uflt16)
102-
- [uflt16 JavaScript decoder](#uflt16-javascript-decoder)
103-
- [sflt12](#sflt12)
104-
- [sflt12f JavaScript decoder](#sflt12f-javascript-decoder)
105-
- [uflt12](#uflt12)
106-
- [uflt12f JavaScript decoder](#uflt12f-javascript-decoder)
99+
- [sflt16](#sflt16)
100+
- [JavaScript decoder](#javascript-decoder)
101+
- [uflt16](#uflt16)
102+
- [uflt16 JavaScript decoder](#uflt16-javascript-decoder)
103+
- [sflt12](#sflt12)
104+
- [sflt12f JavaScript decoder](#sflt12f-javascript-decoder)
105+
- [uflt12](#uflt12)
106+
- [uflt12f JavaScript decoder](#uflt12f-javascript-decoder)
107107
- [Release History](#release-history)
108108
- [Contributions](#contributions)
109109
- [Trademark Acknowledgements](#trademark-acknowledgements)
110110
- [License](#license)
111-
- [Support Open Source Hardware and Software](#support-open-source-hardware-and-software)
111+
- [Support Open Source Hardware and Software](#support-open-source-hardware-and-software)
112112

113113
<!-- /TOC -->
114114
<!-- markdownlint-restore -->
@@ -1238,11 +1238,15 @@ function uflt12f(rawUflt12)
12381238

12391239
## Release History
12401240

1241+
- HEAD has the following changes.
1242+
1243+
- Re-added CI testing, since Travis CI no longer works for us [#647](https://github.com/mcci-catena/arduino-lmic/issues/647); fixed AVR compliance CI compile [#679](https://github.com/mcci-catena/arduino-lmic/issues/679).
1244+
12411245
- v3.3.0 is primarily a maintenance and roll-up release.
12421246

1243-
- Added [LoRaWAN-at-a-glance](doc/LoRaWAN-at-a-glance.pdf) and a [state diagram of the LMIC](doc/LMIC-FSM.pdf).
1244-
- Several PRs from Matthijs Kooijman to improve compatibility with the original Arduino LMIC ([#608](https://github.com/mcci-catena/arduino-lmic/issues/608), [#609](https://github.com/mcci-catena/arduino-lmic/issues/609)).
1245-
- Numerous documentation improvements contributed by the community ([#431](https://github.com/mcci-catena/arduino-lmic/issues/431), [#612](https://github.com/mcci-catena/arduino-lmic/issues/612), [#614](https://github.com/mcci-catena/arduino-lmic/issues/614), [#625](https://github.com/mcci-catena/arduino-lmic/issues/625)).
1247+
- Added [LoRaWAN-at-a-glance](doc/LoRaWAN-at-a-glance.pdf) and a [state diagram of the LMIC](doc/LMIC-FSM.pdf).
1248+
- Several PRs from Matthijs Kooijman to improve compatibility with the original Arduino LMIC ([#608](https://github.com/mcci-catena/arduino-lmic/issues/608), [#609](https://github.com/mcci-catena/arduino-lmic/issues/609)).
1249+
- Numerous documentation improvements contributed by the community ([#431](https://github.com/mcci-catena/arduino-lmic/issues/431), [#612](https://github.com/mcci-catena/arduino-lmic/issues/612), [#614](https://github.com/mcci-catena/arduino-lmic/issues/614), [#625](https://github.com/mcci-catena/arduino-lmic/issues/625)).
12461250

12471251
- v3.2.0 has the following changes:
12481252

ci/lmic-filter-common.sh

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/bin/bash
2+
3+
##############################################################################
4+
#
5+
# Module: lmic-filter-common.sh
6+
#
7+
# Function:
8+
# This script must be sourced; it sets variables used by other
9+
# scripts in this directory.
10+
#
11+
# Usage:
12+
# source ci/lmic-filter.sh
13+
#
14+
# Copyright and License:
15+
# See accompanying LICENSE.md file
16+
#
17+
# Author:
18+
# Terry Moore, MCCI February 2021
19+
#
20+
##############################################################################
21+
22+
#### Capture the file path ####
23+
MCCI_THISFILE="$0"
24+
25+
#### mandatory function: do the filtering
26+
function _lmic_filter {
27+
declare -r CMD="$1"
28+
shift
29+
case "$CMD" in
30+
31+
# return 0 (success) if should process this sketch.
32+
"process")
33+
case "$MCCI_CI_ARCH:$(basename "$1")" in
34+
# we need to skip this sketch until the SAMD
35+
# bsp is updated; the Time library uses prog_read_ptr()
36+
# which is broken in v2.3.0
37+
"samd:ttn-otaa-network-time.ino")
38+
return 1
39+
;;
40+
# some of the feather sketches fail on non-Feathers
41+
"esp32:raw-feather.ino" | \
42+
"esp32:ttn-otaa-feather-us915.ino")
43+
return 1
44+
;;
45+
# some of the feather sketches fail on non-Feathers
46+
"stm32:raw-feather.ino" | \
47+
"stm32:ttn-otaa-feather-us915.ino")
48+
return 1
49+
;;
50+
*)
51+
return 0
52+
;;
53+
esac
54+
;;
55+
56+
# print 1 if must use projcfg; 0 if not forced.
57+
"use-projcfg")
58+
if [[ "$MCCI_CI_ARCH" = "avr" ]]; then
59+
echo 1
60+
else
61+
echo 0
62+
fi
63+
;;
64+
65+
# call the suitable flavor of _projcfg.
66+
"projcfg")
67+
declare -r LMIC_FILTER_SKETCH="$1"
68+
_debug _lmic_filter: LMIC_FILTER_SKETCH="$LMIC_FILTER_SKETCH"
69+
shift
70+
if [[ "$MCCI_CI_ARCH" = "avr" ]]; then
71+
_projcfg_class_a "$@"
72+
else
73+
_projcfg "$@"
74+
fi
75+
;;
76+
*)
77+
_error "_lmic_filter: unknown command:" "$@"
78+
;;
79+
esac
80+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
##############################################################################
4+
#
5+
# Module: compliance-otaa-halconfig/extra/ci/lmic-filter.sh
6+
#
7+
# Function:
8+
# This script must be sourced; it sets variables used by other
9+
# scripts in this directory.
10+
#
11+
# Usage:
12+
# source ci/lmic-filter.sh
13+
#
14+
# Copyright and License:
15+
# See accompanying LICENSE.md file
16+
#
17+
# Author:
18+
# Terry Moore, MCCI February 2021
19+
#
20+
##############################################################################
21+
22+
#### use the common code.
23+
# shellcheck source=../../../../ci/lmic-filter-common.sh
24+
source "$(dirname "$MCCI_CI_FILTER_NAME")"/../../../../ci/lmic-filter-common.sh
25+
26+
#### end of file ####

0 commit comments

Comments
 (0)