-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
178 lines (161 loc) · 7.59 KB
/
azure-pipelines.yml
File metadata and controls
178 lines (161 loc) · 7.59 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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# 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
trigger:
paths:
include:
- '*'
exclude:
- 'docker/'
- 'docker-compose.yml'
- '.gitignore'
- 'README.md'
resources:
containers:
- container: qt6Container-linux
endpoint: 'myDockerHub'
image: tommoebert332/qt6-build:latest-suse
- container: qt6Container-win
endpoint: 'myDockerHub'
image: ghcr.io/derselbst/qt6-ps.win:master-4b2f2df
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-22.04'
container: qt6Container-linux
steps:
- checkout: self
submodules: true
- task: CMake@1
displayName: 'CMake configure'
inputs:
cmakeArgs: ..
workingDirectory: 'build'
- task: CMake@1
displayName: 'CMake Build'
inputs:
cmakeArgs: --build .
workingDirectory: 'build'
- task: CMake@1
displayName: 'CMake Check'
inputs:
cmakeArgs: --build . --target check
workingDirectory: 'build'
- job: Windows
timeoutInMinutes: 600
cancelTimeoutInMinutes: 2
strategy:
matrix:
Win11:
toolset: 'v143'
generator: 'Visual Studio 17 2022'
poo: 'windows-2022'
pool:
vmImage: $(poo)
container: qt6Container-win
variables:
configuration: 'Release'
platform: 'x64'
VCPKG_INSTALLATION_ROOT: 'C:/vcpkg'
PKG_CONFIG_PATH: '$(VCPKG_INSTALLATION_ROOT)/installed/$(platform)-windows-static/lib/pkgconfig'
WindowsSDKVersion: '10.0.22621.0'
WindowsSDKDir: 'C:\Program Files (x86)\Windows Kits\10\Include\$(WindowsSDKVersion)'
WindowsSDKDirBin: 'C:\Program Files (x86)\Windows Kits\10\bin\$(WindowsSDKVersion)'
WindowsSDKDirLib: 'C:\Program Files (x86)\Windows Kits\10\Lib\$(WindowsSDKVersion)'
steps:
- checkout: self
submodules: true
- script: |
@ECHO ON
set
call "C:\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" $(platform)
set
echo %PATH%
echo ##vso[task.prependpath]%PATH%;$(WindowsSDKDirBin)\$(platform)
echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir%
echo ##vso[task.setvariable variable=VS170COMNTOOLS]%VS170COMNTOOLS%
echo ##vso[task.setvariable variable=INCLUDE]%INCLUDE%;$(WindowsSDKDir)\ucrt;$(WindowsSDKDir)\um;$(WindowsSDKDir)\shared;$(WindowsSDKDir)\winrt
echo ##vso[task.setvariable variable=LIB]%LIB%;$(WindowsSDKDirLib)\um\$(platform);$(WindowsSDKDirLib)\ucrt\$(platform)
echo ##vso[task.setvariable variable=LIBPATH]%LIBPATH%;$(WindowsSDKDirLib)\um\$(platform);$(WindowsSDKDirLib)\ucrt\$(platform)
displayName: 'Setup environment'
- bash: |
set -e
# KDE's exiv2 find module does not respect private dependencies specified in the pkgconfig file of exiv2 needed for static linking
cat << EOF > /c/vcpkg/installed/x64-windows-static/share/ECM/find-modules/FindLibExiv2.cmake
find_package(PkgConfig QUIET)
pkg_check_modules(PC_EXIV2 exiv2)
find_path(LibExiv2_INCLUDE_DIRS NAMES exiv2/exif.hpp
HINTS \${PC_EXIV2_INCLUDEDIR}
)
find_library(LibExiv2_LIBRARIES NAMES exiv2 libexiv2
HINTS \${PC_EXIV2_LIBRARY_DIRS}
)
# Handle transitive dependencies
if(PC_EXIV2_FOUND)
get_target_properties_from_pkg_config("\${LibExiv2_LIBRARIES}" "PC_EXIV2" "_exiv2")
endif()
set(LibExiv2_VERSION \${PC_EXIV2_VERSION})
if(NOT LibExiv2_VERSION AND DEFINED LibExiv2_INCLUDE_DIRS)
# With exiv >= 0.27, the version #defines are in exv_conf.h instead of version.hpp
foreach(_exiv2_version_file "version.hpp" "exv_conf.h")
if(EXISTS "\${LibExiv2_INCLUDE_DIRS}/exiv2/\${_exiv2_version_file}")
file(READ "\${LibExiv2_INCLUDE_DIRS}/exiv2/\${_exiv2_version_file}" _exiv_version_file_content)
string(REGEX MATCH "#define EXIV2_MAJOR_VERSION[ ]+\\\\([0-9]+\\\\)" EXIV2_MAJOR_VERSION_MATCH \${_exiv_version_file_content})
string(REGEX MATCH "#define EXIV2_MINOR_VERSION[ ]+\\\\([0-9]+\\\\)" EXIV2_MINOR_VERSION_MATCH \${_exiv_version_file_content})
string(REGEX MATCH "#define EXIV2_PATCH_VERSION[ ]+\\\\([0-9]+\\\\)" EXIV2_PATCH_VERSION_MATCH \${_exiv_version_file_content})
if(EXIV2_MAJOR_VERSION_MATCH)
string(REGEX REPLACE ".*_MAJOR_VERSION[ ]+\\\\((.*)\\\\)" "\\\\1" EXIV2_MAJOR_VERSION \${EXIV2_MAJOR_VERSION_MATCH})
string(REGEX REPLACE ".*_MINOR_VERSION[ ]+\\\\((.*)\\\\)" "\\\\1" EXIV2_MINOR_VERSION \${EXIV2_MINOR_VERSION_MATCH})
string(REGEX REPLACE ".*_PATCH_VERSION[ ]+\\\\((.*)\\\\)" "\\\\1" EXIV2_PATCH_VERSION \${EXIV2_PATCH_VERSION_MATCH})
endif()
endif()
endforeach()
set(LibExiv2_VERSION "\${EXIV2_MAJOR_VERSION}.\${EXIV2_MINOR_VERSION}.\${EXIV2_PATCH_VERSION}")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibExiv2
FOUND_VAR LibExiv2_FOUND
REQUIRED_VARS LibExiv2_LIBRARIES LibExiv2_INCLUDE_DIRS
VERSION_VAR LibExiv2_VERSION
)
mark_as_advanced(LibExiv2_INCLUDE_DIRS LibExiv2_LIBRARIES)
if(LibExiv2_FOUND AND NOT TARGET LibExiv2::LibExiv2)
add_library(LibExiv2::LibExiv2 UNKNOWN IMPORTED)
set_target_properties(LibExiv2::LibExiv2 PROPERTIES
IMPORTED_LOCATION "\${LibExiv2_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "\${LibExiv2_INCLUDE_DIRS}"
INTERFACE_COMPILE_OPTIONS "\${_exiv2_compile_options}"
INTERFACE_LINK_LIBRARIES "\${_exiv2_link_libraries}"
INTERFACE_LINK_DIRECTORIES "\${_exiv2_link_directories}")
endif()
include(FeatureSummary)
set_package_properties(LibExiv2 PROPERTIES
URL "https://www.exiv2.org"
DESCRIPTION "Image metadata support"
)
EOF
displayName: 'Fix KDEs exiv2 find module'
- script: |
@ECHO ON
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=$(configuration) -DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_TARGET_TRIPLET=$(platform)-windows-static -DVCPKG_PLATFORM_TOOLSET=$(toolset) -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%/scripts/buildsystems/vcpkg.cmake -DCMAKE_MAKE_PROGRAM=C:/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe -DCMAKE_INSTALL_PREFIX=$VCPKG_INSTALLATION_ROOT/installed/$(platform)-windows-static -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_VERBOSE_MAKEFILE=1 ..
cmake --build . --target anpv
displayName: 'Compile static ANPV'
- script: |
cmake --build build --target check
displayName: 'Run unit tests'
enabled: false
- task: CopyFiles@2
continueOnError: true
displayName: 'Copy ANPV binaries to artifact dir'
inputs:
SourceFolder: 'build'
Contents: '*anpv*'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: ANPV-standalone-$(platform)-$(poo)