Skip to content

Commit

Permalink
Add Windows crt-static test
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Mar 6, 2025
1 parent 1c3fd9c commit f4f8e23
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,28 @@ jobs:
run: |
./scripts/run-rustls-integration.sh
windows-debug-crt-static-test:
if: github.repository_owner == 'aws'
name: rustls-integration
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: [ windows-latest ]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: run-windows-debug-crt-static-test
working-directory: ./aws-lc-rs
shell: bash
run: |
./scripts/run-windows-debug-crt-static-test.sh
links-crate-tests:
if: github.repository_owner == 'aws'
name: sys crate tests
Expand Down
39 changes: 39 additions & 0 deletions aws-lc-rs/scripts/run-windows-debug-crt-static-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash -exu
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0 OR ISC

SRC_ROOT="${GITHUB_WORKSPACE:-$(git rev-parse --show-toplevel)}/aws-lc-rs"

case `uname -s` in
CYGWIN*) echo Cygwin;;
MINGW*) echo MinGw;;
MSYS_NT*) echo MSys;;
*) echo Unknown OS: `uname -s`; exit 1;;
esac

TMP_DIR=`mktemp -d`

pushd "${TMP_DIR}"
cargo new --bin aws-lc-rs-test
pushd aws-lc-rs-test

cargo add aws-lc-rs rustls rustls-platform-verifier
cat << EOF >> Cargo.toml
[profile.release]
debug = "limited"
[patch.crates-io]
"aws-lc-rs" = { path = "${SRC_ROOT}" }
EOF

mkdir -p .cargo
cat << EOF > .cargo/config.toml
[target.'cfg(target_os = "windows")']
rustflags = ["-C", "target-feature=+crt-static"]
EOF

cargo update
cargo build --release

popd
popd

0 comments on commit f4f8e23

Please sign in to comment.