Skip to content
Open
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
37 changes: 32 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,52 @@ on:
env:
TARGET: esp32s3
IDF_TARGET: esp32s3
ESP_IDF_VERSION: v5.2.1
jobs:
Build-Firmware:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential python3-pip python3-pillow libusb-1.0-0-dev cmake
- name: Install Dependencies
uses: daaku/gh-action-apt-install@v4
with:
packages: build-essential python3-pip python3-pillow libusb-1.0-0-dev cmake
version: 1
- name: Check out driver code
uses: actions/checkout@v4
with:
submodules: true
- name: ESP IDF Cache
id: esp-idf-cache
uses: actions/cache@v4
with:
path: esp-idf
key: esp-idf-${{ env.ESP_IDF_VERSION }}
- name: Check out ESP IDF
if: steps.esp-idf-cache.outputs.cache-hit != 'true'
id: esp-idf

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: It doesn't look like esp-idf (or install-sdk) IDs are used in other checks? I'm still quite new to GitHub Actions, but it seems like these don't need to be included, since there are quite a few other steps that also don't have ids? Would it make sense to only include ids that are used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot, thanks for reviewing! They're the vestigial remains of an earlier in-progress version that needed them.

We're actually likely not to merge this now, as @thinkl33t got an automated build container sorted so I'll switch the firmware build over as it'll have the same impact as caching, and allow for easily locally reproducible builds.

uses: actions/checkout@v4
with:
repository: espressif/esp-idf
ref: v5.2.1
ref: ${{ env.ESP_IDF_VERSION }}
path: esp-idf
submodules: true
- name: Submodules
run: |
cd micropython/lib
git submodule init
git submodule update micropython-lib
- name: SDK Cache
id: sdk-cache
uses: actions/cache@v4
with:
path: |
/home/runner/.espressif
/home/runner/work/badge-2024-software/badge-2024-software/esp-idf
key: esp-sdk-${{ env.ESP_IDF_VERSION }}
- name: Install SDK
if: steps.sdk-cache.outputs.cache-hit != 'true'
id: install-sdk
run: |
cd esp-idf
./install.sh
Expand All @@ -42,7 +62,14 @@ jobs:
- name: Patch submodule dependencies
run: |
./scripts/firstTime.sh
- name: Cache cross compiler
id: cross-compiler-cache
uses: actions/cache@v4
with:
path: /home/runner/work/badge-2024-software/badge-2024-software/micropython/mpy-cross
key: cross-compiler-${{ hashFiles('micropython/.git') }}
- name: Build cross compiler
if: steps.cross-compiler-cache.outputs.cache-hit != 'true'
run: |
source esp-idf/export.sh
cd micropython
Expand Down
Loading