Skip to content

Commit 92d2947

Browse files
committed
.github: Compile using action's server.
Signed-off-by: lbuque <[email protected]>
1 parent 5bd0654 commit 92d2947

File tree

5 files changed

+287
-233
lines changed

5 files changed

+287
-233
lines changed

.github/workflows/build-release.yml

Lines changed: 124 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,60 +11,133 @@ permissions:
1111
packages: write
1212

1313
jobs:
14+
setup:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
cache-hit: ${{ steps.cache-esp-idf.outputs.cache-hit }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install dependencies
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y git wget flex bison gperf quilt python3 python3-pip \
25+
python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
26+
27+
- name: Cache esp-idf
28+
uses: actions/cache@v4
29+
id: cache-esp-idf
30+
with:
31+
path: |
32+
~/.espressif
33+
${{ github.workspace }}/esp-idf
34+
key: ${{ runner.os }}-idf-v5.4.1
35+
36+
- name: Install ESP-IDF
37+
if: steps.cache-esp-idf.outputs.cache-hit != 'true'
38+
run: |
39+
git clone --depth=1 -b $IDF_VERSION https://github.com/espressif/esp-idf.git
40+
./esp-idf/install.sh
41+
env:
42+
IDF_VERSION: "v5.4.1"
43+
44+
- name: Setup environment
45+
run: |
46+
source tools/ci.sh && ci_esp32_idf541_setup
47+
source esp-idf/export.sh
48+
pip install future
49+
make -C m5stack submodules
50+
make -C m5stack patch
51+
make -C m5stack littlefs
52+
53+
1454
build:
15-
runs-on: [self-hosted, Linux, X64]
55+
needs: setup
56+
runs-on: ubuntu-latest
57+
strategy:
58+
matrix:
59+
board:
60+
- M5STACK_AirQ
61+
- M5STACK_Atom_Echo
62+
- M5STACK_Atom_Lite
63+
- M5STACK_Atom_Matrix
64+
- M5STACK_AtomS3
65+
- M5STACK_AtomS3_Lite
66+
- M5STACK_AtomS3R
67+
- M5STACK_AtomS3R_CAM
68+
- M5STACK_AtomS3U
69+
- M5STACK_AtomU
70+
- M5STACK_Basic
71+
- M5STACK_Basic_4MB
72+
- M5STACK_Capsule
73+
- M5STACK_Cardputer
74+
- M5STACK_Core2
75+
- M5STACK_CoreInk
76+
- M5STACK_CoreS3
77+
- M5STACK_Dial
78+
- M5STACK_DinMeter
79+
- M5STACK_Fire
80+
- M5STACK_NanoC6
81+
- M5STACK_Paper
82+
- M5STACK_PaperS3
83+
- M5STACK_Stamp_PICO
84+
- M5STACK_StamPLC
85+
- M5STACK_StampS3
86+
- M5STACK_Station
87+
- M5STACK_StickC
88+
- M5STACK_StickC_PLUS
89+
- M5STACK_StickC_PLUS2
90+
- M5STACK_Tab5
91+
- M5STACK_Tough
92+
- ESPRESSIF_ESP32_S3_BOX_3
93+
- SEEED_STUDIO_XIAO_ESP32S3
94+
max-parallel: 4
1695
steps:
17-
- uses: actions/[email protected]
96+
- uses: actions/checkout@v4
97+
98+
- name: Install dependencies
99+
run: |
100+
sudo apt-get update
101+
sudo apt-get install -y git wget flex bison gperf quilt python3 python3-pip \
102+
python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
103+
104+
- name: Restore ESP-IDF cache
105+
uses: actions/cache@v4
106+
with:
107+
path: |
108+
~/.espressif
109+
${{ github.workspace }}/esp-idf
110+
key: ${{ runner.os }}-idf-v5.4.1
18111

19-
- name: Install dependencies with apt
20-
run: |
21-
sudo apt-get update
22-
sudo apt-get install git wget flex bison gperf quilt python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 -y
112+
- name: Prepare environment
113+
run: |
114+
source esp-idf/export.sh
23115
24-
- name: Install packages
25-
run: source tools/ci.sh && ci_esp32_idf541_setup
116+
- name: Build ${{ matrix.board }}
117+
run: |
118+
source esp-idf/export.sh
119+
pip install future
120+
make -C m5stack submodules
121+
make -C m5stack patch
122+
make -C m5stack littlefs
123+
if [[ "${{ matrix.board }}" != M5STACK* ]]; then \
124+
make -C third-party BOARD=${{ matrix.board }} pack_all \
125+
else \
126+
make -C m5stack BOARD=${{ matrix.board }} pack_all \
127+
fi
26128
27-
- name: Build
28-
run: source tools/ci.sh && ci_esp32_nightly_build
129+
- name: Upload firmware artifact
130+
uses: actions/upload-artifact@v4
131+
with:
132+
name: firmware-${{ matrix.board }}
133+
path: |
134+
${{ startsWith(matrix.board, 'M5STACK') && 'm5stack' || 'third-party' }}/build-${{ matrix.board }}/uiflow-*-*.bin
29135
30-
- name: Upload firmware
31-
uses: softprops/action-gh-release@v2
32-
if: startsWith(github.ref, 'refs/tags/')
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
with:
36-
files: |
37-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_AirQ/uiflow-*-*.bin
38-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Atom_Echo/uiflow-*-*.bin
39-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Atom_Lite/uiflow-*-*.bin
40-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Atom_Matrix/uiflow-*-*.bin
41-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_AtomS3/uiflow-*-*.bin
42-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_AtomS3_Lite/uiflow-*-*.bin
43-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_AtomS3R/uiflow-*-*.bin
44-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_AtomS3R_CAM/uiflow-*-*.bin
45-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_AtomS3U/uiflow-*-*.bin
46-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_AtomU/uiflow-*-*.bin
47-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Basic/uiflow-*-*.bin
48-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Basic_4MB/uiflow-*-*.bin
49-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Capsule/uiflow-*-*.bin
50-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Cardputer/uiflow-*-*.bin
51-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Core2/uiflow-*-*.bin
52-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_CoreInk/uiflow-*-*.bin
53-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_CoreS3/uiflow-*-*.bin
54-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Dial/uiflow-*-*.bin
55-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_DinMeter/uiflow-*-*.bin
56-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Fire/uiflow-*-*.bin
57-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_NanoC6/uiflow-*-*.bin
58-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Paper/uiflow-*-*.bin
59-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_PaperS3/uiflow-*-*.bin
60-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Stamp_PICO/uiflow-*-*.bin
61-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_StamPLC/uiflow-*-*.bin
62-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_StampS3/uiflow-*-*.bin
63-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Station/uiflow-*-*.bin
64-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_StickC/uiflow-*-*.bin
65-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_StickC_PLUS/uiflow-*-*.bin
66-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_StickC_PLUS2/uiflow-*-*.bin
67-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Tab5/uiflow-*-*.bin
68-
$GITHUB_WORKSPACE/m5stack/build-M5STACK_Tough/uiflow-*-*.bin
69-
$GITHUB_WORKSPACE/third-party/build-SEEED_STUDIO_XIAO_ESP32S3/uiflow-*-*.bin
70-
$GITHUB_WORKSPACE/third-party/build-ESPRESSIF_ESP32_S3_BOX_3/uiflow-*-*.bin
136+
- name: Upload firmware to release
137+
uses: softprops/action-gh-release@v2
138+
if: startsWith(github.ref, 'refs/tags/')
139+
env:
140+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
with:
142+
files: |
143+
${{ startsWith(matrix.board, 'M5STACK') && 'm5stack' || 'third-party' }}/build-${{ matrix.board }}/uiflow-*-*.bin

.github/workflows/code_formatting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
build:
14-
runs-on: [self-hosted, Linux, X64]
14+
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-python@v5

0 commit comments

Comments
 (0)