-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
66 lines (64 loc) · 1.84 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
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
jobs:
- job:
pool:
vmImage: ubuntu-latest
container: abstudelft/ghdl-gcc-python:latest
steps:
- script: |
python3 setup.py build
displayName: Build
- script: |
python3 setup.py test
displayName: Test
- script: |
python3 setup.py lint
displayName: Lint
- script: |
python3 setup.py bdist_wheel
displayName: Wheel
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/nosetests.xml'
- task: UseDotNet@2
inputs:
version: 2.x
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
- script: |
bash <(curl https://codecov.io/bash) -f coverage.xml
env:
CODECOV_TOKEN: $(codecov)
displayName: codecov
- script: |
pip3 install --user twine
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
displayName: Install twine
- task: TwineAuthenticate@0
inputs:
externalFeeds: 'pypi'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
displayName: Authenticate Twine
- script: |
python3 -m twine upload -r pypi --config-file $(PYPIRC_PATH) dist/*
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
displayName: Publish to PyPi
- task: GitHubRelease@0
inputs:
gitHubConnection: github
repositoryName: abs-tudelft/vhdeps
action: edit
tag: $(Build.SourceBranchName)
title: $(Build.SourceBranchName)
assets: $(System.DefaultWorkingDirectory)/dist/*.whl
addChangeLog: true
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
displayName: Publish to GitHub