-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.42 KB
/
build.yaml
File metadata and controls
50 lines (42 loc) · 1.42 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
name: build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
project_dir: ["Firmware_Arduino", "Firmware_ESP8266"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: pio-${{ runner.os }}-${{ hashFiles(format('{0}/platformio.ini', matrix.project_dir)) }}
restore-keys: |
pio-${{ runner.os }}-
- name: Install PlatformIO Core
run: pip install -U platformio
# Builds all environments defined in platformio.ini; use -e for environment matrix
- name: Build ${{ matrix.project_dir }}
working-directory: ${{ matrix.project_dir }}
run: |
pio run
# If defining environment matrix: pio run -e ${{ matrix.env }}
# Upload generated artifacts; hex for AVR; bin for ESP8266
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.project_dir }}-artifacts
path: |
${{ matrix.project_dir }}/.pio/build/*/*.hex
${{ matrix.project_dir }}/.pio/build/*/*.bin
${{ matrix.project_dir }}/.pio/build/*/*.elf