From 6eb5991ff3c4ac59f417aa7deb6fc3f689cf6aa9 Mon Sep 17 00:00:00 2001 From: qitas Date: Fri, 29 Mar 2024 10:02:40 +0800 Subject: [PATCH] update --- .github/workflows/ci.yml | 111 ++++++++++++--------------------------- .gitignore | 7 +-- platformio.ini | 16 ++---- 3 files changed, 38 insertions(+), 96 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbe60bb..9102f35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,64 +6,30 @@ on: - main paths: - 'src/**' + - 'hal/**' - 'platformio.ini' jobs: - Linux: - runs-on: ubuntu-latest + build: + strategy: + fail-fast: false + matrix: + environment: + - "stm32f429_disco" + - "emulator_64bits" + os: [ubuntu-latest, windows-latest, macos-latest] + + runs-on: ${{ matrix.os }} steps: - - name: Install Linux dependencies - run: | - sudo apt-get update - sudo apt-get install libsdl2-dev - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - - name: Install PlatformIO - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio update + with: + token: ${{ secrets.OSQ_REPO_TOKEN }} - - name: Build bare metal (stm32f429_disco) - run: platformio run -e stm32f429_disco - - name: Build emulator (sdl2, 64bits) - run: platformio run -e emulator_64bits - - - #Linux_i386: - # runs-on: ubuntu-latest - # steps: - # - name: Install Linux dependencies - # run: | - # sudo dpkg --add-architecture i386 - # sudo apt-get update - # sudo apt-get install libsdl2-dev:i386 gcc-multilib g++-multilib - # - # - uses: actions/checkout@v4 - # - uses: actions/setup-python@v5 - # - # - name: Install PlatformIO - # run: | - # python -m pip install --upgrade pip - # pip install -U platformio - # platformio update - # - # - name: Build emulator (sdl2, 32bits) - # run: platformio run -e emulator_32bits - - - macOS: - runs-on: macos-latest - steps: - - name: Install macOS dependencies - run: | - HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2 - - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" - name: Install PlatformIO run: | @@ -71,37 +37,28 @@ jobs: pip install -U platformio platformio update - - name: Build bare metal (stm32f429_disco) - run: platformio run -e stm32f429_disco + # - name: Install dependencies + # run: | + # pip install -U https://github.com/OS-Q/pio/archive/main.zip - - name: Build emulator (sdl2, 64bits) - run: platformio run -e emulator_64bits + - name: Run on Linux + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install libsdl2-dev + platformio run -e ${{ matrix.environment }} + - name: Run on macOS + if: startsWith(matrix.os, 'macos') + run: | + HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2 + platformio run -e ${{ matrix.environment }} - Windows: - runs-on: windows-latest - steps: - - name: Activate msys2 & mingw64 + - name: Run on Windows + if: startsWith(matrix.os, 'windows') run: | echo "C:\msys64\usr\bin" >> $env:GITHUB_PATH echo "C:\msys64\mingw64\bin" >> $env:GITHUB_PATH - - - name: Install deps - run: | pacman --noconfirm -S --needed mingw-w64-x86_64-SDL2 gcc --version - - - uses: actions/checkout@v4 - #- uses: actions/setup-python@v5 - - - name: Install PlatformIO - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio update - - - name: Build bare metal (stm32f429_disco) - run: platformio run -e stm32f429_disco - - - name: Build emulator (sdl2, 64bits) - run: platformio run -e emulator_64bits + platformio run -e ${{ matrix.environment }} diff --git a/.gitignore b/.gitignore index 6a3a16e..bfba05e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,4 @@ .piolibdeps .clang_complete .gcc-flags.json - -.vscode/.browse.c_cpp.db* -.vscode/c_cpp_properties.json -.vscode/launch.json -.vscode/settings.json -.vscode/ipch +.vscode/ diff --git a/platformio.ini b/platformio.ini index 4803191..b459165 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,12 +13,12 @@ build_flags = ; Add more defines below to overide lvgl:/src/lv_conf_simple.h lib_deps = ; Use direct URL, because package registry is unstable - lvgl=https://github.com/lvgl/lvgl/archive/refs/tags/v8.4.0.zip + lvgl=https://github.com/lvgl/lvgl/archive/refs/tags/v8.3.11.zip lib_archive = false [env:emulator_64bits] -platform = native@^1.1.3 +platform = native@^1.2.1 extra_scripts = support/sdl2_build_extra.py build_flags = ${env.build_flags} @@ -55,18 +55,8 @@ build_src_filter = +<../.pio/libdeps/emulator_64bits/lvgl/demos> -[env:emulator_32bits] -extends = env:emulator_64bits -build_flags = - ${env:emulator_64bits.build_flags} - -m32 -build_src_filter = - +<*> - +<../hal/sdl2> - +<../.pio/libdeps/emulator_32bits/lvgl/demos> - [env:stm32f429_disco] -platform = ststm32@^8.0.0 +platform = ststm32 board = disco_f429zi framework = stm32cube build_flags =