1e1051a39Sopenharmony_ciimage:
2e1051a39Sopenharmony_ci    - Visual Studio 2017
3e1051a39Sopenharmony_ci
4e1051a39Sopenharmony_ciplatform:
5e1051a39Sopenharmony_ci    - x64
6e1051a39Sopenharmony_ci    - x86
7e1051a39Sopenharmony_ci
8e1051a39Sopenharmony_cienvironment:
9e1051a39Sopenharmony_ci    fast_finish: true
10e1051a39Sopenharmony_ci    matrix:
11e1051a39Sopenharmony_ci        - VSVER: 15
12e1051a39Sopenharmony_ci
13e1051a39Sopenharmony_ciconfiguration:
14e1051a39Sopenharmony_ci    - shared
15e1051a39Sopenharmony_ci    - minimal
16e1051a39Sopenharmony_ci
17e1051a39Sopenharmony_cifor:
18e1051a39Sopenharmony_ci    -
19e1051a39Sopenharmony_ci        branches:
20e1051a39Sopenharmony_ci            only:
21e1051a39Sopenharmony_ci                - master
22e1051a39Sopenharmony_ci        configuration:
23e1051a39Sopenharmony_ci            - shared
24e1051a39Sopenharmony_ci            - plain
25e1051a39Sopenharmony_ci            - minimal
26e1051a39Sopenharmony_ci
27e1051a39Sopenharmony_cibefore_build:
28e1051a39Sopenharmony_ci    - ps: >-
29e1051a39Sopenharmony_ci        Install-Module VSSetup -Scope CurrentUser
30e1051a39Sopenharmony_ci    - ps: >-
31e1051a39Sopenharmony_ci        Get-VSSetupInstance -All
32e1051a39Sopenharmony_ci    - ps: >-
33e1051a39Sopenharmony_ci        If ($env:Platform -Match "x86") {
34e1051a39Sopenharmony_ci            $env:VCVARS_PLATFORM="x86"
35e1051a39Sopenharmony_ci            $env:TARGET="VC-WIN32 no-asm --strict-warnings"
36e1051a39Sopenharmony_ci        } Else {
37e1051a39Sopenharmony_ci            $env:VCVARS_PLATFORM="amd64"
38e1051a39Sopenharmony_ci            $env:TARGET="VC-WIN64A-masm"
39e1051a39Sopenharmony_ci        }
40e1051a39Sopenharmony_ci    - ps: >-
41e1051a39Sopenharmony_ci        If ($env:Configuration -Match "shared") {
42e1051a39Sopenharmony_ci            $env:CONFIG_OPTS="enable-fips"
43e1051a39Sopenharmony_ci        } ElseIf ($env:Configuration -Match "minimal") {
44e1051a39Sopenharmony_ci            $env:CONFIG_OPTS="no-bulk no-asm -DOPENSSL_SMALL_FOOTPRINT"
45e1051a39Sopenharmony_ci        } Else {
46e1051a39Sopenharmony_ci            $env:CONFIG_OPTS="no-fips no-shared"
47e1051a39Sopenharmony_ci        }
48e1051a39Sopenharmony_ci    - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %VCVARS_PLATFORM%
49e1051a39Sopenharmony_ci    - mkdir _build
50e1051a39Sopenharmony_ci    - cd _build
51e1051a39Sopenharmony_ci    - perl ..\Configure %TARGET% no-makedepend %CONFIG_OPTS%
52e1051a39Sopenharmony_ci    - perl configdata.pm --dump
53e1051a39Sopenharmony_ci    - cd ..
54e1051a39Sopenharmony_ci    - ps: >-
55e1051a39Sopenharmony_ci        If ($env:BUILDONLY -or $env:MAKEVERBOSE) {
56e1051a39Sopenharmony_ci            $env:NMAKE="nmake"
57e1051a39Sopenharmony_ci        } Else {
58e1051a39Sopenharmony_ci            $env:NMAKE="nmake /S"
59e1051a39Sopenharmony_ci        }
60e1051a39Sopenharmony_ci    - ps: >-
61e1051a39Sopenharmony_ci        gci env:* | sort-object name
62e1051a39Sopenharmony_ci
63e1051a39Sopenharmony_cibuild_script:
64e1051a39Sopenharmony_ci    - cd _build
65e1051a39Sopenharmony_ci    - "%NMAKE% build_all_generated"
66e1051a39Sopenharmony_ci    - "%NMAKE% PERL=no-perl"
67e1051a39Sopenharmony_ci    - cd ..
68e1051a39Sopenharmony_ci
69e1051a39Sopenharmony_citest_script:
70e1051a39Sopenharmony_ci    - cd _build
71e1051a39Sopenharmony_ci    - ps: >-
72e1051a39Sopenharmony_ci        if ($env:Configuration -Match "plain") {
73e1051a39Sopenharmony_ci            cmd /c "%NMAKE% test VERBOSE_FAILURE=yes 2>&1"
74e1051a39Sopenharmony_ci        } Else {
75e1051a39Sopenharmony_ci            cmd /c "%NMAKE% test VERBOSE_FAILURE=yes TESTS=-test_fuzz 2>&1"
76e1051a39Sopenharmony_ci        }
77e1051a39Sopenharmony_ci    - ps: >-
78e1051a39Sopenharmony_ci        if ($env:Configuration -Match "shared") {
79e1051a39Sopenharmony_ci            mkdir ..\_install
80e1051a39Sopenharmony_ci            cmd /c "%NMAKE% install DESTDIR=..\_install 2>&1"
81e1051a39Sopenharmony_ci        }
82e1051a39Sopenharmony_ci    - cd ..
83