Skip to content

Add feature to GUI #768

Add feature to GUI

Add feature to GUI #768

Workflow file for this run

---
name: Build stm32
on: [workflow_dispatch, push, pull_request_target, pull_request]
env:
python_version: '3.13'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build PlatformIO Project
working-directory: ./stm32
run: pio run
- uses: actions/upload-artifact@v4
with:
name: build
path: stm32/.pio/build
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Run static code analysis
working-directory: ./stm32
run: pio check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-cpplint
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}
- name: Install cpplint
run: pip install --upgrade cpplint==1.6.1
- name: Run linter
working-directory: ./stm32
run: cpplint --recursive lib Src/examples test
test:
runs-on: ubuntu-latest
concurrency:
group: remote-test
needs: build
env:
bucket_url: https://ents-remote-tests-protobuf-lib.s3.us-west-2.amazonaws.com
protobuf_lib: ents-protobuf-lib-${{ github.sha }}.tar.gz
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Login to AWS
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Pack protobuf package
run: pio pkg pack -o ${protobuf_lib} proto/c
- name: Upload protobuf library
run: aws s3 cp ${protobuf_lib} s3://ents-remote-tests-protobuf-lib/${protobuf_lib}
- name: Replace protobuf package reference
env:
lib_url: ${{ env.bucket_url }}/${{ env.protobuf_lib }}
run: sed -i 's|\(Soil Power Sensor Protocal Buffer=\).*|\1${{ env.lib_url }}|' stm32/platformio.ini
- name: Run unit tests
working-directory: ./stm32
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
run: pio remote test -e tests -r