-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (54 loc) · 1.74 KB
/
Copy pathci.yml
File metadata and controls
64 lines (54 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on:
push:
branches: ['**']
pull_request:
branches: [master]
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build ${{ matrix.environment }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
environment: [espA, espB, espA_pool]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache PlatformIO core
uses: actions/cache@v4
with:
path: |
~/.platformio/.cache
~/.platformio/packages
~/.platformio/platforms
key: pio-core-${{ runner.os }}-${{ hashFiles('platformio.ini') }}
restore-keys: |
pio-core-${{ runner.os }}-
- name: Cache PlatformIO build
uses: actions/cache@v4
with:
path: .pio
key: pio-build-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'include/**', 'lib/**', 'src/**') }}
restore-keys: |
pio-build-${{ runner.os }}-${{ matrix.environment }}-
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Build ${{ matrix.environment }}
run: pio run -e ${{ matrix.environment }}
- name: Report firmware size
run: |
echo "### Firmware size (${{ matrix.environment }})" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
pio run -e ${{ matrix.environment }} --target size 2>&1 | tail -20 >> "$GITHUB_STEP_SUMMARY" || true
echo '```' >> "$GITHUB_STEP_SUMMARY"