mirror of
https://gitlab.com/kicad/libraries/kicad-footprints.git
synced 2025-04-12 18:49:35 +00:00
CI: Add visual diff output
This commit is contained in:
parent
2838f38627
commit
fddb061200
@ -1,15 +1,16 @@
|
||||
image: python:latest
|
||||
|
||||
stages:
|
||||
- test
|
||||
- screenshot
|
||||
- diffs
|
||||
- test
|
||||
- convert
|
||||
|
||||
before_script:
|
||||
- python -V
|
||||
- git clone --depth 1 https://gitlab.com/kicad/libraries/kicad-library-utils $CI_BUILDS_DIR/kicad-library-utils
|
||||
- git config --global --add safe.directory $(realpath .)
|
||||
|
||||
footprints:
|
||||
klc-check:
|
||||
stage: test
|
||||
only:
|
||||
refs:
|
||||
@ -18,7 +19,7 @@ footprints:
|
||||
- "**/*.kicad_mod"
|
||||
- "fp-lib-table"
|
||||
script:
|
||||
- $CI_BUILDS_DIR/kicad-library-utils/klc-check/gitlabci/check_footprints.sh
|
||||
- $CI_BUILDS_DIR/kicad-library-utils/tools/gitlabci/check_footprints.sh
|
||||
artifacts:
|
||||
reports:
|
||||
metrics: metrics.txt
|
||||
@ -57,10 +58,35 @@ screenshot:
|
||||
- sudo apt update -qq
|
||||
- sudo apt install curl inkscape python3 git -qqy --no-install-recommends
|
||||
- mkdir -p $HOME/.config/kicad/6.99/colors
|
||||
- git clone --depth 1 https://gitlab.com/kicad/libraries/kicad-library-utils $CI_BUILDS_DIR/kicad-library-utils
|
||||
- git clone --depth 1 --branch experiment-html-diff https://gitlab.com/neinseg/kicad-library-utils $CI_BUILDS_DIR/kicad-library-utils
|
||||
- git config --global --add safe.directory $(realpath .)
|
||||
script:
|
||||
- $CI_BUILDS_DIR/kicad-library-utils/klc-check/gitlabci/screenshot_footprints.sh
|
||||
- $CI_BUILDS_DIR/kicad-library-utils/tools/gitlabci/screenshot_footprints.sh
|
||||
artifacts:
|
||||
expose_as: 'Screenshots'
|
||||
paths:
|
||||
- screenshots/
|
||||
|
||||
visual_diff:
|
||||
stage: diffs
|
||||
image: kicad/kicad:nightly
|
||||
only:
|
||||
refs:
|
||||
- merge_requests
|
||||
changes:
|
||||
- "**/*.kicad_mod"
|
||||
script:
|
||||
- mkdir -p $HOME/.config/kicad/7.0/colors
|
||||
- sudo apt update -qq
|
||||
- sudo apt install curl python3 python3-pip -qqy --no-install-recommends
|
||||
- python3 -V
|
||||
- pip install pygments wsdiff jinja2
|
||||
- $CI_BUILDS_DIR/kicad-library-utils/tools/gitlabci/visual_diff.sh
|
||||
- mkdir diffs
|
||||
- mv *.diff diffs/
|
||||
artifacts:
|
||||
expose_as: "Visual Diff"
|
||||
paths:
|
||||
- "diffs/"
|
||||
dependencies:
|
||||
- screenshot
|
||||
|
Loading…
Reference in New Issue
Block a user