forked from Azure/azure-storage-fuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
91 lines (80 loc) · 2.96 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
89
90
91
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
#ci trigger on every branch so that private branch owners know if they have broken the build
#ci trigger on PR only for the master branch
trigger:
branches:
include:
- master
pr:
branches:
include:
- dev
- master
jobs:
- job: UbuntuBuilds
# Define on what all OS we want to run this Pipeline
strategy:
matrix:
Ubuntu-16:
container_image: 'ubuntu-16.04'
build_type: Release
Ubuntu-18:
container_image: 'ubuntu-18.04'
build_type: Release
Ubuntu-20:
container_image: 'ubuntu-20.04'
build_type: Release
pool:
vmImage: $(container_image)
steps:
# Install all dependencies
- script: |
sudo apt-get update --fix-missing
sudo apt-get install pkg-config cmake libcurl4-gnutls-dev libgnutls28-dev uuid-dev libgcrypt20-dev libboost-all-dev gcc g++ -y
displayName: "Basic Tools Setup"
# Install libfuse
- script: |
sudo apt-get install libfuse-dev -y
displayName: "libFuse Setup"
# List commits consumed for this build
- script: |
echo "Below commits were done in last 12 hours : " `date`
git --no-pager log --since="12 hours ago" --stat
displayName: "List Commits"
# Build the blobFuse binary
- script: |
export INCLUDE_TESTS=1
sudo chmod +x build.sh
. ./build.sh
displayName: "Build BlobFuse"
# Test the binary just to make sure it was built fine
- script: |
./build/blobfuse --version
displayName: "Test the binary"
# Copy binaries required for the package
- script: |
cd ./build/
mkdir $(Build.ArtifactStagingDirectory)/$(container_image)
cp ./blobfuse $(Build.ArtifactStagingDirectory)/$(container_image)
cp ../systemd/10-blobfuse.conf $(Build.ArtifactStagingDirectory)/$(container_image)
cp ../systemd/blobfuse-logrotate $(Build.ArtifactStagingDirectory)/$(container_image)
cp ./blobfusetests $(Build.BinariesDirectory)
make package
cp ./blobfuse-*.*.*-Linux.deb $(Build.ArtifactStagingDirectory)/$(container_image)
displayName: "Build Artifacts"
# Test the binary
# For now only on Ubn16.04
- script: |
ls -al
chmod 777 ./blobfusetests
$(Build.BinariesDirectory)/blobfusetests --gtest_filter=-BlobClientWrapperTest.*
workingDirectory: $(Build.BinariesDirectory)
condition: eq(variables.container_image, 'ubuntu-16.04')
displayName: "GTest on Ubn-16"
# Publish the Artifacts
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts for blobfuse $(container_image)'
#condition: succeededOrFailed()