File: build-windows.yml

package info (click to toggle)
cpprest 2.10.19-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,016 kB
  • sloc: cpp: 71,086; sh: 275; makefile: 170; javascript: 147
file content (47 lines) | stat: -rw-r--r-- 1,855 bytes parent folder | download | duplicates (3)
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
parameters:
  name: 'Windows_VS2019_x86'
  targetPlatform: 'x86'
  image: 'windows-latest'

jobs:
- job: ${{ parameters.name }}
  pool:
    vmImage: ${{ parameters.image }}
  variables:
    vcpkgLocation: '$(Build.SourcesDirectory)/vcpkg'
    vcpkgResponseFile: $(Build.SourcesDirectory)/azure-devops/vcpkg-windows.txt
  steps:
    - script: git submodule update --init vcpkg
      displayName: Checkout vcpkg submodule
    - task: run-vcpkg@0
      displayName: 'Run vcpkg'
      inputs:
        vcpkgArguments: '@$(vcpkgResponseFile)'
        vcpkgDirectory: '$(vcpkgLocation)'
        vcpkgTriplet: ${{ parameters.targetPlatform }}-windows
    - task: run-cmake@0
      displayName: 'Run CMake with Ninja (Debug)'
      enabled: true
      inputs:
        cmakeListsOrSettingsJson: 'CMakeListsTxtBasic'
        cmakeBuildType: 'Debug'
        useVcpkgToolchainFile: true
        buildDirectory: $(Build.ArtifactStagingDirectory)/${{ parameters.targetPlatform }}_Debug
        cmakeAppendedArgs: '-DCPPREST_EXCLUDE_BROTLI=OFF'
    - script: |
        cd $(Build.ArtifactStagingDirectory)\${{ parameters.targetPlatform }}_Debug\Release\Binaries
        .\test_runner.exe *testd.dll
      displayName: 'Run tests, debug'
    - task: run-cmake@0
      displayName: 'Run CMake with Ninja (Release)'
      enabled: true
      inputs:
        cmakeListsOrSettingsJson: 'CMakeListsTxtBasic'
        cmakeBuildType: 'Release'
        useVcpkgToolchainFile: true
        buildDirectory: $(Build.ArtifactStagingDirectory)/${{ parameters.targetPlatform }}_Release
        cmakeAppendedArgs: '-DCPPREST_EXCLUDE_BROTLI=OFF'
    - script: |
        cd $(Build.ArtifactStagingDirectory)\${{ parameters.targetPlatform }}_Release\Release\Binaries
        .\test_runner.exe *test.dll
      displayName: 'Run tests, release'