forked from Thyme-Network/thyme-blockchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
88 lines (76 loc) · 2.55 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
# 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.15"
strategy:
matrix:
Mojave DMG:
python.version: "3.9"
variables:
- group: Apple-Notarize-Variables
steps:
- checkout: self # self represents the repo where the initial Azure Pipelines YAML file was found
submodules: recursive
fetchDepth: 0
displayName: "Checkout code"
- 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: 'thyme-apple-dev-id-app.p12'
certPwd: $(THYME_APPLE_DEV_ID_APP_PASS)
keychain: temp
deleteCert: true
- 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://pypi.chia.net/simple/ miniupnpc==2.1
displayName: "Install dependencies"
- script: |
. ./activate
clang --version
pip wheel --use-pep517 --extra-index-url https://pypi.chia.net/simple/ --wheel-dir=wheels .
pip install --no-index --find-links=./wheels/ thyme-blockchain
displayName: "Build and install wheels"
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: "Setup Node 12.x"
- bash: |
. ./activate
APPLE_NOTARIZE_USERNAME="$(APPLE_NOTARIZE_USERNAME)"
export APPLE_NOTARIZE_USERNAME
APPLE_NOTARIZE_PASSWORD="$(APPLE_NOTARIZE_PASSWORD)"
export APPLE_NOTARIZE_PASSWORD
if [ "$(APPLE_NOTARIZE_PASSWORD)" ]; then NOTARIZE="true"; export NOTARIZE; fi
git submodule update --init --recursive
cd build_scripts || exit
sh build_macos.sh
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"