2021-05-23 11:42:45 +00:00
|
|
|
variables:
|
2022-02-06 19:42:46 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
2021-05-23 11:42:45 +00:00
|
|
|
|
2022-02-06 19:42:46 +00:00
|
|
|
stages:
|
|
|
|
- build
|
2022-06-21 07:54:52 +00:00
|
|
|
- test
|
2022-02-06 20:06:23 +00:00
|
|
|
- docs
|
2022-02-06 19:42:46 +00:00
|
|
|
- publish
|
2021-05-23 11:42:45 +00:00
|
|
|
|
2022-02-06 20:06:23 +00:00
|
|
|
build:archlinux:
|
2022-02-06 19:42:46 +00:00
|
|
|
stage: build
|
2022-02-06 20:06:23 +00:00
|
|
|
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
|
2022-02-06 19:42:46 +00:00
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: none
|
2021-05-23 11:42:45 +00:00
|
|
|
script:
|
2022-06-10 20:29:15 +00:00
|
|
|
- git config --global --add safe.directory "$CI_PROJECT_DIR"
|
2023-10-26 22:09:13 +00:00
|
|
|
- pip3 install --user --break-system-packages wheel setuptools
|
2022-06-12 19:37:31 +00:00
|
|
|
- python3 setup.py sdist bdist_wheel
|
2022-02-06 19:42:46 +00:00
|
|
|
artifacts:
|
|
|
|
name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
|
|
|
|
paths:
|
2022-06-12 19:37:31 +00:00
|
|
|
- dist/*
|
2021-05-23 11:42:45 +00:00
|
|
|
|
2023-10-27 12:28:19 +00:00
|
|
|
# FIXME: disable tests since (a) currenty kicad-cli is broken (aborts on start), and the workaround of using an older
|
|
|
|
# version from the KiCad project's kicad-cli containers does not work in gitlab CI. Pain.
|
|
|
|
#test:archlinux:
|
|
|
|
# stage: test
|
|
|
|
# image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
|
|
|
|
# script:
|
|
|
|
# - git clone --depth 1 https://gitlab.com/kicad/libraries/kicad-symbols
|
|
|
|
# - git clone --depth 1 https://gitlab.com/kicad/libraries/kicad-footprints
|
|
|
|
# - env KICAD_SYMBOLS=kicad-symbols KICAD_FOOTPRINTS=kicad-footprints pytest -o 'testpaths=gerbonara/tests' -o 'norecursedirs=*'
|
|
|
|
# dependencies:
|
|
|
|
# - build:archlinux
|
|
|
|
# cache:
|
|
|
|
# key: test-image-cache
|
|
|
|
# paths:
|
|
|
|
# - gerbonara/tests/image_cache/*.svg
|
|
|
|
# - gerbonara/tests/image_cache/*.png
|
|
|
|
# artifacts:
|
|
|
|
# name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
|
|
|
|
# when: on_failure
|
|
|
|
# paths:
|
|
|
|
# - gerbonara_test_failures/*
|
|
|
|
#
|
|
|
|
#test:ubuntu-rolling:
|
|
|
|
# stage: test
|
|
|
|
# image: "registry.gitlab.com/gerbolyze/build-containers/ubuntu:rolling"
|
|
|
|
# script:
|
|
|
|
# - python3 -m pip install --break-system-packages pytest beautifulsoup4 pillow numpy slugify lxml click scipy
|
|
|
|
# - git clone --depth 1 https://gitlab.com/kicad/libraries/kicad-symbols
|
|
|
|
# - git clone --depth 1 https://gitlab.com/kicad/libraries/kicad-footprints
|
|
|
|
# - env KICAD_SYMBOLS=kicad-symbols KICAD_FOOTPRINTS=kicad-footprints python3 -m pytest -o 'testpaths=gerbonara/tests' -o 'norecursedirs=*'
|
|
|
|
# dependencies:
|
|
|
|
# - build:archlinux
|
|
|
|
# cache:
|
|
|
|
# key: test-image-cache
|
|
|
|
# paths:
|
|
|
|
# - gerbonara/tests/image_cache/*.svg
|
|
|
|
# - gerbonara/tests/image_cache/*.png
|
|
|
|
# artifacts:
|
|
|
|
# name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
|
|
|
|
# when: on_failure
|
|
|
|
# paths:
|
|
|
|
# - gerbonara_test_failures/*
|
2022-06-21 10:39:11 +00:00
|
|
|
|
2022-06-21 07:54:52 +00:00
|
|
|
docs:archlinux:
|
|
|
|
stage: test
|
|
|
|
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
|
|
|
|
script:
|
2022-06-21 08:01:22 +00:00
|
|
|
- git config --global --add safe.directory "$CI_PROJECT_DIR"
|
2022-06-21 07:54:52 +00:00
|
|
|
- sphinx-build -E docs docs/_build
|
|
|
|
dependencies:
|
|
|
|
- build:archlinux
|
|
|
|
artifacts:
|
|
|
|
name: "docs-gerbonara-$CI_COMMIT_REF_NAME"
|
|
|
|
paths:
|
|
|
|
- docs/_build
|
2022-02-06 20:06:23 +00:00
|
|
|
|
2022-02-06 19:42:46 +00:00
|
|
|
publish:gerbonara:
|
|
|
|
stage: publish
|
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: none
|
2022-02-06 20:06:23 +00:00
|
|
|
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
|
2022-02-06 19:42:46 +00:00
|
|
|
cache: {}
|
2021-05-23 11:42:45 +00:00
|
|
|
script:
|
2022-02-06 19:42:46 +00:00
|
|
|
- export TWINE_USERNAME TWINE_PASSWORD
|
2023-10-26 22:09:13 +00:00
|
|
|
- pip3 install --user --break-system-packages twine rich
|
2022-02-06 21:33:19 +00:00
|
|
|
- twine upload dist/*
|
2022-02-06 19:42:46 +00:00
|
|
|
dependencies:
|
2022-02-06 20:06:23 +00:00
|
|
|
- build:archlinux
|
2021-05-23 11:42:45 +00:00
|
|
|
only:
|
2022-02-06 19:42:46 +00:00
|
|
|
- /^v.*$/
|
2021-05-23 11:42:45 +00:00
|
|
|
|
2022-02-06 20:17:57 +00:00
|
|
|
pages:
|
|
|
|
stage: publish
|
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: none
|
|
|
|
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
|
|
|
|
script:
|
2022-06-10 20:43:04 +00:00
|
|
|
- git config --global --add safe.directory "$CI_PROJECT_DIR"
|
2022-02-06 22:54:28 +00:00
|
|
|
- sphinx-build -E docs public
|
2022-02-06 20:17:57 +00:00
|
|
|
dependencies:
|
|
|
|
- build:archlinux
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2022-02-06 22:54:28 +00:00
|
|
|
- public
|
2022-02-06 20:17:57 +00:00
|
|
|
only:
|
|
|
|
- /^v.*$/
|
|
|
|
|