Abstract build steps for individual boards
This commit is contained in:
parent
2c005cfdee
commit
ed63aa1169
|
|
@ -1,10 +1,7 @@
|
|||
name: 'Autoroute'
|
||||
description: 'Autoroute a given DSN file to SES with FreeRouting'
|
||||
inputs:
|
||||
dsn_file:
|
||||
description: 'Specctra DSN input file'
|
||||
required: true
|
||||
ses_file:
|
||||
boards:
|
||||
description: 'Specctra SES output file'
|
||||
required: true
|
||||
runs:
|
||||
|
|
@ -14,4 +11,8 @@ runs:
|
|||
args:
|
||||
- '-c'
|
||||
- |
|
||||
java -jar /opt/freerouting_cli.jar -de ${{ inputs.dsn_file }} -do ${{ inputs.ses_file }}
|
||||
for board in ${{ inputs.boards }};
|
||||
do
|
||||
echo Processing $board
|
||||
java -jar /opt/freerouting_cli.jar -de output/pcbs/${board}.dsn -do output/pcbs/${board}.ses
|
||||
done
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
name: 'Export DSN'
|
||||
description: 'Export Specctra DSN from a Kicad PCB'
|
||||
inputs:
|
||||
pcb_file:
|
||||
description: 'Kicad input file'
|
||||
required: true
|
||||
dsn_file:
|
||||
description: 'Specctra DSN output file'
|
||||
board:
|
||||
description: 'Board name'
|
||||
required: true
|
||||
runs:
|
||||
using: 'docker'
|
||||
|
|
@ -18,5 +14,8 @@ runs:
|
|||
mkdir -p $HOME/.config/kicad ;
|
||||
cp /root/.config/kicad/* $HOME/.config/kicad ;
|
||||
gsettings set org.gnome.desktop.privacy remember-recent-files false
|
||||
/usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/export_dsn.py ${{ inputs.pcb_file }} ${{ inputs.dsn_file }}
|
||||
ls -lh ${{ inputs.pcb_file }} ${{ inputs.dsn_file }}
|
||||
for board in ${{ inputs.boards }};
|
||||
do
|
||||
echo Processing $board
|
||||
/usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/export_dsn.py pcbs/${board}.kicad_pcb pcbs/${board}.dsn
|
||||
done
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
name: 'Export Gerbers'
|
||||
description: 'Export Gerber files from a Kicad PCB'
|
||||
inputs:
|
||||
pcb_file:
|
||||
description: 'Kicad input file'
|
||||
required: true
|
||||
gerbers_dir:
|
||||
description: 'Gerbers folder'
|
||||
board:
|
||||
description: 'Board name'
|
||||
required: true
|
||||
fab:
|
||||
description: 'Fabrication profile'
|
||||
|
|
@ -20,5 +17,9 @@ runs:
|
|||
args:
|
||||
- '-c'
|
||||
- |
|
||||
mkdir -p $GITHUB_WORKSPACE/${{ inputs.gerbers_dir }} ;
|
||||
kikit fab ${{ inputs.fab }} ${{ inputs.flags }} $GITHUB_WORKSPACE/${{ inputs.pcb_file }} $GITHUB_WORKSPACE/${{ inputs.gerbers_dir }}
|
||||
for board in ${{ inputs.boards }};
|
||||
do
|
||||
echo Processing $board
|
||||
mkdir -p $GITHUB_WORKSPACE/gerbers/${$board} ;
|
||||
kikit fab ${{ inputs.fab }} ${{ inputs.flags }} $GITHUB_WORKSPACE/pcbs/${board}_routed.kicad_pcb $GITHUB_WORKSPACE/gerbers/${board}
|
||||
done
|
||||
|
|
|
|||
|
|
@ -1,14 +1,8 @@
|
|||
name: 'Import SES to Kicad'
|
||||
description: 'Import Specctra SES into a Kicad PCB'
|
||||
inputs:
|
||||
pcb_input_file:
|
||||
description: 'Kicad input file'
|
||||
required: true
|
||||
pcb_output_file:
|
||||
description: 'Kicad output file'
|
||||
required: true
|
||||
ses_file:
|
||||
description: 'Specctra SES file'
|
||||
board:
|
||||
description: 'Board name'
|
||||
required: true
|
||||
runs:
|
||||
using: 'docker'
|
||||
|
|
@ -20,4 +14,8 @@ runs:
|
|||
- |
|
||||
mkdir -p $HOME/.config/kicad ;
|
||||
cp /root/.config/kicad/* $HOME/.config/kicad ;
|
||||
/usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/import_ses.py $GITHUB_WORKSPACE/${{ inputs.pcb_input_file }} $GITHUB_WORKSPACE/${{ inputs.ses_file }} --output-file $GITHUB_WORKSPACE/${{ inputs.pcb_output_file }};
|
||||
for board in ${{ inputs.boards }};
|
||||
do
|
||||
echo Processing $board
|
||||
/usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/import_ses.py $GITHUB_WORKSPACE/pcbs/${board}.kicad_pcb $GITHUB_WORKSPACE/pcbs/${board}.ses --output-file $GITHUB_WORKSPACE/pcbs/${board}_routed.kicad_pcb;
|
||||
done
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
name: 'Run DRC'
|
||||
description: 'Run Design Rules Check on generated PCB'
|
||||
inputs:
|
||||
pcb_input_file:
|
||||
description: 'Kicad input file'
|
||||
required: true
|
||||
drc_output:
|
||||
description: 'DRC output'
|
||||
boards:
|
||||
description: Bboard names'
|
||||
required: true
|
||||
runs:
|
||||
using: 'docker'
|
||||
|
|
@ -17,5 +14,11 @@ runs:
|
|||
- |
|
||||
mkdir -p $HOME/.config/kicad ;
|
||||
cp /root/.config/kicad/* $HOME/.config/kicad ;
|
||||
/usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/run_drc.py $GITHUB_WORKSPACE/${{ inputs.pcb_input_file }} $GITHUB_WORKSPACE/${{ inputs.drc_output }}
|
||||
cat $GITHUB_WORKSPACE/${{ inputs.drc_output }}/drc_result.rpt >> "$GITHUB_STEP_SUMMARY"
|
||||
for board in ${{ inputs.boards }};
|
||||
do
|
||||
/usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/run_drc.py $GITHUB_WORKSPACE/pcbs/${{ $board }}_routed.kicad_pcb $GITHUB_WORKSPACE/pcbs/${{ board }}-drc/
|
||||
echo "## DRC result $board" >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
cat $GITHUB_WORKSPACE/pcbs/${{ board }}-drc/drc_result.rpt >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
done
|
||||
|
|
|
|||
|
|
@ -16,66 +16,30 @@ jobs:
|
|||
run: npm install
|
||||
- name: Generate unrouted PCBs
|
||||
run: npm run gen
|
||||
# autoroute:
|
||||
# name: Autoroute
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
- name: Export DSN for Left PCB
|
||||
- name: Export DSN
|
||||
uses: ./.github/actions/export-dsn
|
||||
with:
|
||||
boards: left right
|
||||
pcb_file: output/pcbs/left.kicad_pcb
|
||||
dsn_file: output/pcbs/left.dsn
|
||||
- name: Export DSN for Right PCB
|
||||
uses: ./.github/actions/export-dsn
|
||||
with:
|
||||
pcb_file: output/pcbs/right.kicad_pcb
|
||||
dsn_file: output/pcbs/right.dsn
|
||||
- name: Autoroute Left PCB
|
||||
- name: Autoroute PCB
|
||||
uses: ./.github/actions/autoroute
|
||||
with:
|
||||
boards: left right
|
||||
dsn_file: output/pcbs/left.dsn
|
||||
ses_file: output/pcbs/left.ses
|
||||
- name: Autoroute Right PCB
|
||||
uses: ./.github/actions/autoroute
|
||||
with:
|
||||
dsn_file: output/pcbs/right.dsn
|
||||
ses_file: output/pcbs/right.ses
|
||||
- name: Import SES into Left PCB
|
||||
- name: Import SES
|
||||
uses: ./.github/actions/import-ses
|
||||
with:
|
||||
pcb_input_file: output/pcbs/left.kicad_pcb
|
||||
pcb_output_file: output/pcbs/left_routed.kicad_pcb
|
||||
ses_file: output/pcbs/left.ses
|
||||
- name: Import SES into Right PCB
|
||||
uses: ./.github/actions/import-ses
|
||||
with:
|
||||
pcb_input_file: output/pcbs/right.kicad_pcb
|
||||
pcb_output_file: output/pcbs/right_routed.kicad_pcb
|
||||
ses_file: output/pcbs/right.ses
|
||||
- name: Left board DRC check
|
||||
boards: left right
|
||||
- name: DRC check
|
||||
uses: ./.github/actions/run-drc
|
||||
with:
|
||||
pcb_input_file: output/pcbs/left_routed.kicad_pcb
|
||||
drc_output: output/pcbs/left-drc/
|
||||
- name: Right board DRC check
|
||||
uses: ./.github/actions/run-drc
|
||||
with:
|
||||
pcb_input_file: output/pcbs/right_routed.kicad_pcb
|
||||
drc_output: output/pcbs/right-drc/
|
||||
# gerbers:
|
||||
# name: Generate Gerbers
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
- name: Export Gerbers for Left PCB
|
||||
boards: left right
|
||||
- name: Export Gerbers
|
||||
uses: ./.github/actions/export-gerbers
|
||||
with:
|
||||
pcb_file: output/pcbs/left_routed.kicad_pcb
|
||||
gerbers_dir: output/gerbers/left
|
||||
- name: Export Gerbers for Right PCB
|
||||
uses: ./.github/actions/export-gerbers
|
||||
with:
|
||||
pcb_file: output/pcbs/right_routed.kicad_pcb
|
||||
gerbers_dir: output/gerbers/left
|
||||
boards: left right
|
||||
- name: Persist output
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in New Issue