Skip to content

Commit

Permalink
Try using container method for building datapack
Browse files Browse the repository at this point in the history
  • Loading branch information
Cimos committed Aug 18, 2024
1 parent 50eb543 commit 593070a
Showing 1 changed file with 45 additions and 29 deletions.
74 changes: 45 additions & 29 deletions .github/workflows/panelization.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,73 @@
name: Generate PCB Panel Datapack
name: Generate PCB panel datapack
on: [push, pull_request]
jobs:
build:
KiKit:
name: Test Build
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest

steps:
# Use current repo commit that triggered this build.
- uses: actions/checkout@v4
- name: Checkout (only last commit)
uses: actions/checkout@v4
with:
submodules: recursive

# Run bash command to get kicad file name.
- name: Get Kicad Project Name
- name: Get KiCad project name
run: echo "PROJECT_NAME=$(basename *.kicad_pro .kicad_pro)" >> $GITHUB_ENV

# Checkout kibot config repo
- name: Get Kibot Config
- name: Clone and Checkout our KiBot config
uses: actions/checkout@v4
with:
repository: Cimos/kibot-config
path: ./kibot-config
ref: 1-add-penalization-to-build

# - name: Commit files
- name: Check for panel file existence
id: check_files
uses: andstor/file-existence-action@v3
with:
files: "panelization.yaml"

- name: Generate panel file
- name: Run KiBot
if: steps.check_files.outputs.files_exists == 'true'
uses: INTI-CMNB/KiBot@v2_k8
with:
config: kibot-config/build.panel.yaml
dir: output
schema: '${{ env.PROJECT_NAME }}.kicad_sch'
board: '${{ env.PROJECT_NAME }}.kicad_pcb'
# log: log/log.log
verbose: 2
run: >-
kibot
--schematic ${{ env.PROJECT_NAME }}.kicad_sch
--board-file ${{ env.PROJECT_NAME }}.kicad_pcb
-out-dir output
--plot-config kibot-config/build.panel.yaml
2> logfile/kibot.log
# - name: Generate panel file
# if: steps.check_files.outputs.files_exists == 'true'
# uses: INTI-CMNB/KiBot@v2_k8
# with:
# config: kibot-config/build.panel.yaml
# dir: output
# schema: '${{ env.PROJECT_NAME }}.kicad_sch'
# board: '${{ env.PROJECT_NAME }}.kicad_pcb'
# # log: log/log.log
# verbose: 2

# Build datapack
- name: Build Panel Datapack
uses: INTI-CMNB/KiBot@v2_k8
# # Build datapack
# - name: Build panel datapack
# if: steps.check_files.outputs.files_exists == 'true'
# uses: INTI-CMNB/KiBot@v2_k8
# with:
# config: kibot-config/build.kibot.yaml
# dir: output
# schema: '${{ env.PROJECT_NAME }}.kicad_sch'
# board: '${{ env.PROJECT_NAME }}.kicad_pcb'
# # log: log/log.log
# verbose: 2

- name: Upload logfile
uses: actions/upload-artifact@v4
with:
config: kibot-config/build.kibot.yaml
dir: output
schema: '${{ env.PROJECT_NAME }}.kicad_sch'
board: '${{ env.PROJECT_NAME }}.kicad_pcb'
# log: log/log.log
verbose: 2
name: ${{ env.PROJECT_NAME }}-lofile
path: logfile

# Update artifacts
- name: Upload Results
- name: Upload datapack results
uses: actions/upload-artifact@v4
with:
name: ${{ env.PROJECT_NAME }}-panel-datapack
Expand Down

0 comments on commit 593070a

Please sign in to comment.