Skip to content

Commit

Permalink
Different build matrix
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
  • Loading branch information
SRGDamia1 committed Feb 10, 2021
1 parent 93901d0 commit 5b9040c
Show file tree
Hide file tree
Showing 9 changed files with 654 additions and 519 deletions.
73 changes: 2 additions & 71 deletions .github/workflows/build_examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ jobs:
[
examples/single_sensor/,
examples/simple_logging/,
examples/simple_logging_LearnEnviroDIY/,
examples/DRWI_CitSci/,
examples/DRWI_LTE/,
examples/DRWI_NoCellular/,
examples/double_logger/,
examples/baro_rho_correction/,
examples/data_saving/,
examples/logging_to_MMW/,
examples/logging_to_ThingSpeak/,
examples/menu_a_la_carte/,
]

steps:
Expand Down Expand Up @@ -53,76 +54,6 @@ jobs:
python -m pip install --upgrade pip
pip install --upgrade platformio
# Install *all* the dependencies!
- name: Install the dependencies at global level
run: |
echo "::debug::Installing envirodiy/EnviroDIY_DS3231"
pio lib -g install envirodiy/EnviroDIY_DS3231
echo "::debug::Installing arduino-libraries/RTCZero"
pio lib -g install arduino-libraries/RTCZero
echo "::debug::Installing greygnome/EnableInterrupt"
pio lib -g install greygnome/EnableInterrupt
echo "::debug::Installing greiman/SdFat"
pio lib -g install greiman/SdFat
echo "::debug::Installing vshymanskyy/TinyGSM"
pio lib -g install vshymanskyy/TinyGSM
echo "::debug::Installing knolleary/PubSubClient"
pio lib -g install knolleary/PubSubClient
echo "::debug::Installing adafruit/'Adafruit BusIO'"
pio lib -g install adafruit/'Adafruit BusIO'
echo "::debug::Installing adafruit/'Adafruit Unified Sensor'"
pio lib -g install adafruit/'Adafruit Unified Sensor'
echo "::debug::Installing https://github.com/soligen2010/Adafruit_ADS1X15.git"
pio lib -g install https://github.com/soligen2010/Adafruit_ADS1X15.git
echo "::debug::Installing adafruit/'Adafruit AM2315'"
pio lib -g install adafruit/'Adafruit AM2315'
echo "::debug::Installing adafruit/'Adafruit BME280 Library'"
pio lib -g install adafruit/'Adafruit BME280 Library'
echo "::debug::Installing adafruit/'DHT sensor library'"
pio lib -g install adafruit/'DHT sensor library'
echo "::debug::Installing adafruit/'Adafruit INA219'"
pio lib -g install adafruit/'Adafruit INA219'
echo "::debug::Installing adafruit/'Adafruit MPL115A2'"
pio lib -g install adafruit/'Adafruit MPL115A2'
echo "::debug::Installing paulstoffregen/OneWire"
pio lib -g install paulstoffregen/OneWire
echo "::debug::Installing milesburton/DallasTemperature"
pio lib -g install milesburton/DallasTemperature
echo "::debug::Installing envirodiy/SDI-12"
pio lib -g install envirodiy/SDI-12
echo "::debug::Installing northernwidget/MS5803"
pio lib -g install northernwidget/MS5803
echo "::debug::Installing https://github.com/NorthernWidget-Skunkworks/Tally_Library.git#Dev_I2C"
pio lib -g install https://github.com/NorthernWidget-Skunkworks/Tally_Library.git#Dev_I2C
echo "::debug::Installing envirodiy/SensorModbusMaster"
pio lib -g install envirodiy/SensorModbusMaster
echo "::debug::Installing envirodiy/KellerModbus"
pio lib -g install envirodiy/KellerModbus
echo "::debug::Installing envirodiy/YosemitechModbus"
pio lib -g install envirodiy/YosemitechModbus
echo "::debug::Installing vshymanskyy/StreamDebugger"
pio lib -g install vshymanskyy/StreamDebugger
echo "::debug::Installing https://github.com/EnviroDIY/SoftwareSerial_ExternalInts.git"
pio lib -g install https://github.com/EnviroDIY/SoftwareSerial_ExternalInts.git
echo "::debug::Installing https://github.com/PaulStoffregen/AltSoftSerial.git"
pio lib -g install https://github.com/PaulStoffregen/AltSoftSerial.git
echo "::debug::Installing https://github.com/SRGDamia1/NeoSWSerial.git"
pio lib -g install https://github.com/SRGDamia1/NeoSWSerial.git
echo "::debug::Installing https://github.com/Testato/SoftwareWire.git"
pio lib -g install https://github.com/Testato/SoftwareWire.git
- name: Update Libraries from Cache
run: pio lib -g update

