blob: 326106f41ce9389faf9fe62ee7f5df5df8c77f6d (
plain)
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
|
parameters:
- name: uhdSrcDir
type: string
- name: uhdBuildDir
type: string
- name: uhdInstallerDir
type: string
- name: uhdImageDir
type: string
- name: uhdReleaseBinaries
type: boolean
default: false
- name: cmakeCompiler
type: string
- name: cmakeArch
type: string
- name: vsArch
type: string
- name: vsYear
type: string
steps:
- script: |
mkdir ${{ parameters.uhdBuildDir }}
cd ${{ parameters.uhdBuildDir }}
cmake ${{ parameters.uhdSrcDir }}/host ^
-DVCPKG_TARGET_TRIPLET=uhd-$(vsArch)-windows-static-md ^
-DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALL_DIR%/scripts/buildsystems/vcpkg.cmake
mkdir ${{ parameters.uhdImageDir }}
python ${{ parameters.uhdBuildDir }}/utils/uhd_images_downloader.py -i ${{ parameters.uhdImageDir }}
displayName: Download uhd-images
timeoutInMinutes: 30
- script: |
cd $(Pipeline.Workspace)
rmdir ${{ parameters.uhdBuildDir }} /s /q
displayName: Clean build directory
- script: |
mkdir ${{ parameters.uhdBuildDir }}
cd ${{ parameters.uhdBuildDir }}
if "${{ parameters.uhdReleaseBinaries }}" == "True" (
echo "Setting Release Mode"
SET UHD_CI_CMAKE_OPTIONS="-DUHD_RELEASE_MODE=release %UHD_CI_CMAKE_OPTIONS%"
)
cmake ${{ parameters.uhdSrcDir }}/host ^
-DVCPKG_TARGET_TRIPLET=uhd-$(vsArch)-windows-static-md ^
-DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALL_DIR%/scripts/buildsystems/vcpkg.cmake ^
-DUHD_IMAGES_SRC_DIR="${{ parameters.uhdImageDir }}" ^
-DUHD_IMAGES_DIR="C:\\Program Files (x86)\\UHD\\share\\uhd\\images,C:\\Program Files\\UHD\\share\\uhd\\images" ^
-DSPECIFY_MSVC_VERSION=ON ^
-DENABLE_DOXYGEN_SHORTNAMES=ON ^
%UHD_CI_CMAKE_OPTIONS% ^
-G "$(cmakeCompiler)" -A $(cmakeArch)
displayName: cmake msbuild UHD
- script: |
cd ${{ parameters.uhdBuildDir }}
call "C:\Program Files (x86)\Microsoft Visual Studio\$(vsYear)\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" $(vsArch)
msbuild.exe package.vcxproj /p:configuration=release
displayName: msbuild package
- task: CopyFiles@2
inputs:
sourceFolder: ${{ parameters.uhdBuildDir }}
contents: 'uhd_*.exe'
targetFolder: ${{ parameters.uhdInstallerDir }}
cleanTargetFolder: true
displayName: Copy msbuild installer
|