From e796e2660ff64bb4964bc66e0ffe7322aee43b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Inge=20Hanssen?= Date: Tue, 22 Oct 2019 15:51:50 +0200 Subject: [PATCH] Add azure build script (#274) --- azure-pipelines.yml | 81 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..7f8412c --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,81 @@ +trigger: +- test-azure +- master +- release/* + +jobs: + # Linux + - job: Linux + pool: + vmImage: 'ubuntu-16.04' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.7' + - bash: | + pip install setuptools + pip install -r requirements-frozen.txt + python setup.py sdist + displayName: 'Build tar.gz with python 3.7' + - bash: | + pip install pyinstaller + pyinstaller nrfutil.spec + displayName: 'Build executable with python 3.7' + + # macOS + - job: macOS + pool: + vmImage: 'macos-10.13' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.7' + - bash: | + pip install setuptools + pip install -r requirements-frozen.txt + python setup.py sdist + displayName: 'Build tar.gz with python 3.7' + - bash: | + pip install pyinstaller + pyinstaller nrfutil.spec + displayName: 'Build executable with python 3.7' + + # Windows + - job: Windows + strategy: + matrix: + win32: + python_arch: 'x86' + win64: + python_arch: 'x64' + pool: + vmImage: 'vs2017-win2016' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.7' + architecture: '$(python_arch)' + - bash: | + pip install -r requirements-frozen.txt + python setup.py sdist + displayName: 'Build tar.gz with python 3.7' + - bash: | + pip install pyinstaller + pyinstaller nrfutil.spec + displayName: 'Build exe with python 3.7' + - bash: | + cp -R dist/*.tar.gz "$(Build.ArtifactStagingDirectory)" + cp -R dist/*.exe "$(Build.ArtifactStagingDirectory)" + condition: eq(variables['python_arch'], 'x64') + displayName: 'Copy artifacts' + - task: GitHubRelease@0 + inputs: + gitHubConnection: 'waylandCI' + repositoryName: 'NordicSemiconductor/pc-nrfutil' + action: 'edit' + tagSource: 'Git tag' + tag: '$(Build.SourceBranchName)' + assetUploadMode: 'replace' + isDraft: 'true' + addChangeLog: 'false' + condition: ne(variables['Build.Reason'], 'PullRequest')