apcountryman / prototype-kicad-project-ci-cd

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

Design schematic PDF generation CI job #13

Closed jaylamb closed 3 years ago

jaylamb commented 3 years ago

Feature Design

Feature Use Case

This CI job will run automatically as a part of pull requests, releases, etc... and will ensure that PDF versions of all schematic sheets are available for use by users/reviewers.

Detailed Design

for schematic in "${schematics[@]}"; do if ! "$repository/utilities/KiAuto/src/eeschema_do" export -a "$schematic" "$repository/schematic-pdfs"; then abort fi done


- [ ] Add schematic PDF exporting and PDF artifact generation to `.github/workflows/ci.yml`:
```yaml
generate-schematic-pdf:
    name: Generate schematic PDF(s)
    runs-on: ubuntu-20.04
    steps:
        - uses: actions/checkout@v2
          with:
              submodules: recursive
        - name: Generate schematic PDF(s)
          shell: bash
          run: ./ci/generate-schematic-pdf
        - name: Archive production artifacts
          uses: actions/upload-artifact@v2
          with:
            name: upload-schematics
            path: |
              schematic-pdfs
            retention-days: 7
apcountryman commented 3 years ago

The schematic PDF generation script looks good to me. Consider changing "$repository/deliverables" to "$repository/schematic-pdfs" since the directory will only contain schematic PDFs.

Please add the required .github/workflow/ci.yml updates to the design. I think it would be a good idea to store the generated schematic PDFs as workflow artifacts to make a PR reviewer's job easier. 7 days seems like it would be a reasonable artifact retention period. More information about storing workflow data as artifacts can be found at https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts.

apcountryman commented 3 years ago

A few things:

Other than these, this design LGTM. I'll open a type-feature issue for implementing this new feature shortly.