Skip to content

Commit

Permalink
Merge pull request #683 from mcci-catena/issue647
Browse files Browse the repository at this point in the history
Fix #647: new CI system
  • Loading branch information
terrillmoore authored Feb 23, 2021
2 parents 2e8d26b + 6be147a commit 3411b43
Show file tree
Hide file tree
Showing 14 changed files with 489 additions and 464 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/ci-arduinocli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
##############################################################################
#
# File: ci-arduinocli.yml
#
# Function:
# YAML file specifying how to do continuous integration for Arduino-LMIC
# (using arduino-cli)
#
##############################################################################

# the name that appears in the GitHub UI, the badge, etc
name: Arduino CI

# global environment
env:
MCCI_CI_LIBRARY: arduino-lmic

# specify the events that trigger runs.
on:
# pull requests (default settings)
pull_request:
# pushes (default settings)
push:
# repository operations
repository_dispatch:
schedule:
# do a build once a week at 06:07Z Sunday
- cron: '7 6 * * 0'

# what to do:
jobs:

# define a job named "arduinocli"
arduinocli:
# select a target OS
runs-on: ubuntu-latest
name: ${{ matrix.arch }}

strategy:
fail-fast: false
matrix:
arch: [samd, stm32, esp32, avr]
# get info about all the configs.

# step-by-step
steps:
# check out this repo as {root}/arduino-lmic
- uses: actions/checkout@v2
name: Check out the repo
with:
path: libraries/${{ env.MCCI_CI_LIBRARY }}

- uses: actions/checkout@v2
name: Set up mcci-catena-ci
with:
repository: mcci-catena/mcci-catena-ci
path: mcci-catena-ci

- name: "Get library: Adafruit_Sensor"
uses: actions/checkout@v2
with:
repository: adafruit/Adafruit_Sensor
path: libraries/Adafruit_Sensor

- name: "Get library: DHT-sensor-library"
uses: actions/checkout@v2
with:
repository: adafruit/DHT-sensor-library
path: libraries/DHT-sensor-library

- name: "Get library: Time"
uses: actions/checkout@v2
with:
repository: PaulStoffregen/Time
path: libraries/Time

- name: Set up to build
run: bash mcci-catena-ci/setup.sh -l libraries/${{ env.MCCI_CI_LIBRARY }} -a ${{ matrix.arch }}

- name: Display structure of checkout
run: tree -d $(realpath .)

- name: Compile examples
run: bash mcci-catena-ci/arduino-lmic-regress-wrap.sh -l libraries/${{env.MCCI_CI_LIBRARY}} -a ${{ matrix.arch }}

### end of file ###
342 changes: 0 additions & 342 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
MIT License

