Skip to content

Commit 8b5b9e8

Browse files
authored
Add basic GitHub action (#4)
Just to provide an example for users (and for a simple sanity check when we make changes).
1 parent b22966d commit 8b5b9e8

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
24+
- name: Install PlatformIO
25+
run: |
26+
pip install platformio==6.1.13
27+
28+
- name: Build
29+
run: |
30+
pio run

dep_check.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Import("env")
2+
3+
# Install missing package
4+
try:
5+
import pkg_resources
6+
except ImportError:
7+
# setuptools is not installed in python 3.12, but it's required here:
8+
# ~/.platformio/platforms/espressif32/builder/frameworks/espidf.py
9+
env.Execute("$PYTHONEXE -m pip install setuptools==69.2.0")

platformio.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ board_build.partitions = partitions_example.csv
2929

3030
; wrapper to run the memfault build id script on the output binary
3131
extra_scripts =
32+
pre:dep_check.py
3233
post:add_build_id.py
3334

3435
; disable filtering so the ANSI colors come through

0 commit comments

Comments
 (0)