-
Notifications
You must be signed in to change notification settings - Fork 19
61 lines (55 loc) · 1.96 KB
/
Copy pathmain.yaml
File metadata and controls
61 lines (55 loc) · 1.96 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
name: PlatformIO CI
on:
push:
pull_request:
permissions:
contents: read
jobs:
# The environment list lives in .github/firmware-targets.json, shared with
# release.yml. Keeping one list means CI can't build a target the release
# forgets to ship (which is how esp32-N4 went unreleased) or vice versa.
targets:
name: Load targets
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
environments: ${{ steps.load.outputs.environments }}
steps:
- uses: actions/checkout@v4
- id: load
run: |
set -euo pipefail
envs=$(jq -c '[.targets[].env]' .github/firmware-targets.json)
echo "environments=${envs}" >> "${GITHUB_OUTPUT}"
echo "Building: $(echo "${envs}" | jq -r 'join(", ")')"
build:
needs: targets
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
environment: ${{ fromJSON(needs.targets.outputs.environments) }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio-${{ matrix.environment }}-${{ hashFiles('platformio.ini') }}
restore-keys: |
${{ runner.os }}-pio-${{ matrix.environment }}-
${{ runner.os }}-pio-
- uses: actions/setup-python@v5
with:
python-version: '3.11'
# Pinned to the same Core version release.yml uses. Unpinned here, CI can
# pass on a different Core than the one that builds the release — the
# exact split that broke the C3/C6 builds when the ESP platform was
# floating on `stable` (see the 55.03.39 pin in platformio.ini).
# Bump deliberately, together with release.yml.
- name: Install PlatformIO Core
run: pip install platformio==6.1.19
- name: Build ${{ matrix.environment }}
run: platformio run --environment ${{ matrix.environment }}