-
Notifications
You must be signed in to change notification settings - Fork 4
/
azure-pipelines.yml
138 lines (134 loc) · 4.87 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
trigger:
- master
jobs:
- job: 'Build_Ubuntu'
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install libopenmpi-dev
displayName: 'Install dependencies'
- task: Cache@2
inputs:
key: 'ubuntu-vcpkg'
path: vcpkg
displayName: Cache vcpkg
- script: |
if [ -d "vcpkg/.git" ] ; then echo vcpkg cached ; else rm -rf vcpkg ; git clone https://github.com/Microsoft/vcpkg ; fi
cd vcpkg
git checkout .
git pull
./bootstrap-vcpkg.sh
echo "set(VCPKG_BUILD_TYPE release)" >> triplets/x64-linux.cmake
./vcpkg install jsoncons --recurse
rm -rf buildtrees
cd ..
displayName: vcpkg update
- script: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..
cd ..
displayName: CMake configure
- script: |
cd build
cmake --build . --target install
cd ..
displayName: CMake build
- task: CopyFiles@2
inputs:
contents: '$(System.DefaultWorkingDirectory)/bin/**'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: Propaga-Ubuntu
- job: 'Build_macOS'
pool:
vmImage: 'macOS-latest'
steps:
- script: |
brew install open-mpi
displayName: 'Install dependencies'
- task: Cache@2
inputs:
key: 'macos-vcpkg'
path: vcpkg
displayName: Cache vcpkg
- script: |
if [ -d "vcpkg/.git" ] ; then echo vcpkg cached ; else rm -rf vcpkg ; git clone https://github.com/Microsoft/vcpkg ; fi
cd vcpkg
git checkout .
git pull
./bootstrap-vcpkg.sh
echo "set(VCPKG_BUILD_TYPE release)" >> triplets/x64-osx.cmake
./vcpkg install jsoncons --recurse
rm -rf buildtrees
cd ..
displayName: vcpkg update
- script: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..
cd ..
displayName: CMake configure
- script: |
cd build
cmake --build . --target install
cd ..
displayName: CMake build
- task: CopyFiles@2
inputs:
contents: '$(System.DefaultWorkingDirectory)/bin/**'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: Propaga-macOS
- job: 'Build_Windows'
pool:
vmImage: 'windows-latest'
variables:
VCPKG_DEFAULT_TRIPLET: "x64-windows"
GIT_REDIRECT_STDERR: "2>&1"
steps:
- powershell: |
Invoke-WebRequest https://download.microsoft.com/download/A/E/0/AE002626-9D9D-448D-8197-1EA510E297CE/msmpisetup.exe -OutFile msmpi.exe
.\msmpi.exe -unattend
displayName: Install dependencies
- task: Cache@2
inputs:
key: 'windows-vcpkg'
path: vcpkg
displayName: Cache vcpkg
- powershell: |
if (Test-Path -LiteralPath ".\vcpkg\.git\") { Write-Host "vcpkg cached" } else { Remove-Item -Recurse -Force -ErrorAction SilentlyContinue .\vcpkg; git clone https://github.com/Microsoft/vcpkg }
cd vcpkg
git checkout .
git pull
.\bootstrap-vcpkg.bat
echo "set(VCPKG_BUILD_TYPE release)" | out-file -encoding ascii -append "triplets\${env:VCPKG_DEFAULT_TRIPLET}.cmake"
.\vcpkg install jsoncons msmpi --recurse
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue buildtrees
cd ..
displayName: vcpkg update
- powershell: |
mkdir build
cd build
cmake "-DCMAKE_TOOLCHAIN_FILE=..\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=${env:VCPKG_DEFAULT_TRIPLET}" -DCMAKE_BUILD_TYPE="Release" ..
cd ..
displayName: CMake configure
- powershell: |
cd build
cmake --build . --config Release --target install
cd ..
displayName: CMake build
- task: CopyFiles@2
inputs:
contents: '$(System.DefaultWorkingDirectory)/bin/**'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: Propaga-Windows