File tree Expand file tree Collapse file tree 2 files changed +19
-12
lines changed
Expand file tree Collapse file tree 2 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 3333
3434 build-and-test-windows :
3535 # if: false # Temporarily disable
36- name : Build And Test Windows
37- runs-on : windows-latest
36+ name : Build And Test Windows ${{ matrix.os-version }} ${{ matrix.crypto }}
37+ runs-on : windows-${{ matrix.os-version }}
38+ strategy :
39+ fail-fast : false
40+ matrix :
41+ os-version : [2019, 2022]
42+ crypto : [OpenSSL, BCrypt]
3843 env :
3944 VCPKG_ROOT : ${{ github.workspace }}/vcpkg
4045 steps :
6570 run : |
6671 mkdir build
6772 cd build
68- cmake -S .. -G Ninja -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake
73+ cmake -S .. -G Ninja -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake -DUSE_CRYPTO=${{matrix.crypto}}
6974 shell : cmd
7075
7176 # Mark all directories as safe so checkouts performed in CMakeLists.txt don't cause "unsafe repository" errors.
Original file line number Diff line number Diff line change @@ -84,15 +84,17 @@ if (WIN32)
8484 string (REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
8585 string (REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
8686
87- #
88- # Check whether BCrypt can be used with this SDK version
89- #
90- cmake_push_check_state()
91- set (CMAKE_REQUIRED_LIBRARIES bcrypt)
92- check_symbol_exists(BCryptEncrypt windows.h BCRYPT_AVAILABLE)
93- cmake_pop_check_state()
94- if (NOT BCRYPT_AVAILABLE AND USE_CRYPTO STREQUAL "BCrypt" )
95- message (FATAL_ERROR "You're on Windows but BCrypt seems to be unavailable, you will need OpenSSL" )
87+ if (USE_CRYPTO STREQUAL "BCrypt" )
88+ #
89+ # Check whether BCrypt can be used with this SDK version
90+ #
91+ cmake_push_check_state()
92+ set (CMAKE_REQUIRED_LIBRARIES bcrypt)
93+ check_symbol_exists(BCryptEncrypt windows.h BCRYPT_AVAILABLE)
94+ cmake_pop_check_state()
95+ if (NOT BCRYPT_AVAILABLE)
96+ message (FATAL_ERROR "You're on Windows but BCrypt seems to be unavailable, you will need OpenSSL" )
97+ endif ()
9698 endif ()
9799endif ()
98100
You can’t perform that action at this time.
0 commit comments