-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
130 lines (125 loc) · 4.65 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
#
# Author: github.com/luncliff (luncliff@gmail.com)
#
# References
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates
# https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
# https://github.com/actions/virtual-environments/tree/main/images
# https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted
#
trigger:
branches:
exclude:
- gh-pages
schedules:
- cron: "30 4 * * 4"
displayName: "Weekly check"
branches:
include:
- main
jobs:
- job: vs2022_msvc143
pool:
vmImage: "windows-2022"
strategy:
matrix:
debug_x64:
cmake.preset: x64-windows
vcpkg.target.triplet: x64-windows
steps:
- task: run-vcpkg@0
inputs:
vcpkgArguments: "vcpkg-cmake"
vcpkgGitCommitId: a7b6122f6b6504d16d96117336a0562693579933 # 2023.02.24
env:
VCPKG_DEFAULT_TRIPLET: $(vcpkg.target.triplet)
- task: CMake@1
displayName: "CMake: Configure"
inputs:
cmakeArgs: --preset $(cmake.preset) -DCMAKE_INSTALL_PREFIX:PATH="$(Build.ArtifactStagingDirectory)"
workingDirectory: "."
- task: MSBuild@1
inputs:
solution: "build-x64-windows/ssf.sln"
msbuildArchitecture: x64
platform: x64
configuration: Debug
msbuildArguments: "/p:platformtoolset=v143"
- task: CMake@1
displayName: "CMake: Install"
inputs:
cmakeArgs: --build --target install --preset $(cmake.preset)-debug
workingDirectory: "."
- powershell: ctest --preset $(cmake.preset)-debug --output-on-failure
displayName: "CTest"
- job: vs2022_clang13
pool:
vmImage: "windows-2022"
strategy:
matrix:
debug_x64:
vcvars.arg: x64
cmake.preset: x64-clangcl
vcpkg.target.triplet: x64-windows
steps:
- task: ChocolateyCommand@0
inputs:
command: "install"
installPackageId: "ninja"
installInstallArgs: "--no-progress --yes"
- task: run-vcpkg@0
inputs:
vcpkgArguments: "vcpkg-cmake"
vcpkgGitCommitId: a7b6122f6b6504d16d96117336a0562693579933 # 2023.02.24
env:
VCPKG_DEFAULT_TRIPLET: $(vcpkg.target.triplet)
# see https://www.cicoria.com/using-vcvars64-vcvars-bat-from-powershell-and-azure-devops/
- powershell: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$installPath = &$vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
echo "##vso[task.setvariable variable=vcvarsPath;isOutput=true]$installPath\VC\Auxiliary\Build\vcvarsall.bat"
name: detected
displayName: "PowerShell: Search vcvarsall.bat"
# see https://github.com/Microsoft/azure-pipelines-tasks/issues/9737
- script: | # using Cmdlet
echo $(detected.vcvarsPath)
call "$(detected.vcvarsPath)" $(vcvars.arg)
cmake --preset $(cmake.preset) -DCMAKE_INSTALL_PREFIX:PATH="$(Build.ArtifactStagingDirectory)"
cmake --build --preset $(cmake.preset)-debug
displayName: "CMake: Configure/Build(vcvarsall)"
- task: CMake@1
displayName: "CMake: Install"
inputs:
cmakeArgs: --build --target install --preset $(cmake.preset)-debug
workingDirectory: "."
- job: mkdocs
pool:
vmImage: "macos-latest"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
addToPath: true
architecture: 'x64'
- powershell: |
brew install doxygen
python3 -m pip install --user -r requirements.txt
displayName: "Setup: Homebrew, Python3 packages"
- powershell: |
wget -q https://github.com/matusnovak/doxybook2/releases/download/v1.5.0/doxybook2-osx-amd64-v1.5.0.zip
unzip ./doxybook2-osx-amd64-v1.5.0.zip -d externals
displayName: "Setup: Doxybook2 1.5.0"
- powershell: |
doxygen ./docs/Doxyfile
# ./externals/bin/doxybook2 --generate-config ./docs/doxybook2-config.json
./externals/bin/doxybook2 --input ./docs/xml --output ./docs --config ./docs/doxybook2-config.json
displayName: "Run Doxygen and Doxybook2"
- powershell: |
python3 -m mkdocs build # todo: gh-deploy
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: "$(Build.SourcesDirectory)/docs"
ArtifactName: "docs"
dependsOn:
- vs2022_msvc143
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))