Skip to content

Commit 8b26bd4

Browse files
Merge pull request #11 from nulllaborg/develop
优化示例,并补充新增AI-VOX3的示例
2 parents 2b29778 + 745f315 commit 8b26bd4

File tree

123 files changed

+294411
-263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+294411
-263
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: AI VOX Board Build
2+
3+
on:
4+
push:
5+
branches: ["main", "v*"]
6+
pull_request:
7+
branches: ["main", "v*"]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
env:
13+
LIB_DIR_NAME: AI_VOX
14+
ARDUINO_CLI_DIR: ${{github.workspace}}/arduino_cli
15+
ARDUINO_CLI_CONFIG_DIR: ${{github.workspace}}/arduino_cli_config
16+
ARDUINO_USER_DIR: ${{github.workspace}}/arduino_user
17+
AI_VOX_VERSION: "v1.3.0"
18+
strategy:
19+
matrix:
20+
example: ["ai_vox_board/ai_vox_engine_led_mcp", "ai_vox_board/ai_vox_engine_motordriver_mcp","ai_vox_board/ai_vox_engine_servo_mcp","ai_vox_board/ai_vox_engine_ws2812b_mcp",
21+
"ai_vox3/ai_vox_engine_dht11_servo_led_mcp","ai_vox3/ai_vox_engine_led_mcp","ai_vox3/ai_vox_engine_motor_fan_mcp","ai_vox3/ai_vox_engine_motordriver_mcp",
22+
"ai_vox3/ai_vox_engine_servo_mcp","ai_vox3/ai_vox_engine_us04_dht11_photosensitive_mcp","ai_vox3/ai_vox_engine_ws2812b_mcp"]
23+
core_version: ["3.2.0"]
24+
fqbn: ["esp32:esp32:esp32s3"]
25+
26+
steps:
27+
- name: Checkout examples repository
28+
uses: actions/checkout@v4
29+
30+
- name: download arduino cli
31+
run: curl -L -o arduino-cli.tar.gz https://github.com/arduino/arduino-cli/releases/download/v1.2.0/arduino-cli_1.2.0_Linux_64bit.tar.gz
32+
33+
- name: install arduino cli
34+
run: |
35+
mkdir -p ${ARDUINO_CLI_DIR}
36+
tar -zxvf arduino-cli.tar.gz -C ${ARDUINO_CLI_DIR}
37+
38+
- name: test arduino cli
39+
run: ${ARDUINO_CLI_DIR}/arduino-cli -v
40+
41+
- name: setup arduino-cli
42+
run: |
43+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} config init
44+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} config set directories.user ${ARDUINO_USER_DIR}
45+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} config set library.enable_unsafe_install true
46+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} config dump
47+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} core install esp32:esp32@${{matrix.core_version}}
48+
49+
- name: install lib lvgl@9.2.2
50+
run: |
51+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} lib install "lvgl@9.2.2"
52+
53+
- name: install lib FastLED
54+
run: |
55+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} lib install "FastLED@3.10.3"
56+
57+
- name: install lib DHT_sensor_library
58+
run: |
59+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} lib install "DHT sensor library@1.4.6"
60+
61+
- name: Install AI_VOX Library from GitHub (v1.3.0)
62+
run: |
63+
echo "Installing AI_VOX library version ${AI_VOX_VERSION}"
64+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} lib install --git-url https://github.com/nulllaborg/ai_vox.git#${AI_VOX_VERSION}
65+
66+
- name: Verify installed libraries
67+
run: |
68+
echo "Installed libraries:"
69+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} lib list
70+
71+
- name: compile
72+
run: |
73+
echo "Compiling ${GITHUB_WORKSPACE}/${{matrix.example}}"
74+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} compile --fqbn ${{matrix.fqbn}} "${GITHUB_WORKSPACE}/${{matrix.example}}" -j 0 --warnings all --board-options "FlashSize=16M" --board-options "PartitionScheme=custom" --board-options "PSRAM=opi" --build-property "build.extra_flags=-Wall -Wno-missing-field-initializers -Wno-type-limits -Wno-deprecated-copy -Wno-unused-variable -Wno-unused-function -Wno-sign-compare -Wno-reorder -DESP32 -DARDUINO_ARCH_ESP32" --log --clean -v
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Arduino ESP32 Build
2+
3+
on:
4+
push:
5+
branches: ["main", "v*"]
6+
pull_request:
7+
branches: ["main", "v*"]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
env:
13+
LIB_DIR_NAME: AI_VOX
14+
ARDUINO_CLI_DIR: ${{github.workspace}}/arduino_cli
15+
ARDUINO_CLI_CONFIG_DIR: ${{github.workspace}}/arduino_cli_config
16+
ARDUINO_USER_DIR: ${{github.workspace}}/arduino_user
17+
AI_VOX_VERSION: "v1.3.0"
18+
strategy:
19+
matrix:
20+
example: ["esp32/ai_vox_engine_us04_dht11_photosensitive_display_lcd_mcp", "esp32/ai_vox_engine_us04_dht11_photosensitive_display_oled_mcp"]
21+
22+
steps:
23+
- name: Checkout examples repository
24+
uses: actions/checkout@v4
25+
26+
- name: download arduino cli
27+
run: curl -L -o arduino-cli.tar.gz https://github.com/arduino/arduino-cli/releases/download/v1.2.0/arduino-cli_1.2.0_Linux_64bit.tar.gz
28+
29+
- name: install arduino cli
30+
run: |
31+
mkdir -p ${ARDUINO_CLI_DIR}
32+
tar -zxvf arduino-cli.tar.gz -C ${ARDUINO_CLI_DIR}
33+
34+
- name: test arduino cli
35+
run: ${ARDUINO_CLI_DIR}/arduino-cli -v
36+
37+
- name: setup arduino-cli
38+
run: |
39+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} config init
40+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} config set directories.user ${ARDUINO_USER_DIR}
41+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} config set library.enable_unsafe_install true
42+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} config dump
43+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} core install esp32:esp32@3.2.0
44+
45+
- name: install lib lvgl@9.2.2
46+
run: |
47+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} lib install "lvgl@9.2.2"
48+
49+
- name: install lib FastLED
50+
run: |
51+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} lib install "FastLED@3.10.3"
52+
53+
- name: install lib DHT_sensor_library
54+
run: |
55+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} lib install "DHT sensor library@1.4.6"
56+
57+
- name: Install AI_VOX Library from GitHub (v1.3.0)
58+
run: |
59+
echo "Installing AI_VOX library version ${AI_VOX_VERSION}"
60+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} lib install --git-url https://github.com/nulllaborg/ai_vox.git#${AI_VOX_VERSION}
61+
62+
- name: Verify installed libraries
63+
run: |
64+
echo "Installed libraries:"
65+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} lib list
66+
67+
- name: compile
68+
run: |
69+
echo "Compiling ${GITHUB_WORKSPACE}/${{matrix.example}}"
70+
${ARDUINO_CLI_DIR}/arduino-cli --config-dir ${ARDUINO_CLI_CONFIG_DIR} compile --fqbn esp32:esp32:esp32 "${GITHUB_WORKSPACE}/${{matrix.example}}" -j 0 --warnings all --board-options PartitionScheme=huge_app --build-property "build.extra_flags=-Wall -Werror" --log --clean -v
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: PlatformIO Build
2+
3+
on:
4+
push:
5+
branches: ["main", "v*"]
6+
pull_request:
7+
branches: ["main", "v*"]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
target: [
15+
"esp32_display_lcd",
16+
"esp32_display_oled",
17+
"ai_vox_board_led",
18+
"ai_vox_board_motordriver",
19+
"ai_vox_board_servo",
20+
"ai_vox_board_ws2812b",
21+
"ai_vox3_dht11_servo_led",
22+
"ai_vox3_led",
23+
"ai_vox3_motor_fan",
24+
"ai_vox3_motordriver",
25+
"ai_vox3_servo",
26+
"ai_vox3_us04_dht11_photosensitive",
27+
"ai_vox3_ws2812b"
28+
]
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- uses: actions/cache@v4
33+
with:
34+
path: |
35+
~/.cache/pip
36+
~/.platformio/.cache
37+
key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }}
38+
39+
- uses: actions/setup-python@v5
40+
with:
41+
python-version: '3.11'
42+
43+
- name: Install PlatformIO Core
44+
run: pip install --upgrade platformio
45+
46+
- name: Build PlatformIO Project
47+
run: pio run -e ${{ matrix.target }}
48+
49+
- name: Upload Artifacts
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: firmware-${{ matrix.target }}
53+
path: .pio/build/${{ matrix.target }}/*.bin
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PlatformIO Full Build
2+
3+
on:
4+
push:
5+
branches: ["main", "v*"]
6+
pull_request:
7+
branches: ["main", "v*"]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/cache@v4
16+
with:
17+
path: |
18+
~/.cache/pip
19+
~/.platformio/.cache
20+
key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }}
21+
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.11'
25+
26+
- name: Install PlatformIO Core
27+
run: pip install --upgrade platformio
28+
29+
- name: Build All PlatformIO Environments
30+
run: pio run
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* 本文件为空索引文件,请转到 main.cpp 查看主程序
3+
* This is an empty index file, please refer to main.cpp for the main program
4+
*
5+
* 说明:
6+
* Arduino IDE 默认会寻找与项目文件夹同名的 .ino 文件作为主入口。
7+
* 为了让 Arduino IDE 正确编译项目,我们保留此空白文件作为项目入口索引。
8+
* 实际程序逻辑请在 main.cpp 中查看和修改。
9+
*
10+
* Explanation:
11+
* Arduino IDE requires a .ino file matching the project folder name as the entry point.
12+
* We keep this blank file as an index to satisfy the IDE's compilation requirements.
13+
* The actual program logic is located in main.cpp.
14+
*
15+
* 重要提示:请勿在此文件添加代码!
16+
* Important: Do not add code in this file!
17+
*/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-fno-exceptions -Wall -Werror -DLV_LVGL_H_INCLUDE_SIMPLE

0 commit comments

Comments
 (0)