Skip to content

Commit

Permalink
Update GitHub Action to use KiCad Auto ki8 (KiCad 8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ceoloide authored Apr 1, 2024
1 parent 07ac587 commit e161fe3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
11 changes: 7 additions & 4 deletions .github/actions/autoroute/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ runs:
- |
for board in ${{ inputs.boards }};
do
echo Processing $board
echo "Processing $board";
if [ -e ergogen/output/pcbs/${board}.ses ]; then
echo Cleaning up ergogen/output/pcbs/${board}.ses
rm -f ergogen/output/pcbs/${board}.ses
echo "Cleaning up ergogen/output/pcbs/${board}.ses";
rm -f ergogen/output/pcbs/${board}.ses;
fi
if [ -e ergogen/output/pcbs/${board}.dsn ]; then
echo "Autoroute PCB";
java -jar /opt/freerouting_cli.jar -de ergogen/output/pcbs/${board}.dsn -do ergogen/output/pcbs/${board}.ses -dr freerouting/freerouting.rules -mp 20
fi
java -jar /opt/freerouting_cli.jar -de ergogen/output/pcbs/${board}.dsn -do ergogen/output/pcbs/${board}.ses -dr freerouting/freerouting.rules -mp 20
done
14 changes: 8 additions & 6 deletions .github/actions/export-dsn/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ inputs:
required: true
runs:
using: 'docker'
image: 'docker://ghcr.io/inti-cmnb/kicad7_auto:latest'
image: 'docker://ghcr.io/inti-cmnb/kicad8_auto:latest'
entrypoint: '/bin/bash'
args:
- '-c'
# GH actions set $HOME to a weird location and we have to move Kicad settings there first
- |
for board in ${{ inputs.boards }};
do
echo Processing $board;
echo "Processing $board";
if [ -e $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn ]; then
echo Cleaning up $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn
rm -f $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn
echo "Cleaning up $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn";
rm -f $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn;
fi
if [ -e ergogen/output/pcbs/${board}.kicad_pcb ]; then
echo "Export DSN";
$GITHUB_WORKSPACE/kibot/export_dsn.py -b $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.kicad_pcb -o $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn
fi
$GITHUB_WORKSPACE/kibot/export_dsn.py -b $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.kicad_pcb -o $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn
done
18 changes: 9 additions & 9 deletions .github/actions/import-ses/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ inputs:
required: true
runs:
using: 'docker'
image: 'docker://soundmonster/kicad-automation-scripts:latest'
entrypoint: '/bin/sh'
image: 'docker://ghcr.io/inti-cmnb/kicad8_auto:latest'
entrypoint: '/bin/bash'
args:
- '-c'
# GH actions set $HOME to a weird location and we have to move Kicad settings there first
- |
mkdir -p $HOME/.config/kicad ;
cp /root/.config/kicad/* $HOME/.config/kicad ;
for board in ${{ inputs.boards }};
do
echo Processing $board
echo "Processing $board";
if [ -e $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_autorouted.kicad_pcb ]; then
echo Cleaning up $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_autorouted.kicad_pcb
rm -f $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_autorouted.kicad_pcb
echo "Cleaning up $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_autorouted.kicad_pcb";
rm -f $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_autorouted.kicad_pcb;
fi
if [ -e $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.ses ]; then
echo "Import SES";
$GITHUB_WORKSPACE/kibot/import_ses.py -b $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.kicad_pcb -s $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.ses -o $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_autorouted.kicad_pcb
fi
/usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/import_ses.py $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.kicad_pcb $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.ses --output-file $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_autorouted.kicad_pcb;
done
5 changes: 2 additions & 3 deletions .github/actions/kibot/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ inputs:
required: true
runs:
using: 'docker'
image: 'docker://ghcr.io/inti-cmnb/kicad7_auto:latest'
image: 'docker://ghcr.io/inti-cmnb/kicad8_auto:latest'
entrypoint: '/bin/bash'
args:
- '-c'
# GH actions set $HOME to a weird location and we have to move Kicad settings there first
- |
for board in ${{ inputs.boards }};
do
echo Processing $board;
echo "Processing $board";
kibot -b $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.kicad_pcb -c $GITHUB_WORKSPACE/kibot/${{ inputs.config }}.kibot.yaml
done

0 comments on commit e161fe3

Please sign in to comment.