Skip to content

Commit 3454716

Browse files
authored
Add GitHub Actions workflow for PlatformIO CI
1 parent c9abc98 commit 3454716

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: PlatformIO CI
2+
3+
on:
4+
push:
5+
branches: [led_headphone_stand, led_right_light, led_hexagon_cell]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
environment: [esp32c3, esp32, esp8266]
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/cache@v4
16+
with:
17+
path: |
18+
~/.cache/pip
19+
~/.platformio/.cache
20+
key: ${{ runner.os }}-pio
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.11'
24+
- name: Install PlatformIO Core
25+
run: pip install --upgrade platformio intelhex
26+
- name: Build PlatformIO Project
27+
run: pio run -e ${{ matrix.environment }}
28+
- name: Upload BIN Artifacts
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: firmware-${{ github.ref_name }}-${{ matrix.environment }}.bin
32+
path: .pio/build/${{ matrix.environment }}/firmware.bin
33+
if-no-files-found: error
34+
- name: Upload ELF Artifacts
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: firmware-${{ github.ref_name }}-${{ matrix.environment }}.elf
38+
path: .pio/build/${{ matrix.environment }}/firmware.elf
39+
if-no-files-found: error

0 commit comments

Comments
 (0)