-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
appveyor.yml
95 lines (84 loc) · 3.33 KB
/
appveyor.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
84
85
86
87
88
89
90
91
92
93
94
95
# https://www.appveyor.com/blog/2018/04/25/specialized-build-matrix-configuration-in-appveyor/
# https://www.appveyor.com/docs/job-workflows/
# https://www.appveyor.com/docs/how-to/git-push/
environment:
matrix:
- job_group: tests
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PYTHON: "C:\\Python39-x64"
- job_group: tests
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
PYTHON: "3.10"
- job_group: tests
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
PYTHON: "3.9"
- job_group: tests
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
PYTHON: "3.8"
- job_group: tests
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
PYTHON: "3.7"
- job_group: tests
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
PYTHON: "3.6"
- job_group: tests
APPVEYOR_BUILD_WORKER_IMAGE: macos
PYTHON: "3.9"
- job_name: deploy
job_depends_on: tests
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
PYTHON: "3.9"
GIT_TOKEN:
secure: +jQhxLpePj6hdDryfET/XpLo7VL9fhDXVHlwLOPp/nRDYe97TJAfd0XCTuPz1qkT
TWINE_USERNAME: __token__
TWINE_PASSWORD:
secure: +ZVhECKV0ESBrvUGXVd9wpt9xhMMHeIXSJalghKMKGCrxqvvg7/yMm9kPO+xH1T310zzMpnDUxknR1Q05mjAX5MU70MiHiWAB2fBjNwrMSTQZP4kCpKtznAIM/iCwVczbNolbB3tsUn4OS3rQjXyz7lUdYnaeM7sqF1IZNj55/spCPsAJUmi5DYj8M+6zkaPdCZEswlH7lARJG1g+l4/tbyiBssuyDdmY0AQxJVXDGBXKeHU8frHrWayEI5holjF+oFwx2b6Fz1zZ7uznrGpDQ==
stack: python %PYTHON%
build: off
skip_tags: true
for:
# TEST PIPELINE
- matrix:
only:
- job_group: tests
install:
# MS Windows config.
- cmd: 'SET PATH=%PYTHON%;%PATH%'
- cmd: 'SET PATH=%PYTHON%\\Scripts;%PATH%'
- cmd: 'echo %PATH%'
# macOS dependency
- sh: 'if [ "$APPVEYOR_BUILD_WORKER_IMAGE" == "macos" ]; then brew install graphviz; fi'
# Shared config.
- python -m pip install --upgrade pip setuptools nox
- python --version
test_script:
# GNU/Linux test.
- sh: nox --non-interactive --error-on-missing-interpreters --session test lint --python $PYTHON
- sh: nox --non-interactive --session docs
# MS Windows test.
- cmd: nox --forcecolor --non-interactive --error-on-missing-interpreters --session test lint
# Shared test for all platforms.
- git clone https://github.com/UAVCAN/public_regulated_data_types .dsdl-test
- python -c "import pydsdl; pydsdl.read_namespace('.dsdl-test/uavcan', [])"
# DEPLOYMENT PIPELINE
- matrix:
only:
- job_name: deploy
branches:
only:
- master
install:
- python -m pip install --upgrade pip setuptools wheel twine
deploy_script:
# Ensure we deploy only from master, not from PR builds.
- '[[ "$APPVEYOR_REPO_BRANCH" == "master" ]] && [[ -z "$APPVEYOR_PULL_REQUEST_HEAD_COMMIT" ]] || exit'
# Configure git credentials.
- echo "https://${GIT_TOKEN}:x-oauth-basic@github.com" > ~/.git-credentials
- git config --global credential.helper store
- git config --global user.email "devnull@uavcan.org"
- git config --global user.name "Release Automation"
# Tag and publish this release. Push the tag after the release is out in case it could not be published.
- 'git tag $(python3 -c "import pydsdl; print(pydsdl.__version__)")'
- 'python setup.py sdist bdist_wheel'
- 'python -m twine upload dist/*'
- 'git push --tags'