Update build workflows to use KiBot (no autoroute)
This commit is contained in:
parent
f46178d270
commit
ff61f4bd58
|
|
@ -2,18 +2,16 @@ name: 'Export DSN'
|
|||
description: 'Export Specctra DSN from a Kicad PCB'
|
||||
inputs:
|
||||
boards:
|
||||
description: 'Board names'
|
||||
description: 'KiCad PCB names'
|
||||
required: true
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://soundmonster/kicad-automation-scripts:latest'
|
||||
image: 'docker://ghcr.io/inti-cmnb/kicad7_auto@latest'
|
||||
entrypoint: '/bin/sh'
|
||||
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;
|
||||
|
|
@ -21,5 +19,5 @@ runs:
|
|||
echo Cleaning up $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn
|
||||
rm -f $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn
|
||||
fi
|
||||
/usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/export_dsn.py $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.kicad_pcb $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn
|
||||
$GITHUB_WORKSPACE/kibot/export_dsn.py -b $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.kicad_pcb -o $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.dsn
|
||||
done
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
name: 'Export Gerbers'
|
||||
description: 'Export Gerber files from a Kicad PCB'
|
||||
inputs:
|
||||
boards:
|
||||
description: 'Board name'
|
||||
required: true
|
||||
fab:
|
||||
description: 'Fabrication profile'
|
||||
default: 'jlcpcb'
|
||||
flags:
|
||||
description: 'Additional flags for kikit fab'
|
||||
default: '--no-assembly'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://yaqwsx/kikit:v0.7'
|
||||
entrypoint: '/bin/sh'
|
||||
args:
|
||||
- '-c'
|
||||
- |
|
||||
for board in ${{ inputs.boards }};
|
||||
do
|
||||
echo Processing $board
|
||||
mkdir -p $GITHUB_WORKSPACE/ergogen/output/gerbers/${board} ;
|
||||
kikit fab ${{ inputs.fab }} ${{ inputs.flags }} $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_routed.kicad_pcb $GITHUB_WORKSPACE/ergogen/output/gerbers/${board}/${board}.kicad_pcb
|
||||
done
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
name: 'Run KiBot'
|
||||
description: 'Run KiBot automation to generate images and gerbers'
|
||||
inputs:
|
||||
boards:
|
||||
description: 'KiCad PCB names'
|
||||
required: true
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://ghcr.io/inti-cmnb/kicad7_auto@latest'
|
||||
entrypoint: '/bin/sh'
|
||||
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;
|
||||
kibot -b ergogen/output/pcbs/${board}.kicad_pcb -c $GITHUB_WORKSPACE/kibot/boards.kibot.yaml
|
||||
done
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
name: 'Run DRC'
|
||||
description: 'Run Design Rules Check on generated PCB'
|
||||
inputs:
|
||||
boards:
|
||||
description: Bboard names'
|
||||
required: true
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://soundmonster/kicad-automation-scripts:latest'
|
||||
entrypoint: '/bin/sh'
|
||||
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
|
||||
/usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/run_drc.py $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_routed.kicad_pcb $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_drc/
|
||||
echo "## DRC result $board" >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
cat $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_drc/drc_result.rpt >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
done
|
||||
|
|
@ -30,28 +30,28 @@ jobs:
|
|||
run: npm install
|
||||
- name: Generate unrouted PCBs with Ergogen (definition in package.json)
|
||||
run: npm run build
|
||||
- name: Export DSN
|
||||
- name: Run KiBot to generate images, gerbers for the plate files
|
||||
uses: ./.github/actions/kibot
|
||||
with:
|
||||
boards: frontplate,backplate,controller_overlay,corney_island
|
||||
- name: Export DSN file for Freerouting
|
||||
uses: ./.github/actions/export-dsn
|
||||
with:
|
||||
boards: corney_island
|
||||
- name: Autoroute PCB
|
||||
uses: ./.github/actions/autoroute
|
||||
with:
|
||||
boards: corney_island
|
||||
- name: Import SES
|
||||
uses: ./.github/actions/import-ses
|
||||
with:
|
||||
boards: corney_island
|
||||
- name: DRC check
|
||||
uses: ./.github/actions/run-drc
|
||||
with:
|
||||
boards: corney_island
|
||||
- name: Export Gerbers
|
||||
uses: ./.github/actions/export-gerbers
|
||||
with:
|
||||
boards: corney_island
|
||||
# - name: Autoroute PCB
|
||||
# uses: ./.github/actions/autoroute
|
||||
# with:
|
||||
# boards: corney_island
|
||||
# - name: Import SES
|
||||
# uses: ./.github/actions/import-ses
|
||||
# with:
|
||||
# boards: corney_island
|
||||
# - name: DRC check
|
||||
# uses: ./.github/actions/run-drc
|
||||
# with:
|
||||
# boards: corney_island
|
||||
- name: Persist output
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: corney_island
|
||||
name: corney_island_unrouted
|
||||
path: ergogen/output
|
||||
26
build.sh
26
build.sh
|
|
@ -24,7 +24,7 @@ pcbdraw_style=set-black-hasl
|
|||
for plate in ${plates}
|
||||
do
|
||||
echo "\n\n>>>>>> Processing $plate <<<<<<\n\n"
|
||||
${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:1.6.2 kibot -b ergogen/output/pcbs/${plate}.kicad_pcb -c kibot/boards.kibot.yaml
|
||||
${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:latest kibot -b ergogen/output/pcbs/${plate}.kicad_pcb -c kibot/boards.kibot.yaml
|
||||
done
|
||||
|
||||
for board in ${boards}
|
||||
|
|
@ -33,17 +33,17 @@ do
|
|||
${container_cmd} run ${container_args} soundmonster/kicad-automation-scripts:latest /bin/sh -c "mkdir -p $HOME/.config/kicad; cp /root/.config/kicad/* $HOME/.config/kicad"
|
||||
if [ -e ergogen/output/pcbs/${board}.kicad_pcb ]; then
|
||||
echo Export DSN
|
||||
${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:1.6.2 kibot/export_dsn.py -b ergogen/output/pcbs/${board}.kicad_pcb -o ergogen/output/pcbs/${board}.dsn
|
||||
fi
|
||||
if [ -e ergogen/output/pcbs/${board}.dsn ]; then
|
||||
echo Autoroute PCB
|
||||
${container_cmd} run ${container_args} soundmonster/freerouting_cli:v0.1.0 java -jar /opt/freerouting_cli.jar -de ergogen/output/pcbs/${board}.dsn -do ergogen/output/pcbs/${board}.ses
|
||||
fi
|
||||
if [ -e ergogen/output/pcbs/${board}.ses ]; then
|
||||
echo "Import SES"
|
||||
${container_cmd} run ${container_args} soundmonster/kicad-automation-scripts:latest /usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/import_ses.py ergogen/output/pcbs/${board}.kicad_pcb ergogen/output/pcbs/${board}.ses --output-file ergogen/output/pcbs/${board}_routed.kicad_pcb
|
||||
fi
|
||||
if [ -e ergogen/output/pcbs/${board}_routed.kicad_pcb ]; then
|
||||
${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:1.6.2 kibot -b ergogen/output/pcbs/${board}_routed.kicad_pcb -c kibot/boards.kibot.yaml
|
||||
${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:latest kibot/export_dsn.py -b ergogen/output/pcbs/${board}.kicad_pcb -o ergogen/output/pcbs/${board}.dsn
|
||||
fi
|
||||
# if [ -e ergogen/output/pcbs/${board}.dsn ]; then
|
||||
# echo Autoroute PCB
|
||||
# ${container_cmd} run ${container_args} soundmonster/freerouting_cli:v0.1.0 java -jar /opt/freerouting_cli.jar -de ergogen/output/pcbs/${board}.dsn -do ergogen/output/pcbs/${board}.ses
|
||||
# fi
|
||||
# if [ -e ergogen/output/pcbs/${board}.ses ]; then
|
||||
# echo "Import SES"
|
||||
# ${container_cmd} run ${container_args} soundmonster/kicad-automation-scripts:latest /usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/import_ses.py ergogen/output/pcbs/${board}.kicad_pcb ergogen/output/pcbs/${board}.ses --output-file ergogen/output/pcbs/${board}_routed.kicad_pcb
|
||||
# fi
|
||||
# if [ -e ergogen/output/pcbs/${board}_routed.kicad_pcb ]; then
|
||||
# ${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:1.6.2 kibot -b ergogen/output/pcbs/${board}_routed.kicad_pcb -c kibot/boards.kibot.yaml
|
||||
# fi
|
||||
done
|
||||
Loading…
Reference in New Issue