forked from Chia-Network/chia-blockchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
105 lines (91 loc) · 2.89 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
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
branches:
include:
- "*"
tags:
include:
- "*"
pool:
vmImage: "macOS-10.14"
strategy:
matrix:
Mojave DMG:
python.version: "3.7"
# Python38:
# python.version: '3.8' # Disabled 3.8 because artifact names conflict
# Also, installer can target one verison
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
displayName: "Use Python $(python.version)"
# Install Apple certificate
# Install an Apple certificate required to build on a macOS agent machine
- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'chia-apple-dev-id-app.p12'
certPwd: $(CHIA_APPLE_DEV_ID_APP_PASS)
keychain: temp
deleteCert: true
# since we're installing miniupnpc & setproctitle below,
# only cbor2 will end up in wheels/
- script: |
python -m venv venv
ln -s venv/bin/activate .
. ./activate
python -m pip install --upgrade pip
pip install wheel pep517 setuptools_scm
node -v
pip install -i https://download.chia.net/simple/ miniupnpc==2.1 setproctitle==1.1.10
displayName: "Install dependencies"
- script: |
. ./activate
clang --version
pip wheel --use-pep517 --only-binary cbor2 --extra-index-url https://download.chia.net/simple/ --wheel-dir=wheels .
pip install --no-index --find-links=./wheels/ chia-blockchain
displayName: "Build and install wheels"
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: "Setup Node 12.x"
- script: |
. ./activate
cd ./electron-react
npm install
npm audit fix
displayName: "Build Electron/React UI"
# install-timelord.sh in venv
# - script: |
# . ./activate
# brew install boost
# sh install-timelord.sh
# displayName: "Install timelord"
# - script: |
# . ./activate
# python -m pip install -r requirements-dev.txt
# displayName: "Install dev dependencies"
# - script: |
# . ./activate
# pip install pytest pytest-azurepipelines
# py.test tests -s -v
# displayName: "pytest"
- script: |
. ./activate
cd build_scripts
sh build_macos.sh
ls -l final_installer
displayName: "Build DMG with build_scripts/build_macos.sh"
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(System.DefaultWorkingDirectory)/wheels
artifactName: MacOS-wheels
displayName: "Upload MacOS wheels"
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(System.DefaultWorkingDirectory)/build_scripts/final_installer/
artifactName: MacOS-DMG
displayName: "Upload MacOS DMG"