forked from jellyfin/jellyfin-mpv-shim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
151 lines (142 loc) · 4.83 KB
/
azure-pipelines.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
jobs:
- job: MainWindows
pool:
vmImage: 'vs2017-win2016'
variables:
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- task: Cache@2
inputs:
key: 'python | "$(Agent.OS) 2" | setup.py'
restoreKeys: |
python | "$(Agent.OS)"
python
path: $(PIP_CACHE_DIR)
displayName: Cache pip packages
- task: Cache@2
inputs:
key: '"bindep 2020-08-22" | "$(Agent.OS)"'
restoreKeys: |
"bindep 2020-08-22"
path: bindep
cacheHitVar: CACHE_RESTORED
displayName: Cache binary dependencies
- bash: ./gen_pkg.sh --gen-fingerprint
displayName: gen_pkg fingerprint
- task: Cache@2
inputs:
key: 'az-cache | az-cache-fingerprint.list'
restoreKeys: |
az-cache
path: az_cache
displayName: Cache gen_pkg
# This is downloading all of that stuff you normally have to
# get and extract by hand in the build documentation.
- bash: curl https://iwalton.com/ushare/mpv-shim-deps.7z > mpv-shim-deps.7z
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Download Binary Dependencies
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '*.7z'
destinationFolder: 'bindep'
cleanDestinationFolder: true
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Extract Binary Dependencies
- task: CopyFiles@2
inputs:
SourceFolder: 'bindep'
Contents: '**'
TargetFolder: '.'
displayName: Copy Binary Dependencies
- script: pip install .[all] pywebview[cef]==3.3.3 pywin32
displayName: PIP Dependencies
- bash: 'pip uninstall -y pydantic; SKIP_CYTHON=1 pip install --force-reinstall --ignore-installed --no-binary :all: pydantic==0.32'
displayName: Pydantic w/o CYTHON
- bash: AZ_CACHE=az_cache ./gen_pkg.sh --get-pyinstaller; cd pyinstaller/bootloader; python ./waf distclean all; cd ..; python setup.py install
displayName: PyInstaller Bootloader
- bash: AZ_CACHE=az_cache ./gen_pkg.sh --skip-build
displayName: gen_pkg (Languages & Subrepos)
- script: build-win.bat
displayName: Main Build
- bash: ./artifacts.sh standard
displayName: Main Artifact Rename
- publish: publish/Shim
artifact: ShimPortable
- publish: publish/DesktopInstaller
artifact: DesktopInstaller
- job: LegacyWindows
pool:
vmImage: 'vs2017-win2016'
variables:
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x86'
- task: Cache@2
inputs:
key: 'python | "$(Agent.OS) 2" | setup.py'
restoreKeys: |
python | "$(Agent.OS)"
python
path: $(PIP_CACHE_DIR)
displayName: Cache pip packages
- task: Cache@2
inputs:
key: '"bindep 2020-08-22" | "$(Agent.OS)"'
restoreKeys: |
"bindep 2020-08-22"
path: bindep
cacheHitVar: CACHE_RESTORED
displayName: Cache binary dependencies
- bash: ./gen_pkg.sh --gen-fingerprint
displayName: gen_pkg fingerprint
- task: Cache@2
inputs:
key: 'az-cache | az-cache-fingerprint.list'
restoreKeys: |
az-cache
path: az_cache
displayName: Cache gen_pkg
# This is downloading all of that stuff you normally have to
# get and extract by hand in the build documentation.
- bash: curl https://iwalton.com/ushare/mpv-shim-deps.7z > mpv-shim-deps.7z
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Download Binary Dependencies
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '*.7z'
destinationFolder: 'bindep'
cleanDestinationFolder: true
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Extract Binary Dependencies
- task: CopyFiles@2
inputs:
SourceFolder: 'bindep'
Contents: '**'
TargetFolder: '.'
displayName: Copy Binary Dependencies
- script: pip install .[all] pywebview[cef]==3.3.3 pywin32
displayName: PIP Dependencies x86
- bash: 'pip uninstall -y pydantic; SKIP_CYTHON=1 pip install --force-reinstall --ignore-installed --no-binary :all: pydantic==0.32'
displayName: Pydantic w/o CYTHON x86
- bash: AZ_CACHE=az_cache ./gen_pkg.sh --get-pyinstaller; cd pyinstaller/bootloader; python ./waf distclean all; cd ..; python setup.py install
displayName: PyInstaller Bootloader x86
- bash: AZ_CACHE=az_cache ./gen_pkg.sh --skip-build
displayName: gen_pkg (Languages & Subrepos)
- script: build-win-32.bat
displayName: Legacy Build
- bash: ./artifacts.sh legacy
displayName: Legacy Artifact Rename
- publish: publish/DesktopInstallerLegacy
artifact: DesktopInstallerLegacy