mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
CI: idf_as_lib is now run on all suported targets
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
PARAM=""
|
||||||
|
|
||||||
# Retrive the target from the current filename, if no target specified,
|
# Retrive the target from the current filename, if no target specified,
|
||||||
# the variable will be empty
|
# the variable will be empty
|
||||||
TARGET=$(echo $0 | cut -s -f2 -d- | cut -s -f1 -d.)
|
TARGET=$(echo $0 | cut -s -f2 -d- | cut -s -f1 -d.)
|
||||||
|
@@ -499,6 +499,19 @@ function run_tests()
|
|||||||
popd
|
popd
|
||||||
rm -r $IDF_PATH/examples/build_system/cmake/idf_as_lib/build
|
rm -r $IDF_PATH/examples/build_system/cmake/idf_as_lib/build
|
||||||
|
|
||||||
|
print_status "Test build ESP-IDF as a library to a custom CMake projects for all targets"
|
||||||
|
IDF_AS_LIB=$IDF_PATH/examples/build_system/cmake/idf_as_lib
|
||||||
|
# note: we just need to run cmake
|
||||||
|
for TARGET in "esp32" "esp32s2" "esp32s3" "esp32c3" "esp32h2"
|
||||||
|
do
|
||||||
|
echo "Build idf_as_lib for $TARGET target"
|
||||||
|
rm -rf build
|
||||||
|
mkdir -p build && cd build
|
||||||
|
cmake $IDF_AS_LIB -DCMAKE_TOOLCHAIN_FILE=$IDF_PATH/tools/cmake/toolchain-$TARGET.cmake -DTARGET=$TARGET || failure "Failed to generate idf_as_lib build files for target $TARGET"
|
||||||
|
cmake --build . || failure "Failed to build idf_as_lib for target $TARGET"
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
|
|
||||||
print_status "Building a project with CMake library imported and PSRAM workaround, all files compile with workaround"
|
print_status "Building a project with CMake library imported and PSRAM workaround, all files compile with workaround"
|
||||||
# Test for libraries compiled within ESP-IDF
|
# Test for libraries compiled within ESP-IDF
|
||||||
rm -r build sdkconfig
|
rm -r build sdkconfig
|
||||||
|
Reference in New Issue
Block a user