forked from opulo-inc/lumenpnp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
125 changed files
with
463,631 additions
and
134,104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
name: generate-feeder-pcb-artifacts | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'feeder/pcb/**.sch' | ||
- 'feeder/pcb/**.kicad_pcb' | ||
- 'feeder/pcb/**.kibot.yaml' | ||
- '.github/workflows/generate-feeder-pcb-artifacts.yaml' | ||
- '**.kibot.yaml' | ||
pull_request: | ||
paths: | ||
- 'feeder/pcb/**.sch' | ||
- 'feeder/pcb/**.kicad_pcb' | ||
- 'feeder/pcb/**.kibot.yaml' | ||
- '.github/workflows/generate-feeder-pcb-artifacts.yaml' | ||
- '**.kibot.yaml' | ||
|
||
env: | ||
repo: index-machines/index | ||
main_branch: master | ||
|
||
jobs: | ||
generate-artifacts: | ||
runs-on: ubuntu-latest | ||
container: setsoft/kicad_auto:latest | ||
|
||
steps: | ||
- name: Update system repositories | ||
run: | | ||
apt update | ||
apt -y install git git-lfs zip librsvg2-bin imagemagick | ||
- name: Print Repo Info | ||
run: | | ||
echo 'repo: ${{github.repository}}' | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
|
||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
|
||
- name: Update the PCBs with the git hash | ||
if: steps.extract_branch.outputs.branch == env.main_branch | ||
run: | | ||
export COMMIT=$(git rev-parse --short HEAD) | ||
echo "COMMIT = ${COMMIT}" | ||
sed -i "s!<<hash>>!${COMMIT}!" feeder/pcb/mobo/mobo.kicad_pcb | ||
sed -i "s!<<hash>>!${COMMIT}!" feeder/pcb/feederFloor/feederFloor.kicad_pcb | ||
sed -i "s!<<hash>>!${COMMIT}!" feeder/pcb/indexingWheel/indexingWheel.kicad_pcb | ||
- name: Update the PCBs with the git hash and Beta | ||
if: steps.extract_branch.outputs.branch != env.main_branch | ||
run: | | ||
export COMMIT=$(git rev-parse --short HEAD) | ||
echo "COMMIT = ${COMMIT}" | ||
sed -i "s!<<hash>>!BETA-${COMMIT}!" feeder/pcb/mobo/mobo.kicad_pcb | ||
sed -i "s!<<hash>>!BETA-${COMMIT}!" feeder/pcb/feederFloor/feederFloor.kicad_pcb | ||
sed -i "s!<<hash>>!BETA-${COMMIT}!" feeder/pcb/indexingWheel/indexingWheel.kicad_pcb | ||
- name: Run feeder mobo KiBot | ||
run: cd feeder/pcb/mobo && kibot -c config.kibot.yaml -e mobo.sch -b mobo.kicad_pcb -d export | ||
|
||
- name: Compress feeder mobo Gerbers for PCB Fab | ||
run: cd feeder/pcb/mobo/export/gerbers && zip -r -j ../feeder_mobo_gerbers.zip * | ||
|
||
- name: upload mobo artifacts | ||
uses: actions/upload-artifact@v2 | ||
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.repository != env.repo) | ||
with: | ||
name: feeder_mobo_output | ||
path: feeder/pcb/mobo/export | ||
|
||
- name: Run indexingWheel KiBot | ||
run: cd feeder/pcb/indexingWheel && kibot -c ../../../config-blank.kibot.yaml -e indexingWheel.sch -b indexingWheel.kicad_pcb -d export | ||
|
||
- name: Compress indexingWheel Gerbers for PCB Fab | ||
run: cd feeder/pcb/indexingWheel/export/gerbers && zip -r -j ../feeder_indexingWheel_gerbers.zip * | ||
|
||
- name: upload indexingWheel results | ||
uses: actions/upload-artifact@v2 | ||
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.repository != env.repo) | ||
with: | ||
name: feeder_indexingWheel_output | ||
path: feeder/pcb/indexingWheel/export | ||
|
||
- name: Run feederFloor KiBot | ||
run: cd feeder/pcb/feederFloor && kibot -c ../../../config.kibot.yaml -e feederFloor.sch -b feederFloor.kicad_pcb -d export | ||
|
||
- name: Compress feederFloor Gerbers for PCB Fab | ||
run: cd feeder/pcb/feederFloor/export/gerbers && zip -r -j ../feeder_feederFloor_gerbers.zip * | ||
|
||
- name: upload feederFloor results | ||
uses: actions/upload-artifact@v2 | ||
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.repository != env.repo) | ||
with: | ||
name: feeder_feederFloor_output | ||
path: feeder/pcb/feederFloor/export | ||
|
||
- name: Commit files | ||
if: github.event_name == 'push' && github.repository == env.repo | ||
run: | | ||
git add -f feeder/pcb/mobo/export | ||
git add -f feeder/pcb/indexingWheel/export | ||
git add -f feeder/pcb/feederFloor/export | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git status | ||
git commit -m "CI: Generate Gerbers and Associated Artifacts" | ||
git push -u origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Example KiPlot config file | ||
kibot: | ||
version: 1 | ||
|
||
global: | ||
variant: default | ||
|
||
variants: | ||
- name: default | ||
comment: 'Just a place holder for the rotation filter' | ||
type: kibom | ||
variant: default | ||
|
||
preflight: | ||
# Disable ERC for now while GPereira updates these items. | ||
run_erc: false | ||
update_xml: true | ||
# Disable DRC for now while GPereira updates these items. | ||
run_drc: false | ||
check_zone_fills: true | ||
ignore_unconnected: false | ||
|
||
outputs: | ||
|
||
- name: 'gerbers' | ||
comment: "Gerbers for the board house" | ||
type: gerber | ||
dir: gerbers | ||
options: | ||
# generic layer options | ||
exclude_edge_layer: true | ||
exclude_pads_from_silkscreen: false | ||
use_aux_axis_as_origin: false | ||
plot_sheet_reference: false | ||
plot_footprint_refs: true | ||
plot_footprint_values: true | ||
force_plot_invisible_refs_vals: false | ||
tent_vias: true | ||
|
||
# gerber options | ||
line_width: 0.1 | ||
subtract_mask_from_silk: false | ||
use_protel_extensions: false | ||
gerber_precision: 4.6 | ||
create_gerber_job_file: true | ||
use_gerber_x2_attributes: false | ||
use_gerber_net_attributes: false | ||
|
||
output: '%f.%i' | ||
|
||
|
||
layers: | ||
# When Moving to Four Layer, Set G2L and G3L as the suffixes | ||
- layer: F.Cu | ||
suffix: GTL | ||
- layer: B.Cu | ||
suffix: GBL | ||
- layer: F.SilkS | ||
suffix: GTO | ||
- layer: B.SilkS | ||
suffix: GBO | ||
- layer: F.Mask | ||
suffix: GTS | ||
- layer: B.Mask | ||
suffix: GBS | ||
- layer: Edge.Cuts | ||
suffix: GKO | ||
|
||
- name: 'drill_file' | ||
comment: 'Drill file for Board House' | ||
type: excellon | ||
dir: gerbers | ||
options: | ||
metric_units: false | ||
pth_and_npth_single_file: true | ||
|
||
- name: board_top | ||
comment: "Top layer view" | ||
type: pcbdraw | ||
dir: . | ||
options: | ||
format: png | ||
|
||
- name: board_bottom | ||
comment: "Bottom layer view" | ||
type: pcbdraw | ||
dir: . | ||
options: | ||
format: png | ||
bottom: true | ||
|
||
- name: 'step_file' | ||
comment: 'STEP file generation' | ||
type: step | ||
dir: . |
Oops, something went wrong.