Copyright (C) 2014-2016 IBM Corporation
Copyright (c) 2016-2019 MCCI Corporation
Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman
Copyright (c) 2016-2021 MCCI Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
120 changes: 62 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A separate library, [MCCI `arduino-lorawan`](https://github.com/mcci-catena/ardu
This library requires Arduino IDE version 1.6.6 or above, since it
requires C99 mode to be enabled by default.

[![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)
[![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)

**Contents:**

Expand All @@ -42,73 +42,73 @@ requires C99 mode to be enabled by default.
- [If you've found a bug](#if-youve-found-a-bug)
- [Features](#features)
- [Additional Documentation](#additional-documentation)
- [PDF/Word Documentation](#pdfword-documentation)
- [Adding Regions](#adding-regions)
- [Known bugs and issues](#known-bugs-and-issues)
- [Timing Issues](#timing-issues)
- [Working with MCCI Murata-based boards](#working-with-mcci-murata-based-boards)
- [Event-Handling Issues](#event-handling-issues)
- [PDF/Word Documentation](#pdfword-documentation)
- [Adding Regions](#adding-regions)
- [Known bugs and issues](#known-bugs-and-issues)
- [Timing Issues](#timing-issues)
- [Working with MCCI Murata-based boards](#working-with-mcci-murata-based-boards)
- [Event-Handling Issues](#event-handling-issues)
- [Configuration](#configuration)
- [Selecting the LoRaWAN Version](#selecting-the-lorawan-version)
- [Selecting V1.0.2](#selecting-v102)
- [Selecting V1.0.3](#selecting-v103)
- [Selecting the LoRaWAN Region Configuration](#selecting-the-lorawan-region-configuration)
- [eu868, as923, in866, kr920](#eu868-as923-in866-kr920)
- [us915, au915](#us915-au915)
- [Selecting the target radio transceiver](#selecting-the-target-radio-transceiver)
- [Controlling use of interrupts](#controlling-use-of-interrupts)
- [Disabling PING](#disabling-ping)
- [Disabling Beacons](#disabling-beacons)
- [Enabling Network Time Support](#enabling-network-time-support)
- [Rarely changed variables](#rarely-changed-variables)
- [Changing debug output](#changing-debug-output)
- [Getting debug from the RF library](#getting-debug-from-the-rf-library)
- [Selecting the AES library](#selecting-the-aes-library)
- [Defining the OS Tick Frequency](#defining-the-os-tick-frequency)
- [Setting the SPI-bus frequency](#setting-the-spi-bus-frequency)
- [Changing handling of runtime assertion failures](#changing-handling-of-runtime-assertion-failures)
- [Disabling JOIN](#disabling-join)
- [Disabling Class A MAC commands](#disabling-class-a-mac-commands)
- [Disabling Class B MAC commands](#disabling-class-b-mac-commands)
- [Disabling user events](#disabling-user-events)
- [Disabling external reference to `onEvent()`](#disabling-external-reference-to-onevent)
- [Enabling long messages](#enabling-long-messages)
- [Enabling LMIC event logging calls](#enabling-lmic-event-logging-calls)
- [Special purpose](#special-purpose)
- [Selecting the LoRaWAN Version](#selecting-the-lorawan-version)
- [Selecting V1.0.2](#selecting-v102)
- [Selecting V1.0.3](#selecting-v103)
- [Selecting the LoRaWAN Region Configuration](#selecting-the-lorawan-region-configuration)
- [eu868, as923, in866, kr920](#eu868-as923-in866-kr920)
- [us915, au915](#us915-au915)
- [Selecting the target radio transceiver](#selecting-the-target-radio-transceiver)
- [Controlling use of interrupts](#controlling-use-of-interrupts)
- [Disabling PING](#disabling-ping)
- [Disabling Beacons](#disabling-beacons)
- [Enabling Network Time Support](#enabling-network-time-support)
- [Rarely changed variables](#rarely-changed-variables)
- [Changing debug output](#changing-debug-output)
- [Getting debug from the RF library](#getting-debug-from-the-rf-library)
- [Selecting the AES library](#selecting-the-aes-library)
- [Defining the OS Tick Frequency](#defining-the-os-tick-frequency)
- [Setting the SPI-bus frequency](#setting-the-spi-bus-frequency)
- [Changing handling of runtime assertion failures](#changing-handling-of-runtime-assertion-failures)
- [Disabling JOIN](#disabling-join)
- [Disabling Class A MAC commands](#disabling-class-a-mac-commands)
- [Disabling Class B MAC commands](#disabling-class-b-mac-commands)
- [Disabling user events](#disabling-user-events)
- [Disabling external reference to `onEvent()`](#disabling-external-reference-to-onevent)
- [Enabling long messages](#enabling-long-messages)
- [Enabling LMIC event logging calls](#enabling-lmic-event-logging-calls)
- [Special purpose](#special-purpose)
- [Supported hardware](#supported-hardware)
- [Pre-Integrated Boards](#pre-integrated-boards)
- [PlatformIO](#platformio)
- [Manual configuration](#manual-configuration)
- [Power](#power)
- [SPI](#spi)
- [DIO pins](#dio-pins)
- [Reset](#reset)
- [RXTX](#rxtx)
- [RXTX Polarity](#rxtx-polarity)
- [Pin mapping](#pin-mapping)
- [Advanced initialization](#advanced-initialization)
- [HalConfiguration_t methods](#halconfiguration_t-methods)
- [LoRa Nexus by Ideetron](#lora-nexus-by-ideetron)
- [Power](#power)
- [SPI](#spi)
- [DIO pins](#dio-pins)
- [Reset](#reset)
- [RXTX](#rxtx)
- [RXTX Polarity](#rxtx-polarity)
- [Pin mapping](#pin-mapping)
- [Advanced initialization](#advanced-initialization)
- [HalConfiguration_t methods](#halconfiguration_t-methods)
- [LoRa Nexus by Ideetron](#lora-nexus-by-ideetron)
- [Example Sketches](#example-sketches)
- [Timing](#timing)
- [Controlling protocol timing](#controlling-protocol-timing)
- [`LMIC_setClockError()`](#lmic_setclockerror)
- [Interrupts and Arduino system timing](#interrupts-and-arduino-system-timing)
- [Controlling protocol timing](#controlling-protocol-timing)
- [`LMIC_setClockError()`](#lmic_setclockerror)
- [Interrupts and Arduino system timing](#interrupts-and-arduino-system-timing)
- [Downlink data rate](#downlink-data-rate)
- [Encoding Utilities](#encoding-utilities)
- [sflt16](#sflt16)
- [JavaScript decoder](#javascript-decoder)
- [uflt16](#uflt16)
- [uflt16 JavaScript decoder](#uflt16-javascript-decoder)
- [sflt12](#sflt12)
- [sflt12f JavaScript decoder](#sflt12f-javascript-decoder)
- [uflt12](#uflt12)
- [uflt12f JavaScript decoder](#uflt12f-javascript-decoder)
- [sflt16](#sflt16)
- [JavaScript decoder](#javascript-decoder)
- [uflt16](#uflt16)
- [uflt16 JavaScript decoder](#uflt16-javascript-decoder)
- [sflt12](#sflt12)
- [sflt12f JavaScript decoder](#sflt12f-javascript-decoder)
- [uflt12](#uflt12)
- [uflt12f JavaScript decoder](#uflt12f-javascript-decoder)
- [Release History](#release-history)
- [Contributions](#contributions)
- [Trademark Acknowledgements](#trademark-acknowledgements)
- [License](#license)
- [Support Open Source Hardware and Software](#support-open-source-hardware-and-software)
- [Support Open Source Hardware and Software](#support-open-source-hardware-and-software)

<!-- /TOC -->
<!-- markdownlint-restore -->
Expand Down Expand Up @@ -1238,11 +1238,15 @@ function uflt12f(rawUflt12)

## Release History

- HEAD has the following changes.

- 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).

- v3.3.0 is primarily a maintenance and roll-up release.

- Added [LoRaWAN-at-a-glance](doc/LoRaWAN-at-a-glance.pdf) and a [state diagram of the LMIC](doc/LMIC-FSM.pdf).
- 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)).
- 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)).
- Added [LoRaWAN-at-a-glance](doc/LoRaWAN-at-a-glance.pdf) and a [state diagram of the LMIC](doc/LMIC-FSM.pdf).
- 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)).
- 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)).

- v3.2.0 has the following changes:

Expand Down
80 changes: 80 additions & 0 deletions ci/lmic-filter-common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/bin/bash

##############################################################################
#
# Module: lmic-filter-common.sh
#
# Function:
# This script must be sourced; it sets variables used by other
# scripts in this directory.
#
# Usage:
# source ci/lmic-filter.sh
#
# Copyright and License:
# See accompanying LICENSE.md file
#
# Author:
# Terry Moore, MCCI February 2021
#
##############################################################################

#### Capture the file path ####
MCCI_THISFILE="$0"

#### mandatory function: do the filtering
function _lmic_filter {
declare -r CMD="$1"
shift
case "$CMD" in

# return 0 (success) if should process this sketch.
"process")
case "$MCCI_CI_ARCH:$(basename "$1")" in
# we need to skip this sketch until the SAMD
# bsp is updated; the Time library uses prog_read_ptr()
# which is broken in v2.3.0
"samd:ttn-otaa-network-time.ino")
return 1
;;
# some of the feather sketches fail on non-Feathers
"esp32:raw-feather.ino" | \
"esp32:ttn-otaa-feather-us915.ino")
return 1
;;
# some of the feather sketches fail on non-Feathers
"stm32:raw-feather.ino" | \
"stm32:ttn-otaa-feather-us915.ino")
return 1
;;
*)
return 0
;;
esac
;;

# print 1 if must use projcfg; 0 if not forced.
"use-projcfg")
if [[ "$MCCI_CI_ARCH" = "avr" ]]; then
echo 1
else
echo 0
fi
;;

# call the suitable flavor of _projcfg.
"projcfg")
declare -r LMIC_FILTER_SKETCH="$1"
_debug _lmic_filter: LMIC_FILTER_SKETCH="$LMIC_FILTER_SKETCH"
shift
if [[ "$MCCI_CI_ARCH" = "avr" ]]; then
_projcfg_class_a "$@"
else
_projcfg "$@"
fi
;;
*)
_error "_lmic_filter: unknown command:" "$@"
;;
esac
}
26 changes: 26 additions & 0 deletions examples/compliance-otaa-halconfig/extra/ci/lmic-filter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

##############################################################################
#
# Module: compliance-otaa-halconfig/extra/ci/lmic-filter.sh
#
# Function:
# This script must be sourced; it sets variables used by other
# scripts in this directory.
#
# Usage:
# source ci/lmic-filter.sh
#
# Copyright and License:
# See accompanying LICENSE.md file
#
# Author:
# Terry Moore, MCCI February 2021
#
##############################################################################

#### use the common code.
# shellcheck source=../../../../ci/lmic-filter-common.sh
source "$(dirname "$MCCI_CI_FILTER_NAME")"/../../../../ci/lmic-filter-common.sh

#### end of file ####
Loading

0 comments on commit 3411b43

Please sign in to comment.