# # We want to install from exactly the point that we're working on
# # NOTE: We do NOT install to the global directory so it's not cached!
# - name: Install ModularSensors as current state
# run: |
# ls
# mkdir -p ${{ github.workspace }}/lib
# ls
# pio lib -d ${{ github.workspace }}/lib install https://github.com/${{ github.repository }}.git#$GITHUB_SHA

- name: Run PlatformIO
run: platformio ci --project-conf="continuous_integration/platformio.ini"
env:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/build_menu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Examples

# Triggers the workflow on push or pull request events
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
env:
PLATFORMIO_SRC_DIR: temp/menu_a_la_carte
if: "!contains(github.event.head_commit.message, 'ci skip')"

steps:
- uses: actions/checkout@v2

- name: Restore or Cache pip
uses: actions/cache@v2.1.4
with:
path: ~/.cache/pip
# if requirements.txt hasn't changed, then it will be a "cache hit" and pip will be restored
# if requirements.txt HAS changed, it will be a "cache miss" and a new cache of pip will be created if the job completes successfully
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-

- name: Restore or Cache PlatformIO and Libraries
uses: actions/cache@v2.1.4
with:
path: ~/.platformio
# if nothing in the lock files has changed, then it will be a "cache hit" and pip will be restored
# otherwise, it will be a "cache miss" and a new cache of libraries will be created if the job completes successfully
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}

- name: Set up Python
uses: actions/setup-python@v2

# This should be pulled from cache, if there's not a new version
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Test all configurations
run: |
chmod +x continuous_integration/build-menu-configurations.sh
sh continuous_integration/build-menu-configurations.sh
4 changes: 4 additions & 0 deletions .github/workflows/prepare_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,16 @@ jobs:
pio lib -g uninstall adafruit/Adafruit ILI9341
# zip up all the installed libraries
# need to cd into the pio directory so we don't get extra junk directories
- name: Zip libraries
run: |
echo "::debug::Listing global libraries"
pio lib -g list
echo "::debug::Zipping global libraries"
cd ~/.platformio
zip ${{ env.ZIP_NAME }}.zip -r ~/.platformio/lib
mv ${{ env.ZIP_NAME }}.zip $GITHUB_WORKSPACE
cd $GITHUB_WORKSPACE
# Remove some extras from the zip
- name: Remove git files from the zip
Expand Down
4 changes: 2 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Downloads

