stages: - check check_lib_reversion: stage: check except: - master - /^release\/v/ image: $CI_DOCKER_REGISTRY/esp32-ci-env variables: GIT_SUBMODULE_STRATEGY: none script: - mkdir riscv32 - wget https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz >/dev/null 2>&1 - tar -zxvf riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz -C ./riscv32 >/dev/null 2>&1 - | for dir in */; do dir=${dir%/} case "$dir" in esp32|esp32s2|esp32s3) NM="xtensa-esp32-elf-nm" ;; *) NM="riscv32/riscv32-esp-elf/bin/riscv32-esp-elf-nm" ;; esac for lib in "$dir"/*.a; do [ -f "$lib" ] || continue echo "Checking $lib" symbols=$("$NM" "$lib") || exit 1 if printf '%s\n' "$symbols" | grep -wE 'printf|ets_printf'; then echo "Error: $lib contains printf or ets_printf" exit 1 fi done done