forked from things-nyc/arduino-lmic
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #683 from mcci-catena/issue647
Fix #647: new CI system
- Loading branch information
Showing
14 changed files
with
489 additions
and
464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ### |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
26
examples/compliance-otaa-halconfig/extra/ci/lmic-filter.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 #### |
Oops, something went wrong.