**[ModularSensors_Dependencies_0.28.0.zip](https://github.com/EnviroDIY/ModularSensors/releases/download/v0.28.0/ModularSensors_Dependencies_0.28.0.zip)**
**[ModularSensors_Dependencies_v0.28.0.zip](https://github.com/EnviroDIY/ModularSensors/releases/download/v0.28.0/ModularSensors_Dependencies_v0.28.0.zip)**
- contains this version of ModularSensors _and the proper versions of all of its dependencies_.

### New Features
Expand All @@ -26,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Downloads

**[ModularSensors_Dependencies_0.27.8.zip](https://github.com/EnviroDIY/ModularSensors/releases/download/v0.27.8/ModularSensors_Dependencies_0.27.8.zip)** contains this version of ModularSensors _and the proper versions of all of its dependencies_.
**[ModularSensors_Dependencies_v0.27.8.zip](https://github.com/EnviroDIY/ModularSensors/releases/download/v0.27.8/ModularSensors_Dependencies_v0.27.8.zip)** contains this version of ModularSensors _and the proper versions of all of its dependencies_.

### Bug Fixes
- Just fixes an error in the github action to post a release
Expand Down
85 changes: 85 additions & 0 deletions continuous_integration/build-menu-configurations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/sh

for modemFlag in \
MS_BUILD_TEST_XBEE_CELLULAR \
MS_BUILD_TEST_XBEE_LTE_B \
MS_BUILD_TEST_XBEE_3G_B \
MS_BUILD_TEST_XBEE_WIFI \
MS_BUILD_TEST_ESP8266 \
MS_BUILD_TEST_BG96 \
MS_BUILD_TEST_MONARCH \
MS_BUILD_TEST_SIM800 \
MS_BUILD_TEST_SIM7000 \
MS_BUILD_TEST_S2GB \
MS_BUILD_TEST_UBEE_R410M \
MS_BUILD_TEST_UBEE_U201

do
sed -i '1s/^/#define MS_BUILD_TEST_PRE_NAMED_VARS\n#define $modemFlag\n/' examples/menu_a_la_carte/menu_a_la_carte.ino > temp/menu_a_la_carte/main.cpp

head temp/menu_a_la_carte/main.cpp

platformio run --project-conf="continuous_integration/platformio.ini"
done

for sensorFlag in \
MS_BUILD_TEST_AM2315 \
MS_BUILD_TEST_DHT \
MS_BUILD_TEST_SQ212 \
MS_BUILD_TEST_ATLASCO2 \
MS_BUILD_TEST_ATLASDO \
MS_BUILD_TEST_ATLASORP \
MS_BUILD_TEST_ATLASPH \
MS_BUILD_TEST_ATLASRTD \
MS_BUILD_TEST_ATLASEC \
MS_BUILD_TEST_BME280 \
MS_BUILD_TEST_OBS3 \
MS_BUILD_TEST_ES2 \
MS_BUILD_TEST_VOLTAGE \
MS_BUILD_TEST_MPL115A2 \
MS_BUILD_TEST_INSITURDO \
MS_BUILD_TEST_ACCULEVEL \
MS_BUILD_TEST_NANOLEVEL \
MS_BUILD_TEST_MAXBOTIX \
MS_BUILD_TEST_DS18 \
MS_BUILD_TEST_MS5803 \
MS_BUILD_TEST_5TM \
MS_BUILD_TEST_CTD \
MS_BUILD_TEST_TEROS11 \
MS_BUILD_TEST_PALEOTERRA \
MS_BUILD_TEST_RAINI2C \
MS_BUILD_TEST_TALLY \
MS_BUILD_TEST_INA219 \
MS_BUILD_TEST_CYCLOPS \
MS_BUILD_TEST_ANALOGEC \
MS_BUILD_TEST_Y504 \
MS_BUILD_TEST_Y510 \
MS_BUILD_TEST_Y511 \
MS_BUILD_TEST_Y514 \
MS_BUILD_TEST_Y520 \
MS_BUILD_TEST_Y532 \
MS_BUILD_TEST_Y533 \
MS_BUILD_TEST_Y550 \
MS_BUILD_TEST_Y4000 \
MS_BUILD_TEST_DOPTO \

do
sed -i '1s/^/#define MS_BUILD_TEST_XBEE_CELLULAR\n#define MS_BUILD_TEST_PRE_NAMED_VARS\n#define $sensorFlag\n/' examples/menu_a_la_carte/menu_a_la_carte.ino > temp/menu_a_la_carte/main.cpp

head temp/menu_a_la_carte/main.cpp

platformio run --project-conf="continuous_integration/platformio.ini"
done

for publisherFlag in \
MS_BUILD_TEST_MMW \
MS_BUILD_TEST_DREAMHOST \
MS_BUILD_TEST_THINGSPEAK \

do
sed -i '1s/^/#define MS_BUILD_TEST_XBEE_CELLULAR\n#define MS_BUILD_TEST_PRE_NAMED_VARS\n#define $publisherFlag\n/' examples/menu_a_la_carte/menu_a_la_carte.ino > temp/menu_a_la_carte/main.cpp

head temp/menu_a_la_carte/main.cpp

platformio run --project-conf="continuous_integration/platformio.ini"
done
Loading

0 comments on commit 5b9040c

Please sign in to comment.