Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into C516296-led-footprint
Browse files Browse the repository at this point in the history
  • Loading branch information
tigert committed Mar 30, 2024
2 parents 50eea24 + e085060 commit 457ea16
Show file tree
Hide file tree
Showing 82 changed files with 139,155 additions and 32,068 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/kicad-klc-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,51 @@ on:
# Triggers the workflow on push or pull request events but only for the "main" branch
# and if relevant files have changed
push:
branches: [ "main" ]
paths:
branches: ["main"]
paths:
- "SimPanel.kicad_sym"
- "Kav_Simulations.kicad_sym"
- "SimPanel.pretty/*.kicad_mod"
- "Kav_Simulations.pretty/*.kicad_mod"
pull_request:
branches: [ "main" ]
paths:
branches: ["main"]
paths:
- "SimPanel.kicad_sym"
- "Kav_Simulations.kicad_sym"
- "SimPanel.pretty/*.kicad_mod"
- "Kav_Simulations.pretty/*.kicad_mod"

jobs:
KLC_ComplianceCheck:
runs-on: ubuntu-latest

steps:
steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/[email protected]
with:
python-version: '3.10.11'
python-version: "3.10.11"

# We use this to limit KLC checking to only changed files
- id: footprint_files
name: Get Changed Files
uses: masesgroup/retrieve-changed-files@v2
with:
format: 'json'
format: "json"

# We must check all symbols for compliance, since KiCad stores each library in a single file
- name: KLC Symbol Check
run: python ./library-utils/klc-check/check_symbol.py ./SimPanel.kicad_sym -vv

run: |
python ./library-utils/klc-check/check_symbol.py ./SimPanel.kicad_sym -vv
python ./library-utils/klc-check/check_symbol.py ./Kav_Simulations.kicad_sym -vv
# We only check footprints where the underlying file has changed
- name: KLC Footprint Check
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 ./${changed_file} -vv
fi
done
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 ./${changed_file} -vv
fi
done
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/__pycache__/
SimPanel.bak
Kav_Simulations.bak
*.FCBak
33 changes: 30 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
"tasks": [
{
"label": "KLC - Check All",
"dependsOn": ["KLC - Check Symbols", "KLC - Check Footprints"],
"dependsOn": [
"KLC - Check Symbols (SimPanel)",
"KLC - Check Footprints (SimPanel)",
"KLC - Check Symbols (Kav Simulations)",
"KLC - Check Footprints (Kav Simulations)"
],
"dependsOrder": "sequence",
"problemMatcher": []
},
{
"label": "KLC - Check Symbols",
"label": "KLC - Check Symbols (SimPanel)",
"type": "shell",
"command": "python",
"args": [
Expand All @@ -21,7 +26,7 @@
"problemMatcher": []
},
{
"label": "KLC - Check Footprints",
"label": "KLC - Check Footprints (SimPanel)",
"type": "shell",
"command": "python",
"args": [
Expand All @@ -30,6 +35,28 @@
"-vv"
],
"problemMatcher": []
},
{
"label": "KLC - Check Symbols (Kav Simulations)",
"type": "shell",
"command": "python",
"args": [
".\\library-utils\\klc-check\\check_symbol.py",
".\\Kav_Simulations.kicad_sym",
"-vv"
],
"problemMatcher": []
},
{
"label": "KLC - Check Footprints (Kav Simulations)",
"type": "shell",
"command": "python",
"args": [
".\\library-utils\\klc-check\\check_footprint.py",
".\\Kav_Simulations.pretty\\*",
"-vv"
],
"problemMatcher": []
}
]
}
Loading

0 comments on commit 457ea16

Please sign in to comment.