From 20a3d1edc9128c73f4fc8981f215186b1ca3c935 Mon Sep 17 00:00:00 2001 From: Spooks <62370103+Spooks4576@users.noreply.github.com> Date: Wed, 30 Oct 2024 22:49:22 -0600 Subject: [PATCH] Update compile_generics.yml --- .github/workflows/compile_generics.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compile_generics.yml b/.github/workflows/compile_generics.yml index 25f60083..3570ef1d 100644 --- a/.github/workflows/compile_generics.yml +++ b/.github/workflows/compile_generics.yml @@ -82,10 +82,18 @@ jobs: exit 1 fi - - name: Set Target + - name: Set ESP-IDF Target in SDK Config run: | - . ~/esp-idf/export.sh - idf.py set-target ${{ matrix.target.idf_target }} + TARGET_VAR="CONFIG_IDF_TARGET=${{ matrix.target.idf_target }}" + SDKCONFIG_FILE="${{ matrix.target.sdkconfig_file }}" + + echo "Setting target in SDK Config: $TARGET_VAR in $SDKCONFIG_FILE" + + if grep -q "^CONFIG_IDF_TARGET=" "$SDKCONFIG_FILE"; then + sed -i "s/^CONFIG_IDF_TARGET=.*/$TARGET_VAR/" "$SDKCONFIG_FILE" + else + echo "$TARGET_VAR" >> "$SDKCONFIG_FILE" + fi - name: Set Environment Variables for Matrix Configuration run: |