Skip to content
代码片段 群组 项目
提交 5309be22 编辑于 作者: Kapil Gupta's avatar Kapil Gupta
浏览文件

ci(esp_hosted_ng): Add ci for firmware builds

上级 20ec7738
No related branches found
No related tags found
无相关合并请求
stages:
- pre_check
- build
- deploy
variables:
......@@ -14,11 +15,104 @@ before_script:
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
# always run it so that pipeline is created
check_version:
stage: pre_check
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.4:1
script:
- export HOSTED_NG_PATH=$PWD/esp_hosted_ng
- ci/check_hosted_ng_version.sh
- .gitlab/ci/check_hosted_ng_version.sh
#only:
#changes:
# - esp_hosted_ng/**/*
build_fw_esp32_sdio:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env-v5.1:1
variables:
IDF_TARGET: esp32
script:
- .gitlab/ci/build_firmware.sh $IDF_TARGET
only:
changes:
- esp_hosted_ng/esp/esp_driver/network_adapter/**/*
build_fw_esp32_spi:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env-v5.1:1
variables:
IDF_TARGET: esp32
script:
- .gitlab/ci/build_firmware.sh $IDF_TARGET spi
only:
changes:
- esp_hosted_ng/esp/esp_driver/network_adapter/**/*
build_fw_esp32s2_spi:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env-v5.1:1
variables:
IDF_TARGET: esp32s2
script:
- .gitlab/ci/build_firmware.sh $IDF_TARGET
only:
changes:
- esp_hosted_ng/esp/esp_driver/network_adapter/**/*
build_fw_esp32s3_spi:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env-v5.1:1
variables:
IDF_TARGET: esp32s3
script:
- .gitlab/ci/build_firmware.sh $IDF_TARGET
only:
changes:
- esp_hosted_ng/esp/esp_driver/network_adapter/**/*
build_fw_esp32c2_spi:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env-v5.1:1
variables:
IDF_TARGET: esp32c2
script:
- .gitlab/ci/build_firmware.sh $IDF_TARGET
only:
changes:
- esp_hosted_ng/esp/esp_driver/network_adapter/**/*
build_fw_esp32c3_spi:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env-v5.1:1
variables:
IDF_TARGET: esp32c3
script:
- .gitlab/ci/build_firmware.sh $IDF_TARGET
only:
changes:
- esp_hosted_ng/esp/esp_driver/network_adapter/**/*
build_fw_esp32c6_sdio:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env-v5.1:1
variables:
IDF_TARGET: esp32c6
script:
- .gitlab/ci/build_firmware.sh $IDF_TARGET
only:
changes:
- esp_hosted_ng/esp/esp_driver/network_adapter/**/*
build_fw_esp32c6_spi:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env-v5.1:1
variables:
IDF_TARGET: esp32c6
script:
- .gitlab/ci/build_firmware.sh $IDF_TARGET spi
only:
changes:
- esp_hosted_ng/esp/esp_driver/network_adapter/**/*
deploy_master_github:
stage: deploy
......
#!/bin/bash
# Ensure script stops on errors
set -e
TGT_NAME=$1
# Navigate to the target directory
cd esp_hosted_ng/esp/esp_driver/
echo "ESP hosted: initializing submodule esp-idf"
git submodule update --init --depth=1
echo "ESP hosted: initializing submodule for esp-idf"
cd esp-idf
git submodule update --init --depth=1
echo "ESP hosted: installing prerequisites for $TGT_NAME"
./install.sh $TGT_NAME
cd ..
echo "ESP hosted: replacing wireless libraries"
rm -rf esp-idf/components/esp_wifi/lib/*
cp -r lib/* esp-idf/components/esp_wifi/lib/
echo "###### Setup Done ######"
cd esp-idf
echo "Exporting variables"
. ./export.sh
cd ../network_adapter
# Check if the second argument (assumed to be a string) matches "spi"
if [ "$2" = "spi" ]; then
# Check if sdkconfig.ci exists
if [ -f "sdkconfig.ci" ]; then
# Append the content of sdkconfig.ci to sdkconfig.defaults
echo "appending ci config to default"
cat sdkconfig.ci >> sdkconfig.defaults
else
echo "Error: sdkconfig.ci does not exist."
exit 1
fi
fi
echo "Setting target as $TGT_NAME"
idf.py set-target $TGT_NAME
idf.py build
# Check if the build was successful
if [ ! -f "build/network_adapter.bin" ]; then
echo "Compilation failed; exit 1"
exit 1
fi
echo "Build successful"
文件已移动
CONFIG_ESP_SPI_HOST_INTERFACE=y
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册