Skip to content

Commit

Permalink
Update KLC Compliance Check to only include changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
ssewell committed Aug 20, 2023
1 parent cc04e68 commit 2ac0e05
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/kicad-klc-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,20 @@ jobs:
with:
python-version: '3.10.11'

- name: Run KiCad KLC Footprint Check
run: python ./library-utils/klc-check/check_footprint.py ./SimPanel.pretty/* -vv
# We use this to limit KLC checking to only changed files
- uses: jitterbit/get-changed-files@v1
with:
format: 'json'

- id: footprint_files
name: Run KiCad KLC Footprint Check
uses: jitterbit/get-changed-files@v1
with:
format: 'json'
- run: |
readarray -t changed_files <<<"$(jq -r '.[]' <<<'${{ steps.footprint_files.outputs.added_modified }}')"
for changed_file in ${changed_files[@]}; do
if [[ ${changed_file} == *.kicad_mod ]]; then
python ./library-utils/klc-check/check_footprint.py ./SimPanel.pretty/${changed_file} -vv
fi
done

0 comments on commit 2ac0e05

Please sign in to comment.