forked from OpenCyphal/yakut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
95 lines (86 loc) · 3.19 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
environment:
matrix:
-
job_group: tests
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PYTHON: 'C:\Python310-x64' # YAML treats '\\' and "\\" differently.
-
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_name: deploy
job_depends_on: tests
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
PYTHON: '3.10'
GIT_TOKEN:
secure: +jQhxLpePj6hdDryfET/XpLo7VL9fhDXVHlwLOPp/nRDYe97TJAfd0XCTuPz1qkT
TWINE_USERNAME: __token__
TWINE_PASSWORD:
secure: +ZVhECKV0ESBrvUGXVd9whoSYHcVs5Gr2toLizARlAIiZitWAZekz4kYpqk0XfXtJidB8ivGTq0bNPdUL1NuTu0qIagKEBDuPKjjdHvCM/22yAZEZCm1oZEqHwnRiNmHqhac4sFBtklyGk0y9zk7J/dJmn183/OmNCwCT20v0346c9ZPf4EM75S190t9ndRR8fYIASuki33DkhQHpuTiaGECPsSGpa5C/6eTEnV7nO4XekasvMwLrtr+J6+7HnImwk3EDaeVb2Pv4R6JzDC3zw==
stack: python %PYTHON%
build: off
skip_tags: true
for:
- matrix:
only:
- job_group: tests
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
install:
- 'set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%'
- git submodule update --init --recursive
- python -m pip install --upgrade pip setuptools nox
test_script:
- nox --non-interactive --session test lint
-
matrix:
only:
- job_group: tests
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
install:
- 'sudo apt-get --ignore-missing update || true'
- 'export extras_pkg="linux-*-extra-$(uname -r)"'
- 'sudo apt-get install -y $extras_pkg ncat'
- 'sudo apt-get install -y libsdl2-2.0-0' # For PySDL2. On Windows/macOS the binaries are pulled from PyPI.
- 'sudo apt-get install -y libasound2-dev' # For RtMidi.
- git submodule update --init --recursive
- python -m pip install --upgrade pip setuptools nox
test_script:
- nox --non-interactive --session test --python $PYTHON
- nox --non-interactive --session lint
-
matrix:
only:
- job_name: deploy
branches:
only:
- main
install:
- git submodule update --init --recursive
- python -m pip install --upgrade pip setuptools wheel twine
deploy_script:
- '[[ -z "$APPVEYOR_PULL_REQUEST_HEAD_COMMIT" ]] || exit'
- echo "https://${GIT_TOKEN}:[email protected]" > ~/.git-credentials
- git config --global credential.helper store
- git config --global user.email "[email protected]"
- git config --global user.name "Release Automation"
- 'git tag "$(cat yakut/VERSION)"'
- 'python setup.py sdist bdist_wheel'
- 'python -m twine upload dist/*'
- git push --tags
# https://github.com/appveyor/ci/issues/401#issuecomment-301649481
# https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts
on_finish:
- ps: $ErrorActionPreference = 'SilentlyContinue'
- ps: >
$root = Resolve-Path .;
[IO.Directory]::GetFiles($root.Path, '*.log', 'AllDirectories') |
% { Push-AppveyorArtifact $_ -FileName $_.Substring($root.Path.Length + 1) -DeploymentName to-publish }