mirror of
https://gitlab.com/kicad/libraries/kicad-footprints.git
synced 2025-03-29 22:26:55 +00:00
Clean out gitlab-ci.yml and use include directive to include copy in library-utils repo
See merge request kicad/libraries/kicad-footprints!3536
This commit is contained in:
parent
75a8f32ac0
commit
46690bc7f1
104
.gitlab-ci.yml
104
.gitlab-ci.yml
@ -1,98 +1,6 @@
|
||||
image: python:latest
|
||||
|
||||
stages:
|
||||
- test
|
||||
- screenshot
|
||||
- diffs
|
||||
- convert
|
||||
|
||||
before_script:
|
||||
- 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 .)
|
||||
|
||||
klc-check:
|
||||
stage: test
|
||||
allow_failure: true
|
||||
only:
|
||||
refs:
|
||||
- merge_requests
|
||||
changes:
|
||||
- "**/*.kicad_mod"
|
||||
- "fp-lib-table"
|
||||
script:
|
||||
- $CI_BUILDS_DIR/kicad-library-utils/tools/gitlabci/check_footprints.sh
|
||||
artifacts:
|
||||
reports:
|
||||
metrics: metrics.txt
|
||||
|
||||
nightly-convert:
|
||||
image: kicad/kicad:nightly
|
||||
stage: convert
|
||||
only:
|
||||
- schedules
|
||||
before_script:
|
||||
- sudo apt update -q && sudo apt install -qqy git
|
||||
- git config --global "http.${CI_SERVER_URL}.sslCAInfo" "$CI_SERVER_TLS_CA_FILE"
|
||||
- git clone --depth 1 https://gitlab.com/kicad/libraries/kicad-library-utils $CI_BUILDS_DIR/kicad-library-utils
|
||||
script:
|
||||
- find . -name "*.kicad_mod" -exec sed -i 's/\${KICAD6_3DMODEL_DIR}/\${KICAD7_3DMODEL_DIR}/g' {} \;
|
||||
- export LIB_NAME_MASK="*.pretty" LIB_TYPE=fp LIB_DEST="$CI_BUILDS_DIR/libraries" LIB_REMOTE_BRANCH=nightly-rolling
|
||||
- git clone --branch $LIB_REMOTE_BRANCH --depth 1 "https://token:$GITLAB_ACCESS_TOKEN@gitlab.com/kicad/libraries/kicad-footprints.git" $CI_BUILDS_DIR/libraries
|
||||
- mkdir -p $HOME/.config/kicad/7.0/colors
|
||||
- $CI_BUILDS_DIR/kicad-library-utils/scripts/migrate_libraries.sh
|
||||
- cd $CI_BUILDS_DIR/libraries/
|
||||
- git config user.name "CI Pipeline"
|
||||
- git config user.email "cipipeline@noreply.kicad.org"
|
||||
- git add -A && git commit -m "Update to master ${CI_COMMIT_SHA:0:12}"
|
||||
- git push origin HEAD:$LIB_REMOTE_BRANCH
|
||||
|
||||
screenshot:
|
||||
image: kicad/kicad:7.0
|
||||
stage: screenshot
|
||||
allow_failure: true
|
||||
only:
|
||||
refs:
|
||||
- merge_requests
|
||||
changes:
|
||||
- "**/*.kicad_mod"
|
||||
before_script:
|
||||
- export DEBIAN_FRONTEND=noninteractive
|
||||
- sudo ln -sf $(which kicad-cli) /usr/bin/kicad-cli-nightly
|
||||
- sudo apt update -qq
|
||||
- sudo apt install curl inkscape python3 git -qqy --no-install-recommends
|
||||
- mkdir -p $HOME/.config/kicad/7.0/colors
|
||||
- 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 .)
|
||||
script:
|
||||
- $CI_BUILDS_DIR/kicad-library-utils/tools/gitlabci/screenshot_footprints.sh
|
||||
artifacts:
|
||||
expose_as: 'Screenshots'
|
||||
paths:
|
||||
- screenshots/
|
||||
|
||||
visual_diff:
|
||||
stage: diffs
|
||||
image: kicad/kicad:7.0
|
||||
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 --break-system-packages 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
|
||||
environment:
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
url: https://kicad.gitlab.io/-/libraries/kicad-footprints/-/jobs/$CI_JOB_ID/artifacts/diffs/index.html.diff/index.html
|
||||
# All the CI config is in the library-utils repo
|
||||
#
|
||||
# The goal is to have only one place where all the CI
|
||||
# related things are.
|
||||
include:
|
||||
- remote: 'https://gitlab.com/kicad/libraries/kicad-library-utils/-/raw/master/tools/gitlabci/gitlab-ci-footprints.yml'
|
||||
|
Loading…
Reference in New Issue
Block a user