-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
83 lines (67 loc) · 2.15 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
include: https://gitlab/Sensirion/Python/ci-config-python/raw/master/gitlab-ci-template-v2.yml
check_rst_syntax:
extends: .check_rst_syntax_v2
check_editorconfig:
extends: .check_editorconfig_v2
py2p7_linux_build:
extends: .py2p7_linux_build_v2
variables:
PYTEST_ADDOPTS: '-m "not needs_device"'
py3p5_linux_build:
extends: .py3p5_linux_build_v2
variables:
PYTEST_ADDOPTS: '-m "not needs_device"'
py3p8_linux_build:
extends: .py3p8_linux_build_v2
variables:
PYTEST_ADDOPTS: '-m "not needs_device"'
py2p7_32bit_win_build:
extends: .py2p7_32bit_win_docker_build_v2
variables:
PYTEST_ADDOPTS: '-m "not needs_device"'
py3p5_64bit_win_build:
extends: .py3p5_64bit_win_docker_build_v2
variables:
PYTEST_ADDOPTS: '-m "not needs_device"'
py3p8_64bit_win_build:
extends: .py3p8_64bit_win_docker_build_v2
variables:
PYTEST_ADDOPTS: '-m "not needs_device"'
build_docs:
extends: .build_docs_v2
script:
- apt-get update && apt-get install -y graphviz
- python setup.py install
- pip install -r docs/requirements.txt
- ./ci/set_git_config.sh
- sphinx-versioning build -r "$CI_COMMIT_REF_NAME" -w "$CI_COMMIT_REF_NAME" docs docs/_build/html
artifacts:
paths: [docs/_build, public]
expire_in: 1 week
when: always
deploy_staging:
extends: .deploy_staging_v2
deploy_stable:
extends: .deploy_stable_v2
environment:
name: pypi.org
url: https://pypi.org/project/sensirion-shdlc-sfa3x/
before_script:
- pip install twine~=1.12.1
script:
- PKG_VERSION=$(python setup.py --version --quiet | tail -n1)
- TAG_VERSION=$(git describe --tags)
- if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then echo "Tag Version ($TAG_VERSION) != Package Version ($PKG_VERSION)" && exit 1; fi
- twine upload dist/*
deploy_docs:
stage: deploy
tags: [linux, docker]
image: registry.gitlab.sensirion.lokal/sensirion/docker/docker-python:3.6-18.04-1.1.0
dependencies: []
only: [master, tags]
script:
- apt-get update && apt-get install -y graphviz
- python setup.py install
- pip install -r docs/requirements.txt
- ./ci/set_git_config.sh
- sphinx-versioning push docs gh-pages .