Skip to content

[update]新增github actions的一个测试 #5

[update]新增github actions的一个测试

[update]新增github actions的一个测试 #5

Workflow file for this run

name: Build
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
build-gcc:
name: Build with ARM GCC
runs-on: ubuntu-latest
strategy:
matrix:
config:
- name: "Default (All OFF)"
freertos: "OFF"
lvgl: "OFF"
thorvg: "OFF"
- name: "FreeRTOS ON"
freertos: "ON"
lvgl: "OFF"
thorvg: "OFF"
- name: "LVGL ON"
freertos: "OFF"
lvgl: "ON"
thorvg: "OFF"
- name: "LVGL + ThorVG ON"
freertos: "OFF"
lvgl: "ON"
thorvg: "ON"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
- name: Install ARM GCC Toolchain
run: |
sudo apt-get install -y gcc-arm-none-eabi
- name: Verify toolchain installation
run: |
arm-none-eabi-gcc --version
ninja --version
cmake --version
- name: Build with GCC - ${{ matrix.config.name }}
run: |
cmake -B build -G Ninja \
-DCMAKE_TOOLCHAIN_FILE="cmake/gcc-arm-none-eabi.cmake" \
-DCMAKE_BUILD_TYPE=Debug \
-DLINKER_SCRIPT="L1_MCU/STM32F429ZIT6_GCC/STM32F429XX_FLASH.ld" \
-DMCU_MODEL="STM32F429ZIT6_GCC" \
-DUSE_FREERTOS=${{ matrix.config.freertos }} \
-DUSE_FATFS=OFF \
-DUSE_LVGL=${{ matrix.config.lvgl }} \
-DUSE_LVGL_THORVG=${{ matrix.config.thorvg }}
ninja -C build
test:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc-multilib g++-multilib
- name: Verify tools installation
run: |
ninja --version
cmake --version
gcc --version
- name: Run tests
run: |
cd Test
chmod +x build.sh
./build.sh