2020-05-16 13:05:02 +03:00
|
|
|
# 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:
|
2020-05-20 10:41:10 +03:00
|
|
|
- "*"
|
2020-06-16 00:14:05 +03:00
|
|
|
tags:
|
|
|
|
include:
|
|
|
|
- "*"
|
2020-05-16 13:05:02 +03:00
|
|
|
|
|
|
|
pool:
|
2020-05-20 10:41:10 +03:00
|
|
|
vmImage: "macOS-10.14"
|
2020-05-16 13:05:02 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-05-24 02:20:58 +03:00
|
|
|
Mojave DMG:
|
2020-05-20 10:41:10 +03:00
|
|
|
python.version: "3.7"
|
2020-05-16 13:05:02 +03:00
|
|
|
# Python38:
|
|
|
|
# python.version: '3.8' # Disabled 3.8 because artifact names conflict
|
|
|
|
# Also, installer can target one verison
|
|
|
|
|
|
|
|
steps:
|
2020-05-20 10:41:10 +03:00
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: "$(python.version)"
|
|
|
|
displayName: "Use Python $(python.version)"
|
2020-05-16 13:05:02 +03:00
|
|
|
|
2020-06-08 10:14:44 +03:00
|
|
|
# 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
|
|
|
|
|
2020-05-20 10:41:10 +03:00
|
|
|
# since we're installing miniupnpc & setproctitle below,
|
|
|
|
# only cbor2 will end up in wheels/
|
|
|
|
- script: |
|
2020-05-24 01:47:01 +03:00
|
|
|
python -m venv venv
|
|
|
|
ln -s venv/bin/activate .
|
|
|
|
. ./activate
|
2020-05-20 10:41:10 +03:00
|
|
|
python -m pip install --upgrade pip
|
2020-06-07 02:18:43 +03:00
|
|
|
pip install wheel pep517 setuptools_scm
|
2020-05-20 10:41:10 +03:00
|
|
|
node -v
|
|
|
|
pip install -i https://download.chia.net/simple/ miniupnpc==2.1 setproctitle==1.1.10 cbor2==5.1.0
|
|
|
|
displayName: "Install dependencies"
|
2020-05-16 13:05:02 +03:00
|
|
|
|
2020-05-20 10:41:10 +03:00
|
|
|
- script: |
|
2020-05-24 01:47:01 +03:00
|
|
|
. ./activate
|
2020-05-20 10:41:10 +03:00
|
|
|
pip wheel --use-pep517 --only-binary cbor2 --extra-index-url https://download.chia.net/simple/ --wheel-dir=wheels .
|
|
|
|
displayName: "Build wheels"
|
2020-05-16 13:05:02 +03:00
|
|
|
|
2020-05-31 12:09:53 +03:00
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '12.x'
|
2020-06-05 07:45:30 +03:00
|
|
|
displayName: "Setup Node 12.x"
|
2020-05-31 12:09:53 +03:00
|
|
|
|
2020-05-20 10:41:10 +03:00
|
|
|
- script: |
|
2020-05-24 01:47:01 +03:00
|
|
|
. ./activate
|
2020-05-20 10:41:10 +03:00
|
|
|
cd ./electron-react
|
|
|
|
npm install
|
2020-05-24 02:20:58 +03:00
|
|
|
npm audit fix
|
2020-05-20 10:41:10 +03:00
|
|
|
displayName: "Build Electron UI"
|
2020-05-16 13:05:02 +03:00
|
|
|
|
2020-05-20 10:41:10 +03:00
|
|
|
# Using wheels and release style install so no sh install.sh
|
|
|
|
- script: |
|
2020-05-24 01:47:01 +03:00
|
|
|
. ./activate
|
2020-05-20 10:41:10 +03:00
|
|
|
pip install .
|
|
|
|
displayName: "Install wheels"
|
2020-05-16 13:05:02 +03:00
|
|
|
|
2020-06-07 02:18:43 +03:00
|
|
|
# install-timelord.sh in venv
|
2020-06-05 07:45:30 +03:00
|
|
|
# - script: |
|
|
|
|
# . ./activate
|
|
|
|
# brew install boost
|
|
|
|
# sh install-timelord.sh
|
2020-06-07 02:18:43 +03:00
|
|
|
# displayName: "Install timelord"
|
2020-05-16 13:05:02 +03:00
|
|
|
|
2020-05-31 12:09:53 +03:00
|
|
|
# - script: |
|
|
|
|
# . ./activate
|
|
|
|
# python -m pip install -r requirements-dev.txt
|
|
|
|
# displayName: "Install dev dependencies"
|
2020-05-16 13:05:02 +03:00
|
|
|
|
2020-05-31 12:09:53 +03:00
|
|
|
# - script: |
|
|
|
|
# . ./activate
|
|
|
|
# pip install pytest pytest-azurepipelines
|
|
|
|
# py.test tests -s -v
|
|
|
|
# displayName: "pytest"
|
2020-05-16 13:05:02 +03:00
|
|
|
|
2020-05-22 02:10:02 +03:00
|
|
|
- script: |
|
2020-05-24 01:47:01 +03:00
|
|
|
. ./activate
|
2020-05-22 02:10:02 +03:00
|
|
|
cd build_scripts
|
2020-05-23 23:41:19 +03:00
|
|
|
sh build_macos.sh
|
2020-06-07 02:18:43 +03:00
|
|
|
ls -l final_installer
|
2020-05-24 01:47:01 +03:00
|
|
|
displayName: "Build DMG with build_scripts/build_macos.sh"
|
2020-05-22 02:10:02 +03:00
|
|
|
|
2020-05-20 10:41:10 +03:00
|
|
|
- task: PublishPipelineArtifact@1
|
|
|
|
inputs:
|
|
|
|
targetPath: $(System.DefaultWorkingDirectory)/wheels
|
|
|
|
artifactName: MacOS-wheels
|
|
|
|
displayName: "Upload MacOS wheels"
|
2020-05-22 02:10:02 +03:00
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
|
|
inputs:
|
2020-06-07 02:18:43 +03:00
|
|
|
targetPath: $(System.DefaultWorkingDirectory)/build_scripts/final_installer/
|
2020-05-22 02:10:02 +03:00
|
|
|
artifactName: MacOS-DMG
|
|
|
|
displayName: "Upload MacOS DMG"
|