Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
qitas committed Mar 29, 2024
1 parent f855c53 commit 6eb5991
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 96 deletions.
111 changes: 34 additions & 77 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,102 +6,59 @@ 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: |
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: 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 }}
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
16 changes: 3 additions & 13 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 6eb5991

Please sign in to comment.