forked from aglowacki/uProbeX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
94 lines (94 loc) · 3.77 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
trigger:
- master
resources:
repositories:
- repository: XrfMapsGithub
type: github
endpoint: aglowacki
name: aglowacki/XRF-Maps
variables:
buildPlatform: 'x64'
buildConfiguration: 'Release'
VCPKG_DEFAULT_TRIPLET: 'x64-windows'
VCPKG_CONFIG_CACHE: D:/a/1/s/XRF-Maps/vcpkg/
jobs:
- job: Default
timeoutInMinutes: 360
cancelTimeoutInMinutes: 180
pool:
vmImage: 'windows-latest'
steps:
- checkout: self
- checkout: XrfMapsGithub
submodules: true
path: s/XRF-Maps
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
- script: |
cd $(Build.SourcesDirectory)
python -m pip install aqtinstall
displayName: 'Install aqtinstall'
- script: |
cd $(Build.SourcesDirectory)
python -m aqt install-qt --outputdir $(Build.BinariesDirectory)\\Qt windows desktop 6.5.2 win64_msvc2019_64 -m qtcharts --archives qtbase
displayName: 'Install Qt 6.5.2'
- script: $(System.DefaultWorkingDirectory)/XRF-Maps/vcpkg/bootstrap-vcpkg.bat
- task: Cache@2
inputs:
key: vcpkg-cache | $(Agent.OS)
restoreKeys: |
vcpkg-cache | $(Agent.OS)
vcpkg-cache
path: $(VCPKG_CONFIG_CACHE)
cacheHitVar: CACHE_RESTORED
displayName: Cache vcpkg packages
- script: XRF-Maps\vcpkg\vcpkg.exe install hdf5 netcdf-c yaml-cpp zeromq jsoncpp opencv tiff --triplet x64-windows
condition: ne(variables.CACHE_RESTORED, 'true')
- task: CmdLine@2
inputs:
script: |
pwd
mkdir XRF-Maps\build
- task: CMake@1
inputs:
workingDirectory: 'XRF-Maps/build'
cmakeArgs: '-G "Visual Studio 17 2022" -A x64 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DQT_ADDITIONAL_PACKAGES_PREFIX_PATH="D:/a/1/b/Qt/6.5.2/msvc2019_64/lib/cmake" -DQt6_DIR="D:/a/1/b/Qt/6.5.2/msvc2019_64/lib/cmake/Qt6" -DBUILD_WITH_QT=ON -DBUILD_WITH_ZMQ=ON -DAVX2=ON ..'
- task: MSBuild@1
inputs:
solution: 'XRF-Maps/build/ALL_BUILD.vcxproj'
configuration: Release
maximumCpuCount: true
platform: 'x64'
- task: CmdLine@2
inputs:
workingDirectory: "$(System.DefaultWorkingDirectory)/uProbeX"
script: |
pwd
dir
mkdir build
- task: CMake@1
inputs:
workingDirectory: "$(System.DefaultWorkingDirectory)/uProbeX/build"
cmakeArgs: '-G "Visual Studio 17 2022" -A x64 -DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/XRF-Maps/vcpkg/scripts/buildsystems/vcpkg.cmake -DQT_ADDITIONAL_PACKAGES_PREFIX_PATH="D:/a/1/b/Qt/6.5.2/msvc2019_64/lib/cmake" -DQt6_DIR=D:/a/1/b/Qt/6.5.2/msvc2019_64/lib/cmake/Qt6 -DAVX2=ON -DXRF_Maps_DIR=D:/a/1/s/XRF-Maps/build ..'
- task: MSBuild@1
inputs:
solution: 'uProbeX/build/ALL_BUILD.vcxproj'
configuration: Release
maximumCpuCount: true
platform: 'x64'
#- script: new-item -itemtype file -path $(System.DefaultWorkingDirectory)/install -name "version.json" -force -value '{\"buildNumber\":\"$(Build.BuildNumber)\",\"buildId\":\"$(Build.BuildId)\",\"branchName\":\"$(Build.SourceBranchName)\",\"commitHash\":\"$(Build.SourceVersion)\"}'
- task: CopyFiles@2
displayName: 'Copy bin Files to install'
inputs:
SourceFolder: $(System.DefaultWorkingDirectory)/uProbeX/bin
TargetFolder: $(System.DefaultWorkingDirectory)/uProbeX/install/bin
- task: CopyFiles@2
displayName: 'Copy ref Files to install'
inputs:
SourceFolder: $(System.DefaultWorkingDirectory)/uProbeX/reference
TargetFolder: $(System.DefaultWorkingDirectory)/uProbeX/install/reference
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(System.DefaultWorkingDirectory)/uProbeX/install/
artifactName: uProbeX_Windows_x64_AVX2