Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbez1 authored Oct 6, 2024
2 parents 8dc3e68 + 13046a8 commit 14bf5e3
Show file tree
Hide file tree
Showing 104 changed files with 6,768 additions and 91,999 deletions.
93 changes: 60 additions & 33 deletions .github/workflows/3d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,63 +18,89 @@ jobs:
- name: Install dependencies
run: ./3d/scripts/dependencies.sh

- name: Generate 2d output
- name: 'Generate 2d output :: 52 flap :: generic'
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python -u 3d/scripts/generate_2d.py --render-raster
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector.svg
cp 3d/build/laser_parts/raster.png 3d/build/outputs/3d_laser_raster.png
./scripts/annotate_image.sh 3d/build/outputs/3d_laser_raster.png
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python -u 3d/scripts/generate_2d.py --no-connectors --calculate-dimensions --render-raster
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-52.svg
cp 3d/build/laser_parts/raster.png 3d/build/outputs/3d_laser_raster-52.png
./scripts/annotate_image.sh 3d/build/outputs/3d_laser_raster-52.png
cp 3d/build/laser_parts/combined_module_dimensions.svg 3d/build/outputs/3d_laser_vector-52-module_dimensions.svg
- name: Generate 2d output (Ponoko 3mm MDF)
- name: 'Generate 2d output :: 52 flap :: Ponoko 3mm MDF)'
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --calculate-dimensions --kerf-preset ponoko-3mm-mdf
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-ponoko-3mm-mdf_1x.svg
cp 3d/build/laser_parts/combined_dimensions.txt 3d/build/outputs/3d_laser_vector-ponoko-3mm-mdf_1x_dimensions.txt
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --no-connectors --calculate-dimensions --kerf-preset ponoko-3mm-mdf
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-52-ponoko-3mm-mdf_1x.svg
cp 3d/build/laser_parts/combined_panel_dimensions.svg 3d/build/outputs/3d_laser_vector-52-ponoko-3mm-mdf_1x_dimensions.svg
- name: Generate 2d output (Ponoko 3mm Acrylic)
- name: 'Generate 2d output :: 52 flap :: Ponoko 3mm Acrylic'
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --calculate-dimensions --kerf-preset ponoko-3mm-acrylic
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-ponoko-3mm-acrylic_1x.svg
cp 3d/build/laser_parts/combined_dimensions.txt 3d/build/outputs/3d_laser_vector-ponoko-3mm-acrylic_1x_dimensions.txt
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --no-connectors --calculate-dimensions --kerf-preset ponoko-3mm-acrylic
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-52-ponoko-3mm-acrylic_1x.svg
cp 3d/build/laser_parts/combined_panel_dimensions.svg 3d/build/outputs/3d_laser_vector-52-ponoko-3mm-acrylic_1x_dimensions.svg
- name: Generate 2d output (Ponoko 3mm MDF - 4x)
- name: 'Generate 2d output :: 52 flap :: Elecrow 3mm Wood'
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --calculate-dimensions --kerf-preset ponoko-3mm-mdf --panelize 4
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-ponoko-3mm-mdf_4x.svg
cp 3d/build/laser_parts/combined_dimensions.txt 3d/build/outputs/3d_laser_vector-ponoko-3mm-mdf_4x.txt
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --no-connectors --kerf-preset elecrow-3mm-wood --render-elecrow
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-52-elecrow-3mm-wood_1x.svg
cp 3d/build/laser_parts/combined_panel_dimensions.svg 3d/build/outputs/3d_laser_vector-52-elecrow-3mm-wood_1x_dimensions.svg
cp 3d/build/laser_parts/elecrow.zip 3d/build/outputs/3d_laser_vector-52-elecrow-3mm-wood_1x.zip
- name: Generate 2d output (Ponoko 3mm Acrylic - 4x)
- name: 'Generate 2d output :: 52 flap :: Elecrow 3mm Acrylic'
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --calculate-dimensions --kerf-preset ponoko-3mm-acrylic --panelize 4
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-ponoko-3mm-acrylic_4x.svg
cp 3d/build/laser_parts/combined_dimensions.txt 3d/build/outputs/3d_laser_vector-ponoko-3mm-acrylic_4x_dimensions.txt
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --no-connectors --kerf-preset elecrow-3mm-acrylic --render-elecrow
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-52-elecrow-3mm-acrylic_1x.svg
cp 3d/build/laser_parts/combined_panel_dimensions.svg 3d/build/outputs/3d_laser_vector-52-elecrow-3mm-acrylic_1x_dimensions.svg
cp 3d/build/laser_parts/elecrow.zip 3d/build/outputs/3d_laser_vector-52-elecrow-3mm-acrylic_1x.zip
- name: Generate 2d output (Elecrow 3mm Wood)
- name: 'Generate 2d output :: 40 flap :: generic'
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python -u 3d/scripts/generate_2d.py --no-connectors --calculate-dimensions --render-raster --num-flaps 40
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-40.svg
cp 3d/build/laser_parts/raster.png 3d/build/outputs/3d_laser_raster-40.png
./scripts/annotate_image.sh 3d/build/outputs/3d_laser_raster-40.png
cp 3d/build/laser_parts/combined_module_dimensions.svg 3d/build/outputs/3d_laser_vector-40-module_dimensions.svg
- name: 'Generate 2d output :: 40 flap :: Ponoko 3mm MDF)'
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --no-connectors --calculate-dimensions --kerf-preset ponoko-3mm-mdf --num-flaps 40
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-40-ponoko-3mm-mdf_1x.svg
cp 3d/build/laser_parts/combined_panel_dimensions.svg 3d/build/outputs/3d_laser_vector-40-ponoko-3mm-mdf_1x_dimensions.svg
- name: 'Generate 2d output :: 40 flap :: Ponoko 3mm Acrylic'
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --no-connectors --calculate-dimensions --kerf-preset ponoko-3mm-acrylic --num-flaps 40
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-40-ponoko-3mm-acrylic_1x.svg
cp 3d/build/laser_parts/combined_panel_dimensions.svg 3d/build/outputs/3d_laser_vector-40-ponoko-3mm-acrylic_1x_dimensions.svg
- name: 'Generate 2d output :: 40 flap :: Elecrow 3mm Wood'
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --kerf-preset elecrow-3mm-wood --render-elecrow
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-elecrow-3mm-wood_1x.svg
cp 3d/build/laser_parts/combined_dimensions.txt 3d/build/outputs/3d_laser_vector-elecrow-3mm-wood_1x_dimensions.txt
cp 3d/build/laser_parts/elecrow.zip 3d/build/outputs/3d_laser_vector-elecrow-3mm-wood_1x.zip
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --no-connectors --kerf-preset elecrow-3mm-wood --render-elecrow --num-flaps 40
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-40-elecrow-3mm-wood_1x.svg
cp 3d/build/laser_parts/combined_panel_dimensions.svg 3d/build/outputs/3d_laser_vector-40-elecrow-3mm-wood_1x_dimensions.svg
cp 3d/build/laser_parts/elecrow.zip 3d/build/outputs/3d_laser_vector-40-elecrow-3mm-wood_1x.zip
- name: Generate 2d output (Elecrow 3mm Acrylic)
- name: 'Generate 2d output :: 40 flap :: Elecrow 3mm Acrylic'
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --kerf-preset elecrow-3mm-acrylic --render-elecrow
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-elecrow-3mm-acrylic_1x.svg
cp 3d/build/laser_parts/combined_dimensions.txt 3d/build/outputs/3d_laser_vector-elecrow-3mm-acrylic_1x_dimensions.txt
cp 3d/build/laser_parts/elecrow.zip 3d/build/outputs/3d_laser_vector-elecrow-3mm-acrylic_1x.zip
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_2d.py --no-connectors --kerf-preset elecrow-3mm-acrylic --render-elecrow --num-flaps 40
cp 3d/build/laser_parts/combined.svg 3d/build/outputs/3d_laser_vector-40-elecrow-3mm-acrylic_1x.svg
cp 3d/build/laser_parts/combined_panel_dimensions.svg 3d/build/outputs/3d_laser_vector-40-elecrow-3mm-acrylic_1x_dimensions.svg
cp 3d/build/laser_parts/elecrow.zip 3d/build/outputs/3d_laser_vector-40-elecrow-3mm-acrylic_1x.zip
- name: Generate animated gif
run: |
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 -u 3d/scripts/generate_gif.py
cp 3d/build/animation/animation.gif 3d/build/outputs/3d_animation.gif
cp 3d/build/animation/all_flaps.gif 3d/build/outputs/all_flaps.gif
- name: Generate STLs for web viewer
run: |
python -u 3d/scripts/generate_stl.py
cp -r 3d/build/colored_stl 3d/build/outputs/3d_colored_stl
gzip 3d/build/outputs/3d_colored_stl/*.stl
- name: Archive artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: 3d
Expand All @@ -92,4 +118,5 @@ jobs:
- name: Sync artifacts to S3
if: github.event_name == 'push' && github.repository_owner == 'scottbez1'
run: |
aws s3 sync 3d/build/outputs s3://splitflap-artifacts/${GITHUB_REF#refs/heads/}/3d --delete --acl public-read --cache-control max-age=0,no-cache
aws s3 sync 3d/build/outputs s3://splitflap-artifacts/${GITHUB_REF#refs/heads/}/3d --exclude '3d_colored_stl/*.stl.gz' --delete --acl public-read --cache-control max-age=0,no-cache
aws s3 sync 3d/build/outputs s3://splitflap-artifacts/${GITHUB_REF#refs/heads/}/3d --exclude '*' --include '3d_colored_stl/*.stl.gz' --delete --content-encoding gzip --acl public-read --cache-control max-age=0,no-cache
89 changes: 12 additions & 77 deletions .github/workflows/electronics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
export-electronics-classic:
name: Export Electronics (Classic + Sensor)
name: Export Electronics (Sensor)
runs-on: ubuntu-20.04

steps:
Expand All @@ -19,59 +19,6 @@ jobs:
- name: Install dependencies
run: ./electronics/scripts/dependencies.sh

# Classic Controller board:
- name: Export Classic Controller schematic
run: |
./electronics/scripts/export_schematic.py electronics/splitflap.sch
cp electronics/build/splitflap.pdf electronics/build/outputs/classic-schematic.pdf
cp electronics/build/splitflap.png electronics/build/outputs/classic-schematic.png
env:
PYTHONUNBUFFERED: 1

- name: Export Classic Controller PCB SVG
run: |
./electronics/scripts/generate_svg.py electronics/splitflap.kicad_pcb
cp electronics/build/splitflap_merged.png electronics/build/outputs/classic-pcb-raster.png
./scripts/annotate_image.sh electronics/build/outputs/classic-pcb-raster.png
env:
PYTHONUNBUFFERED: 1

- name: Export Classic Controller PCB fabrication files
run: |
./electronics/scripts/export_jlcpcb.py electronics/splitflap.kicad_pcb
cp -r electronics/build/splitflap-jlc electronics/build/outputs/classic-jlc
- name: Export Classic Controller PCB overview PDF
run: |
./electronics/scripts/generate_pdf.py electronics/splitflap.kicad_pcb
cp electronics/build/splitflap-pcb-packet.pdf electronics/build/outputs/classic-pcb-packet.pdf
env:
PYTHONUNBUFFERED: 1

- name: Panelize Classic Controller PCB
run: |
kikit panelize -p electronics/scripts/config/kikit_panelize_classic.json electronics/splitflap.kicad_pcb electronics/build/panelized_splitflap.kicad_pcb
- name: Export panelized Classic Controller PCB SVG
run: |
./electronics/scripts/generate_svg.py electronics/build/panelized_splitflap.kicad_pcb
cp electronics/build/panelized_splitflap_merged.png electronics/build/outputs/classic-panelized-pcb-raster.png
./scripts/annotate_image.sh electronics/build/outputs/classic-panelized-pcb-raster.png
env:
PYTHONUNBUFFERED: 1

- name: Export panelized Classic Controller PCB fabrication files
run: |
./electronics/scripts/export_jlcpcb.py electronics/build/panelized_splitflap.kicad_pcb
cp -r electronics/build/panelized_splitflap-jlc electronics/build/outputs/classic-panelized-jlc
- name: Export panelized Classic Controller PCB overview PDF
run: |
./electronics/scripts/generate_pdf.py electronics/build/panelized_splitflap.kicad_pcb
cp electronics/build/panelized_splitflap-pcb-packet.pdf electronics/build/outputs/classic-panelized-pcb-packet.pdf
env:
PYTHONUNBUFFERED: 1

# Sensor board:
- name: Export sensor schematic
run: |
Expand Down Expand Up @@ -117,20 +64,8 @@ jobs:
env:
PYTHONUNBUFFERED: 1

# Note: These kibot scripts are run last because they mess with file permissions which breaks other scripts, not sure why
- name: Export BOM [classic + sensors]
uses: INTI-CMNB/KiBot@2ddbea3e681de09147cb1677890694857def32a8
with:
config: electronics/splitflap.kibot.yml
dir: electronics/build
schema: 'electronics/splitflap.sch'
board: 'electronics/splitflap.kicad_pcb'

- name: Copy BOM outputs
run: cp -r electronics/build/bom electronics/build/outputs

- name: Archive artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: electronics-classic
Expand Down Expand Up @@ -204,7 +139,7 @@ jobs:

# Note: These kibot scripts are run last because they mess with file permissions which breaks other scripts, not sure why
- name: Export BOM [chainlinkDriver]
uses: INTI-CMNB/KiBot@2ddbea3e681de09147cb1677890694857def32a8
uses: INTI-CMNB/KiBot@c723b51327c2d9b7863672698ae5fd3da58b386e
with:
config: electronics/chainlinkDriver/chainlinkDriver.kibot.yml
dir: electronics/build
Expand All @@ -215,7 +150,7 @@ jobs:
run: cp -r electronics/build/bom electronics/build/outputs

- name: Archive artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: electronics-chainlink
Expand Down Expand Up @@ -291,7 +226,7 @@ jobs:

# Note: These kibot scripts are run last because they mess with file permissions which breaks other scripts, not sure why
- name: Export BOM [chainlinkDriverTester]
uses: INTI-CMNB/KiBot@2ddbea3e681de09147cb1677890694857def32a8
uses: INTI-CMNB/KiBot@c723b51327c2d9b7863672698ae5fd3da58b386e
with:
config: electronics/chainlinkDriverTester/chainlinkDriverTester.kibot.yml
dir: electronics/build
Expand All @@ -302,7 +237,7 @@ jobs:
run: cp -r electronics/build/bom electronics/build/outputs

- name: Archive artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: electronics-chainlink-tester
Expand Down Expand Up @@ -376,7 +311,7 @@ jobs:

# Note: These kibot scripts are run last because they mess with file permissions which breaks other scripts, not sure why
- name: Export BOM [chainlinkBase]
uses: INTI-CMNB/KiBot@2ddbea3e681de09147cb1677890694857def32a8
uses: INTI-CMNB/KiBot@c723b51327c2d9b7863672698ae5fd3da58b386e
with:
config: electronics/chainlinkBase/chainlinkBase.kibot.yml
dir: electronics/build
Expand All @@ -387,7 +322,7 @@ jobs:
run: cp -r electronics/build/bom electronics/build/outputs

- name: Archive artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: electronics-chainlink-base
Expand Down Expand Up @@ -484,7 +419,7 @@ jobs:

# Note: These kibot scripts are run last because they mess with file permissions which breaks other scripts, not sure why
- name: Export BOM [chainlinkBuddyTDisplay]
uses: INTI-CMNB/KiBot@2ddbea3e681de09147cb1677890694857def32a8
uses: INTI-CMNB/KiBot@c723b51327c2d9b7863672698ae5fd3da58b386e
with:
config: electronics/chainlinkBuddyTDisplay/chainlinkBuddyTDisplay.kibot.yml
dir: electronics/build
Expand All @@ -495,7 +430,7 @@ jobs:
run: cp -r electronics/build/bom electronics/build/outputs

- name: Archive artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: electronics-chainlink-buddy-t-display
Expand Down Expand Up @@ -592,7 +527,7 @@ jobs:

# Note: These kibot scripts are run last because they mess with file permissions which breaks other scripts, not sure why
- name: Export BOM [chainlinkBuddyBreadboard]
uses: INTI-CMNB/KiBot@2ddbea3e681de09147cb1677890694857def32a8
uses: INTI-CMNB/KiBot@c723b51327c2d9b7863672698ae5fd3da58b386e
with:
config: electronics/chainlinkBuddyBreadboard/chainlinkBuddyBreadboard.kibot.yml
dir: electronics/build
Expand All @@ -603,7 +538,7 @@ jobs:
run: cp -r electronics/build/bom electronics/build/outputs

- name: Archive artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: electronics-chainlink-buddy-breadboard
Expand Down
Loading

0 comments on commit 14bf5e3

Please sign in to comment.