gerbonara/.gitlab-ci.yml

84 wiersze
1.9 KiB
YAML
Czysty Zwykły widok Historia

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
# - 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"
2022-02-06 20:09:21 +00:00
- pip3 install --user wheel
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
#test:archlinux:
# stage: test
# image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
# script:
# - 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/*
#
#docs:archlinux:
# stage: test
# image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
# script:
# - 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
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:
- 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.*$/