43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: Test compiling project
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: debian:latest
|
|
|
|
steps:
|
|
- name: Install necessary dependencies
|
|
run: apt update && apt install nodejs python3 python3-pip git -y
|
|
- name: Install Platformio
|
|
run: pip install --break-system-packages --upgrade platformio
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v2
|
|
- name: Run PlatformIO Tests
|
|
run: pio test -e native
|
|
- name: Run PlatformIO build for INA233
|
|
run: pio run -e ESP32_INA233
|
|
- name: Run PlatformIO build for INA226
|
|
run: pio run -e ESP32_INA226
|
|
- name: look at the output
|
|
run: ls -lah .pio/build/ESP32_INA233/ .pio/build/ESP32_INA226/
|
|
- name: Upload firmware binary for INA233
|
|
run: |
|
|
VERSION=$(cat version)
|
|
|
|
curl -X PUT \
|
|
-H "Content-Type: application/octet-stream" \
|
|
--data-binary @.pio/build/ESP32_INA233/firmware.bin \
|
|
https://iot.tobiasmaier.me/firmware/waterlevel/INA233/${VERSION}
|
|
|
|
- name: Upload firmware binary for INA226
|
|
run: |
|
|
VERSION=$(cat version)
|
|
|
|
curl -X PUT \
|
|
-H "Content-Type: application/octet-stream" \
|
|
--data-binary @.pio/build/ESP32_INA226/firmware.bin \
|
|
https://iot.tobiasmaier.me/firmware/waterlevel/INA226/${VERSION}
|