-
-
Notifications
You must be signed in to change notification settings - Fork 6
110 lines (97 loc) · 2.99 KB
/
Copy pathbuild.yml
File metadata and controls
110 lines (97 loc) · 2.99 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
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
104
105
106
107
108
109
110
name: PlatformIO Build All
on:
push:
workflow_dispatch:
jobs:
build:
name: "${{ matrix.group }}"
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
include:
- group: ModernESP_C2
boards: "esp32c2"
cache_extra: ".pio"
- group: ModernESP_C3_C5_C6
boards: "esp32c3 esp32c5 esp32c6"
cache_extra: ""
- group: ModernESP_S2
boards: "esp32s2"
cache_extra: ""
- group: ModernESP_S3
boards: "esp32s3"
cache_extra: ""
- group: ClassicESP
boards: "esp32 esp32-eth01 esp8266"
cache_extra: ""
- group: CustomBoards
boards: "esp32-GLEDOPTO_GL_C_616WL esp32-GLEDOPTO_GL_C_615WL esp32-DOMRAEM_WLE_ADM esp32-IOTORERO_ETHERNET"
cache_extra: ""
- group: Pico
boards: "pico pico2"
cache_extra: ""
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: "Cache PlatformIO - ${{ matrix.group }}"
uses: actions/cache@v6
with:
path: |
~/.platformio/packages
~/.platformio/platforms
.ccache
${{ matrix.cache_extra }}
key: pio-${{ matrix.group }}-${{ hashFiles('platformio.ini') }}
restore-keys: |
pio-${{ matrix.group }}-
- name: Install PlatformIO + esptool + ccache
run: |
sudo apt update
sudo apt install ccache
python -m pip install --upgrade pip
pip install --upgrade platformio esptool
- name: Build ${{ matrix.group }}
run: |
ENVS="${{ matrix.boards }}"
CMD="pio run -j 2"
for env in $ENVS; do
CMD="$CMD -e $env"
done
eval "$CMD"
- name: "Upload Artifacts - ${{ matrix.group }}"
uses: actions/upload-artifact@v7
with:
name: Hyperk-Firmware-${{ matrix.group }}
path: release/
if-no-files-found: error
- name: Generate Job Summary
run: |
echo "**Boards:** ${{ matrix.boards }}" >> $GITHUB_STEP_SUMMARY
release:
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all firmware artifacts
uses: actions/download-artifact@v8
with:
pattern: Hyperk-Firmware-*
path: release
merge-multiple: true
- name: Create Pre-release
uses: softprops/action-gh-release@v3
with:
files: release/*
generate_release_notes: true
draft: true
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}