Skip to content

Commit

Permalink
github: Automate CI process for all subdirectories
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
vowstar committed Feb 28, 2024
1 parent 02f749f commit d61a58d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d61a58d

Please sign in to comment.