Skip to content

feat: M5Stack NFC Support - ST25R3916 (Grove I2C) reader #2

feat: M5Stack NFC Support - ST25R3916 (Grove I2C) reader

feat: M5Stack NFC Support - ST25R3916 (Grove I2C) reader #2

Workflow file for this run

name: PR Incremental Build
on:
pull_request:
branches:
- main
- dev
paths-ignore:
- '.vscode/**'
- '.gitignore'
- 'LICENSE'
- '*.md'
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
littlefs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
sparse-checkout: 'data'
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Cache Bun dependencies
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('data/bun.lockb', 'data/package.json') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install LittleFS Tool
run: pip install littlefs-python
- name: Install dependencies
run: bun install
working-directory: data
- name: Build
run: bun run build
working-directory: data
- name: Remove extra, only keep compressed
run: find dist -regex ".*\.\(html\|css\|br\|js\|json.gz\)" -delete
working-directory: data
- name: Create LittleFS Image
run: littlefs-python create $(pwd)/dist littlefs.bin -v --fs-size=0x20000 --name-max=64 --block-size=4096
working-directory: data
- name: Archive build directory
uses: actions/upload-artifact@v7
with:
name: ui-build-directory
path: data/dist
retention-days: 1
build-matrix:
runs-on: ubuntu-latest
needs: littlefs
strategy:
fail-fast: false
matrix:
target: [esp32, esp32c3, esp32c6, esp32s3]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
submodules: 'recursive'
- name: Get UI Build Directory
uses: actions/download-artifact@v8
with:
name: ui-build-directory
path: data/dist
- name: Restore Incremental Cache
uses: actions/cache@v5
with:
path: |
$HOME/.ccache
managed_components
build
key: ${{ runner.os }}-${{ matrix.target }}-incremental-${{ github.event.pull_request.number }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-incremental-${{ github.event.pull_request.number }}-
${{ runner.os }}-${{ matrix.target }}-incremental-
${{ runner.os }}-${{ matrix.target }}-build
- name: Fix directory permissions for Docker
run: |
mkdir -p build managed_components $HOME/.ccache
sudo chown -R 1000:1000 build managed_components $HOME/.ccache
- name: ESP-IDF Incremental Build (${{ matrix.target }})
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.5.5
target: ${{ matrix.target }}
path: '.'
extra_docker_args: >-
-v ${{ github.workspace }}/build:/project/build
-v ${{ github.workspace }}/managed_components:/project/managed_components
-v $HOME/.ccache:/root/.ccache
-e CCACHE_DIR=/root/.ccache
command: |
CI=true idf.py --ccache build && idf.py merge-bin
- name: Fix ownership post-build
run: sudo chown -R $USER:$USER build/ managed_components/ $HOME/.ccache
- name: Organize Binaries
run: |
mv build/HomeKey-ESP32.bin build/${{ matrix.target }}.firmware.bin
mv build/merged-binary.bin build/${{ matrix.target }}.firmware.factory.bin
- name: Archive Firmware
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.target }}-firmware
path: build/${{ matrix.target }}.firmware.bin
- name: Archive Factory Firmware
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.target }}-firmware-factory
path: build/${{ matrix.target }}.firmware.factory.bin