Skip to content

Commit

Permalink
Re-organize c++ esp-idf binary packaging
Browse files Browse the repository at this point in the history
Sort the packages by idf target, so that we can also enable support for esp-println and esp-backtrace.
  • Loading branch information
tronical committed Aug 23, 2024
1 parent b81e4e1 commit 9650aa0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/cpp_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: CMakeLists.txt
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DRust_CARGO_TARGET=${{ matrix.target }} -DCMAKE_C_COMPILER=arm-none-eabi-gcc -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY ${{ env.SLINT_MCU_FEATURES }} ${{ matrix.build_flags }}"
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DRust_CARGO_TARGET=${{ matrix.target }} -DCMAKE_C_COMPILER=arm-none-eabi-gcc -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY ${{ env.SLINT_MCU_FEATURES }}"
buildDirectory: ${{ runner.workspace }}/cppbuild
buildWithCMakeArgs: "--config Release"
- name: cpack
Expand All @@ -131,8 +131,15 @@ jobs:
CARGO_INCREMENTAL: false
strategy:
matrix:
target: [riscv32imafc-esp-espidf, riscv32imac-esp-espidf, riscv32imc-esp-espidf, xtensa-esp32s3-none-elf]
idf_target: [esp32s2, esp32s3, esp32p4]
host: [ubuntu-22.04, windows-2022, macOS-12]
include:
- idf_target: esp32s2
rust_target: xtensa-esp32s2-none-elf
- idf_target: esp32s3
rust_target: xtensa-esp32s3-none-elf
- idf_target: esp32p4
rust_target: riscv32imafc-esp-espidf

runs-on: ${{ matrix.host }}
steps:
Expand Down Expand Up @@ -171,7 +178,7 @@ jobs:
# NOTE: xtensa-esp-elf-gcc as compiler for the RISC-V targets is wrong, but the compiler argument here is only
# used to ensure that SIZEOF_VOID_P is 4 in the generated cmake config file. Otherwise this build requires no
# C compiler.
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DRust_CARGO_TARGET=${{ matrix.target }} -DCMAKE_C_COMPILER=xtensa-esp-elf-gcc -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY -DSLINT_LIBRARY_CARGO_FLAGS='-Zbuild-std=core,alloc' ${{ env.SLINT_MCU_FEATURES }} ${{ matrix.build_flags }}"
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DESP_PLATFORM=1 -DIDF_TARGET=${{ matrix.idf_target }} -DRust_CARGO_TARGET=${{ matrix.rust_target }} -DCMAKE_C_COMPILER=xtensa-esp-elf-gcc -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY -DSLINT_LIBRARY_CARGO_FLAGS='-Zbuild-std=core,alloc' ${{ env.SLINT_MCU_FEATURES }}"
buildDirectory: ${{ runner.workspace }}/cppbuild
buildWithCMakeArgs: "--config Release"
- name: cpack
Expand All @@ -180,5 +187,5 @@ jobs:
- name: "Upload C++ packages"
uses: actions/upload-artifact@v4
with:
name: cpp_mcu_bin-${{ runner.os }}-${{ runner.arch }}-${{ matrix.target }}
name: cpp_mcu_bin-${{ runner.os }}-${{ runner.arch }}-${{ matrix.idf_target }}
path: ${{ runner.workspace }}/cppbuild/Slint-cpp-*

0 comments on commit 9650aa0

Please sign in to comment.