-
Notifications
You must be signed in to change notification settings - Fork 49
57 lines (44 loc) · 1.8 KB
/
pio-build-multi-platform.yml
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
name: EleksTubeHAX builds with PlatformIO on multiple platforms
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
# Set up a matrix to run the following 2 configurations:
# 1. <Windows, Release, toolchain on the default runner image, default generator>
# 2. <Linux, Release, toolchain on the default runner image, default generator>
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Copy user_defines.h file on windows
run: copy "./EleksTubeHAX_pio/src/_USER_DEFINES - empty.h" "./EleksTubeHAX_pio/src/_USER_DEFINES.h"
if: runner.os == 'Windows'
- name: Copy user_defines.h file on linux
run: cp "./EleksTubeHAX_pio/src/_USER_DEFINES - empty.h" "./EleksTubeHAX_pio/src/_USER_DEFINES.h"
if: runner.os == 'Linux'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build PlatformIO Project for 4MB flash
run: pio run --environment esp32dev
working-directory: ./EleksTubeHAX_pio
- name: Build PlatformIO Project for 8MB flash
run: pio run --environment esp32dev8MB
working-directory: ./EleksTubeHAX_pio