Skip to content

Commit

Permalink
ci: test windows dyn link
Browse files Browse the repository at this point in the history
This requires an upstream bug-fix from cargo-c. Until there's a release
published with this fix we have to build our own copy (slow).

With this in place, we can run integration tests against client/server
binaries that dynamically link librustls.dll \o/
  • Loading branch information
cpu committed Nov 29, 2024
1 parent 3b0b18e commit 68acdfc
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,9 @@ jobs:
dyn_link: [ off ]
include:
# One build with dynamic linking.
# TODO(@cpu): debug broken dyn-link build on Windows.
# - crypto: aws-lc-rs
# config: Release
# dyn_link: on
- crypto: aws-lc-rs
config: Release
dyn_link: on
# One build with cert_compression.
- crypto: aws-lc-rs
config: Release
Expand All @@ -221,13 +220,27 @@ jobs:
with:
arch: x64

# TODO(@cpu): switch back to binary cargo-c releases once a release with
# https://github.com/lu-zero/cargo-c/pull/428 is included. This is
# needed for dynamic linking support on Windows.
# - name: Install cargo-c
#
# env:
# LINK: https://github.com/lu-zero/cargo-c/releases/latest/download
# CARGO_C_FILE: cargo-c-windows-msvc.zip
# run: |
# curl -L "$env:LINK/$env:CARGO_C_FILE" -o cargo-c-windows-msvc.zip
# powershell -Command "Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force"
- name: Install cargo-c
env:
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download
CARGO_C_FILE: cargo-c-windows-msvc.zip
run: |
curl -L "$env:LINK/$env:CARGO_C_FILE" -o cargo-c-windows-msvc.zip
powershell -Command "Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force"
mkdir /tmp
pushd /tmp
git clone https://github.com/lu-zero/cargo-c.git
cd cargo-c
git fetch origin
git checkout msvc-def-gen
cargo install --path ./
popd
- name: Configure CMake
run: cmake -DCRYPTO_PROVIDER="${{ matrix.crypto }}" -DCERT_COMPRESSION="${{ matrix.cert_compression }}" -DDYN_LINK="${{ matrix.dyn_link }}" -S . -B build
Expand Down

0 comments on commit 68acdfc

Please sign in to comment.