Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic GitHub action #4

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install PlatformIO
run: |
pip install platformio==6.1.13

- name: Build
run: |
pio run
gminn marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 9 additions & 0 deletions dep_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Import("env")

# Install missing package
try:
import pkg_resources
except ImportError:
# setuptools is not installed in python 3.12, but it's required here:
# ~/.platformio/platforms/espressif32/builder/frameworks/espidf.py
env.Execute("$PYTHONEXE -m pip install setuptools==69.2.0")
1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ board_build.partitions = partitions_example.csv

; wrapper to run the memfault build id script on the output binary
extra_scripts =
pre:dep_check.py
post:add_build_id.py

; disable filtering so the ANSI colors come through
Expand Down