Repository navigation
256 lines (219 loc) · 10.4 KB
/
Copy pathlinux.yml
File metadata and controls
256 lines (219 loc) · 10.4 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
name: Build LVGL MicroPython for Linux x64, esp32 and esp32s3
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-esp32:
runs-on: ubuntu-24.04
timeout-minutes: 120
env:
MPOS_CCACHE: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_COMPILERCHECK: content
CCACHE_NOHASHDIR: true
steps:
- name: Checkout repository with submodules
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
- name: Install and cache APT dependencies
uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
with:
packages: >-
build-essential libffi-dev pkg-config cmake ninja-build ccache
gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev
libjack-dev libsndio-dev libx11-dev libxext-dev libxrandr-dev
libxcursor-dev libxfixes-dev libxi-dev libxss-dev
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev
libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev
libudev-dev fcitx-libs-dev libpipewire-0.3-dev libwayland-dev
libdecor-0-dev libv4l-dev
version: apt-v2-ubuntu-24.04-${{ runner.arch }}
execute_install_scripts: true
- name: Restore ESP-IDF tools
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.espressif
key: esp-idf-tools-v1-5.5.1-${{ runner.os }}-${{ runner.arch }}
- name: Restore compiler cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .ccache
key: ccache-v1-${{ runner.os }}-${{ runner.arch }}-linux-esp32-${{ github.sha }}
restore-keys: |
ccache-v1-${{ runner.os }}-${{ runner.arch }}-linux-esp32-
- name: Configure compiler cache
run: |
echo "/usr/lib/ccache" >> "$GITHUB_PATH"
ccache --max-size 1G
ccache --zero-stats
- name: Extract OS version
id: version
run: |
OS_VERSION=$(grep "release = " internal_filesystem/lib/mpos/build_info.py | cut -d "=" -f 2 | cut -d "#" -f 1 | tr -d " " | tr -d '"')
echo "OS_VERSION=$OS_VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $OS_VERSION"
- name: Build LVGL MicroPython esp32
run: |
./scripts/build_mpos.sh esp32
mv lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC-SPIRAM-16.bin lvgl_micropython/build/MicroPythonOS_esp32_${{ steps.version.outputs.OS_VERSION }}.bin
mv lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC-SPIRAM/micropython.bin lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC-SPIRAM/MicroPythonOS_esp32_${{ steps.version.outputs.OS_VERSION }}.ota
- name: Upload esp32 .bin artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: MicroPythonOS_esp32_${{ steps.version.outputs.OS_VERSION }}.bin
path: lvgl_micropython/build/MicroPythonOS_esp32_${{ steps.version.outputs.OS_VERSION }}.bin
retention-days: 7
- name: Upload esp32 .ota artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: MicroPythonOS_esp32_${{ steps.version.outputs.OS_VERSION }}.ota
path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC-SPIRAM/MicroPythonOS_esp32_${{ steps.version.outputs.OS_VERSION }}.ota
retention-days: 7
- name: Show compiler cache statistics
if: always()
run: ccache --show-stats
build-esp32s3:
runs-on: ubuntu-24.04
timeout-minutes: 120
env:
MPOS_CCACHE: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_COMPILERCHECK: content
CCACHE_NOHASHDIR: true
steps:
- name: Checkout repository with submodules
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
- name: Install and cache APT dependencies
uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
with:
packages: >-
build-essential libffi-dev pkg-config cmake ninja-build ccache
gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev
libjack-dev libsndio-dev libx11-dev libxext-dev libxrandr-dev
libxcursor-dev libxfixes-dev libxi-dev libxss-dev
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev
libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev
libudev-dev fcitx-libs-dev libpipewire-0.3-dev libwayland-dev
libdecor-0-dev libv4l-dev
version: apt-v2-ubuntu-24.04-${{ runner.arch }}
execute_install_scripts: true
- name: Restore ESP-IDF tools
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.espressif
key: esp-idf-tools-v1-5.5.1-${{ runner.os }}-${{ runner.arch }}
- name: Restore compiler cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .ccache
key: ccache-v1-${{ runner.os }}-${{ runner.arch }}-linux-esp32s3-${{ github.sha }}
restore-keys: |
ccache-v1-${{ runner.os }}-${{ runner.arch }}-linux-esp32s3-
- name: Configure compiler cache
run: |
echo "/usr/lib/ccache" >> "$GITHUB_PATH"
ccache --max-size 1G
ccache --zero-stats
- name: Extract OS version
id: version
run: |
OS_VERSION=$(grep "release = " internal_filesystem/lib/mpos/build_info.py | cut -d "=" -f 2 | cut -d "#" -f 1 | tr -d " " | tr -d '"')
echo "OS_VERSION=$OS_VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $OS_VERSION"
- name: Build LVGL MicroPython esp32s3
run: |
./scripts/build_mpos.sh esp32s3
mv lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin lvgl_micropython/build/MicroPythonOS_esp32s3_${{ steps.version.outputs.OS_VERSION }}.bin
mv lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/MicroPythonOS_esp32s3_${{ steps.version.outputs.OS_VERSION }}.ota
- name: Upload esp32s3 .bin artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: MicroPythonOS_esp32s3_${{ steps.version.outputs.OS_VERSION }}.bin
path: lvgl_micropython/build/MicroPythonOS_esp32s3_${{ steps.version.outputs.OS_VERSION }}.bin
retention-days: 7
- name: Upload esp32s3 .ota artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: MicroPythonOS_esp32s3_${{ steps.version.outputs.OS_VERSION }}.ota
path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/MicroPythonOS_esp32s3_${{ steps.version.outputs.OS_VERSION }}.ota
retention-days: 7
- name: Show compiler cache statistics
if: always()
run: ccache --show-stats
build-unix:
runs-on: ubuntu-24.04
timeout-minutes: 120
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_COMPILERCHECK: content
CCACHE_NOHASHDIR: true
steps:
- name: Checkout repository with submodules
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
- name: Install and cache APT dependencies
uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
with:
packages: >-
build-essential libffi-dev pkg-config cmake ninja-build ccache
gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev
libjack-dev libsndio-dev libx11-dev libxext-dev libxrandr-dev
libxcursor-dev libxfixes-dev libxi-dev libxss-dev
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev
libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev
libudev-dev fcitx-libs-dev libpipewire-0.3-dev libwayland-dev
libdecor-0-dev libv4l-dev
version: apt-v2-ubuntu-24.04-${{ runner.arch }}
execute_install_scripts: true
- name: Restore compiler cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .ccache
key: ccache-v1-${{ runner.os }}-${{ runner.arch }}-linux-unix-${{ github.sha }}
restore-keys: |
ccache-v1-${{ runner.os }}-${{ runner.arch }}-linux-unix-
- name: Configure compiler cache
run: |
echo "/usr/lib/ccache" >> "$GITHUB_PATH"
ccache --max-size 1G
ccache --zero-stats
- name: Extract OS version
id: version
run: |
OS_VERSION=$(grep "release = " internal_filesystem/lib/mpos/build_info.py | cut -d "=" -f 2 | cut -d "#" -f 1 | tr -d " " | tr -d '"')
echo "OS_VERSION=$OS_VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $OS_VERSION"
- name: Build LVGL MicroPython for unix
run: |
./scripts/build_mpos.sh unix
cp lvgl_micropython/build/lvgl_micropy_unix lvgl_micropython/build/MicroPythonOS_x64_linux_${{ steps.version.outputs.OS_VERSION }}.elf
- name: Upload built binary as artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: MicroPythonOS_x64_linux_${{ steps.version.outputs.OS_VERSION }}.elf
path: lvgl_micropython/build/MicroPythonOS_x64_linux_${{ steps.version.outputs.OS_VERSION }}.elf
retention-days: 7
- name: Run syntax tests on unix
run: |
./tests/syntax.sh
- name: Run unit tests on unix
run: |
./scripts/test_runner.py
- name: Show compiler cache statistics
if: always()
run: ccache --show-stats