-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
59 lines (48 loc) · 1.85 KB
/
azure-pipelines.yml
File metadata and controls
59 lines (48 loc) · 1.85 KB
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
name: $(SourceBranchName)_$(date:yyyyMMdd)$(rev:.r)
trigger:
- master
pool:
name: 'MOD Agents'
jobs:
- job: build_wheel
container: 'moddevices/devtools:ub18-py36'
steps:
- script: |
sudo python3 -m pip install --upgrade pip setuptools wheel twine
sudo python3 -m pip install --upgrade keyring artifacts-keyring keyrings.alt
displayName: 'Install dependencies'
- task: PipAuthenticate@1
inputs:
artifactFeeds: 'moddevices'
displayName: 'Pip Authenticate'
- script: |
# always build wheel for dev
SETUP_BUILD_ID='$(Build.BuildId)' python3 -m pip wheel -w '$(Build.ArtifactStagingDirectory)' .
# if commit is marked with tag 'release' then build a wheel for release
tags=($(git tag --points-at HEAD))
version_tags=($(printf '%s\n' "${tags[@]}" | grep -E 'v([0-9ab]+[.]?)*'))
if [[ ${#version_tags[@]} == 1 ]]; then
python3 -m pip wheel -w '$(Build.ArtifactStagingDirectory)' .
package_version=v$(python3 setup.py package_version)
echo "##vso[build.addbuildtag]$package_version"
fi
displayName: 'Build wheels'
- task: TwineAuthenticate@1
inputs:
artifactFeed: 'moddevices'
displayName: 'Twine Authenticate'
- script: |
python3 -m twine upload -r moddevices --config-file $(PYPIRC_PATH) '$(Build.ArtifactStagingDirectory)/mod_lilvlib-*.whl'
displayName: 'Twine upload wheels'
- job: build_debian_pkg
container: 'moddevices/devtools:ub18-py36'
steps:
- script: |
sudo apt-get update -qq
sudo apt-get install --no-install-recommends -qy libpcre3-dev devscripts pkg-config swig debhelper python3-numpy
./build-python3-lilv.sh
cp ./*.deb '$(Build.ArtifactStagingDirectory)'
displayName: 'Build debian package'
- upload: '$(Build.ArtifactStagingDirectory)'
artifact: 'drop'
displayName: 'Upload Manifests'