Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 48 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,39 +113,70 @@ jobs:
- arch: x64
backend: openssl
target-platform: x64
vcpkg-triplet: x64-windows
build-options:
- arch: x64
backend: botan
target-platform: x64
vcpkg-triplet: x64-windows
build-options: -DENABLE_ECC=OFF -DENABLE_EDDSA=OFF
- arch: x86
backend: openssl
target-platform: Win32
vcpkg-triplet: x86-windows
build-options: -DENABLE_ECC=OFF -DENABLE_EDDSA=OFF
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg-triplet }}
steps:
- uses: actions/checkout@v4

- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}

- name: Setup vcpkg
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
git checkout 74e6536215718009aae747d86d84b78376bf9e09
.\bootstrap-vcpkg.bat
echo "VCPKG_ROOT=${{ github.workspace }}\vcpkg" >> $env:GITHUB_ENV

- name: Create vcpkg.json
run: >
echo '{ "dependencies": [ "openssl", "botan", "cppunit" ],
"overrides": [ { "name": "openssl", "version-string": "1.1.1n" },
{ "name": "botan", "version-string": "2.19.3" } ],
"builtin-baseline": "38d1652f152d36481f2f4e8a85c0f1e14f3769f7" }' > vcpkg.json
- uses: seanmiddleditch/vcpkg-action@master
id: vcpkg
with:
manifest-dir: ${{ github.workspace }}
triplet: ${{ matrix.arch }}-windows
token: ${{ github.token }}
- name: Build
run: |
mkdir build
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
cmake --build build
@'
{
"dependencies": [ "openssl", "botan", "cppunit" ],
"overrides": [
{ "name": "openssl", "version-string": "1.1.1n" },
{ "name": "botan", "version-string": "2.19.3" }
],
"builtin-baseline": "74e6536215718009aae747d86d84b78376bf9e09"
}
'@ | Out-File -FilePath vcpkg.json -Encoding utf8

- name: Install dependencies
run: |
cd vcpkg
.\vcpkg.exe install --triplet=${{ matrix.vcpkg-triplet }}
working-directory: ${{ github.workspace }}

- name: Configure
run: |
cmake -B build `
-A ${{ matrix.target-platform }} `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg-triplet }} `
-DWITH_CRYPTO_BACKEND=${{ matrix.backend }} `
${{ matrix.build-options }} `
-DDISABLE_NON_PAGED_MEMORY=ON `
-DBUILD_TESTS=ON

- name: Build
run: cmake --build build --config Release

- name: Test
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
cmake --build build --target RUN_TESTS
run: cmake --build build --config Release --target RUN_TESTS
Loading