@@ -113,39 +113,70 @@ jobs:
113113 - arch : x64
114114 backend : openssl
115115 target-platform : x64
116+ vcpkg-triplet : x64-windows
116117 build-options :
117118 - arch : x64
118119 backend : botan
119120 target-platform : x64
121+ vcpkg-triplet : x64-windows
120122 build-options : -DENABLE_ECC=OFF -DENABLE_EDDSA=OFF
121123 - arch : x86
122124 backend : openssl
123125 target-platform : Win32
126+ vcpkg-triplet : x86-windows
124127 build-options : -DENABLE_ECC=OFF -DENABLE_EDDSA=OFF
128+ env :
129+ VCPKG_DEFAULT_TRIPLET : ${{ matrix.vcpkg-triplet }}
125130 steps :
126131 - uses : actions/checkout@v4
132+
127133 - uses : ilammy/msvc-dev-cmd@v1
128134 with :
129135 arch : ${{ matrix.arch }}
136+
137+ - name : Setup vcpkg
138+ run : |
139+ git clone https://github.com/Microsoft/vcpkg.git
140+ cd vcpkg
141+ git checkout 74e6536215718009aae747d86d84b78376bf9e09
142+ .\bootstrap-vcpkg.bat
143+ echo "VCPKG_ROOT=${{ github.workspace }}\vcpkg" >> $env:GITHUB_ENV
144+
130145 - name : Create vcpkg.json
131- run : >
132- echo '{ "dependencies": [ "openssl", "botan", "cppunit" ],
133- "overrides": [ { "name": "openssl", "version-string": "1.1.1n" },
134- { "name": "botan", "version-string": "2.19.3" } ],
135- "builtin-baseline": "38d1652f152d36481f2f4e8a85c0f1e14f3769f7" }' > vcpkg.json
136- - uses : seanmiddleditch/vcpkg-action@master
137- id : vcpkg
138- with :
139- manifest-dir : ${{ github.workspace }}
140- triplet : ${{ matrix.arch }}-windows
141- token : ${{ github.token }}
142- - name : Build
143146 run : |
144- mkdir build
145- cmake -B build ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} -A ${{ matrix.target-platform }} -DWITH_CRYPTO_BACKEND=${{ matrix.backend }} ${{ matrix.build-options }} -DDISABLE_NON_PAGED_MEMORY=ON -DBUILD_TESTS=ON
146- cmake --build build
147+ @'
148+ {
149+ "dependencies": [ "openssl", "botan", "cppunit" ],
150+ "overrides": [
151+ { "name": "openssl", "version-string": "1.1.1n" },
152+ { "name": "botan", "version-string": "2.19.3" }
153+ ],
154+ "builtin-baseline": "74e6536215718009aae747d86d84b78376bf9e09"
155+ }
156+ '@ | Out-File -FilePath vcpkg.json -Encoding utf8
157+
158+ - name : Install dependencies
159+ run : |
160+ cd vcpkg
161+ .\vcpkg.exe install --triplet=${{ matrix.vcpkg-triplet }}
162+ working-directory : ${{ github.workspace }}
163+
164+ - name : Configure
165+ run : |
166+ cmake -B build `
167+ -A ${{ matrix.target-platform }} `
168+ -DCMAKE_BUILD_TYPE=Release `
169+ -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
170+ -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg-triplet }} `
171+ -DWITH_CRYPTO_BACKEND=${{ matrix.backend }} `
172+ ${{ matrix.build-options }} `
173+ -DDISABLE_NON_PAGED_MEMORY=ON `
174+ -DBUILD_TESTS=ON
175+
176+ - name : Build
177+ run : cmake --build build --config Release
178+
147179 - name : Test
148180 env :
149181 CTEST_OUTPUT_ON_FAILURE : 1
150- run : |
151- cmake --build build --target RUN_TESTS
182+ run : cmake --build build --config Release --target RUN_TESTS
0 commit comments