From d61a58d3c9a344779801ed969edfbc7bfc45231f Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Wed, 28 Feb 2024 18:42:18 +0800 Subject: [PATCH] github: Automate CI process for all subdirectories - Replaced static directory path with dynamic listing - Implemented loop to process all subdirectories - Each directory now runs full build and validation sequence Signed-off-by: Huang Rui --- .github/workflows/build.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7017e760..1e3f4f3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,10 +30,16 @@ jobs: - run: pip install frugy - name: Build and Validate KiCad Project run: | - pushd ${{github.workspace}}/fmc_basic_peripheral - cmake -B ./build -G Ninja - cmake --build ./build --target erc - cmake --build ./build --target drc - cmake --build ./build --target production - cmake --build ./build --target pdf + pushd ${{github.workspace}} + PROJECT_DIRS=$(ls -d */ | sed 's:/*$::') popd + for DIR in $PROJECT_DIRS; do + echo "Processing directory: $DIR" + pushd ${{github.workspace}}/$DIR + cmake -B ./build -G Ninja + cmake --build ./build --target erc + cmake --build ./build --target drc + cmake --build ./build --target production + cmake --build ./build --target pdf + popd + done