Skip to content

Commit

Permalink
Properly set quic tls variable to openssl on windows (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
thhous-msft authored Mar 31, 2022
1 parent b8df399 commit c21a590
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 9 deletions.
50 changes: 44 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ on:
permissions: read-all

jobs:
build-linux:
build-linux-openssl:
permissions:
contents: read
name: Build Linux
name: Build Linux (OpenSSL)
runs-on: ubuntu-latest
steps:
- name: Harden Runner
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
with:
name: bin-linux
name: bin-linux-openssl
path: |
build/**/*.so
build/**/msh3app
Expand All @@ -42,10 +42,48 @@ jobs:
run: /usr/local/lib/msh3app www.cloudflare.com
- name: GET www.google.com
run: /usr/local/lib/msh3app www.google.com
build-windows:
build-windows-openssl:
permissions:
contents: read
name: Build Windows
name: Build Windows (OpenSSL)
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5
with:
submodules: 'recursive'
- name: Install Perl
uses: shogo82148/[email protected]
with:
perl-version: '5.34'
- name: Install NASM
uses: ilammy/[email protected]
- name: Generate
run: mkdir build && cd build && cmake -G 'Visual Studio 17 2022' -A x64 -DQUIC_TLS=openssl -DMSH3_TOOL=on ..
- name: Build
run: cd build && cmake --build .
- name: Upload
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
with:
name: bin-windows-openssl
path: |
build/**/*.dll
build/**/msh3app.exe
- name: Install
run: cd build && cmake --install . --config Debug
- name: GET outlook.office.com
run: |
& 'C:/Program Files/msh3/lib/msh3app' outlook.office.com
- name: GET www.cloudflare.com
run: |
& 'C:/Program Files/msh3/lib/msh3app' www.cloudflare.com
- name: GET www.google.com
run: |
& 'C:/Program Files/msh3/lib/msh3app' www.google.com
build-windows-schannel:
permissions:
contents: read
name: Build Windows (Schannel)
runs-on: windows-latest
steps:
- name: Checkout repository
Expand All @@ -59,7 +97,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
with:
name: bin-windows
name: bin-windows-schannel
path: |
build/**/*.dll
build/**/msh3app.exe
Expand Down
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ option(MSH3_TOOL "Build tool" OFF)

# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)

# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")

# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
Expand All @@ -29,7 +29,11 @@ option(LSQPACK_BIN "Build binaries" OFF)
add_subdirectory(ls-qpack)

# Configure and build msquic dependency.
set(QUIC_TLS "openssl")
if (WIN32)
set(QUIC_TLS "schannel" CACHE STRING "TLS Library to use")
else()
set(QUIC_TLS "openssl" CACHE STRING "TLS Library to use")
endif()
set(QUIC_ENABLE_LOGGING ON CACHE BOOL "Enable MsQuic logging")
set(CMAKE_BUILD_TYPE "Release")
add_subdirectory(msquic)
Expand Down

0 comments on commit c21a590

Please sign in to comment.