forked from tjfenwick/DIY-Sim-Racing-Active-Pedal
-
Notifications
You must be signed in to change notification settings - Fork 23
103 lines (63 loc) · 3.33 KB
/
platformio.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: build_firmware
on: [push]
# see e.g. https://cgrotz.github.io/2020-08-24-esp32_ci_cd_part2/
jobs:
buildFirmware:
#runs-on: ubuntu-latest
runs-on: windows-latest
steps:
# Prepare environment
- uses: actions/checkout@main
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
# Build ESP code
- name: Build PlatformIO Project ESP32
working-directory: ./ESP32
run: |
pio system info
pio run --environment esp32
pio run --environment esp32s3usbotg
pio run --environment esp32-speedcrafter
# copy files to dir
- name: Copy files to packing dir
run: |
copy ${{ github.workspace }}/ESP32/.pio/build/esp32/firmware.bin ${{ github.workspace }}/Helper/bins/esp32
copy ${{ github.workspace }}/ESP32/.pio/build/esp32/bootloader.bin ${{ github.workspace }}/Helper/bins/esp32
copy ${{ github.workspace }}/ESP32/.pio/build/esp32/partitions.bin ${{ github.workspace }}/Helper/bins/esp32
copy ${{ github.workspace }}/ESP32/.pio/build/esp32s3usbotg/firmware.bin ${{ github.workspace }}/Helper/bins/esp32s3
copy ${{ github.workspace }}/ESP32/.pio/build/esp32s3usbotg/bootloader.bin ${{ github.workspace }}/Helper/bins/esp32s3
copy ${{ github.workspace }}/ESP32/.pio/build/esp32s3usbotg/partitions.bin ${{ github.workspace }}/Helper/bins/esp32s3
copy ${{ github.workspace }}/ESP32/.pio/build/esp32-speedcrafter/firmware.bin ${{ github.workspace }}/Helper/bins/esp32_speedcrafter_PCB_V1p4
copy ${{ github.workspace }}/ESP32/.pio/build/esp32-speedcrafter/bootloader.bin ${{ github.workspace }}/Helper/bins/esp32_speedcrafter_PCB_V1p4
copy ${{ github.workspace }}/ESP32/.pio/build/esp32-speedcrafter/partitions.bin ${{ github.workspace }}/Helper/bins/esp32_speedcrafter_PCB_V1p4
# copy files to dir
- name: List files in dir
run: |
dir ${{ github.workspace }}/Helper/bins/esp32
# zip plugin binaries
- name: ZIP files
run: |
7z a ${{ github.workspace }}/Helper/zip/esp32.zip ${{ github.workspace }}/Helper/bins/esp32/
7z a ${{ github.workspace }}/Helper/zip/esp32s3.zip ${{ github.workspace }}/Helper/bins/esp32s3/
7z a ${{ github.workspace }}/Helper/zip/esp32_speedcrafter.zip ${{ github.workspace }}/Helper/bins/esp32_speedcrafter_PCB_V1p4/
# 7z a ./Helper/zip/esp32.zip @./Helper/zip/filelist_esp32.txt
# 7z a ./Helper/zip/esp32s3.zip @Helper/zip/filelist_esp32s3.txt
# 7z a./Helper/zip/esp32_speedcrafter.zip @Helper/zip/filelist_esp32_speedcrafter.txt
# Publish as build artifact
- name: Attach artifact
uses: actions/upload-artifact@v2
with:
name: firmware_esp32
path: |
./Helper/zip/esp32.zip
./Helper/zip/esp32s3.zip
./Helper/zip/esp32_speedcrafter.zip