apcountryman / prototype-kicad-project-ci-cd

KiCad project CI/CD prototype.
Other
0 stars 1 forks source link

Design production files generation CI job #25

Closed jaylamb closed 2 years ago

jaylamb commented 3 years ago

Feature Design Add production files generation CI script (ci/generate-production-files) which will create a directory (prodcution_files) within the project repository, if it does not already exist. The directory should be the target for the KiBot script's output, which will include all project printed circuit board Gerbers, drill files, and pick-and-place files.

Feature Use Case This CI job will run automatically as a part of pull requests, releases, etc... and will produce production files (Gerbers, drills, pick and place) for all printed circuit boards contained within a project repository.

Detailed Design

local kibot_config_file; kibot_config_file="$repository/kibot_config.kibot.yaml"
local output_dir; output_dir="$repository/production_files/"
local layouts; mapfile -t layouts < <( git -C "$repository" ls-files '*.kicad_pcb' | xargs -r -d '\n' -I '{}' find "$repository/{}" ); readonly layouts

for layout in "${layouts[@]}"; do
    if ! "$repository/utilities/KiBot/src/kibot" -b "$layout" -c "$kibot_config_file" -d "$output_dir"; then
        abort
    fi  
done

preflight: check_zone_fills: false run_drc: false run_erc: false update_xml: false

global: output: '%f-%i.%x'

outputs:

apcountryman commented 2 years ago

The design generally LGTM. A few notes:

I'll open a type-feature issue for implementing this new feature shortly.