Skip to content

Commit

Permalink
Update rustls integ test
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Mar 4, 2025
1 parent b18e227 commit 055d40c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-13, macos-14-xlarge ]
latest: [ 0, 1 ]
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -63,7 +64,7 @@ jobs:
- name: Run rustls integration
working-directory: ./aws-lc-rs
run: |
./scripts/run-rustls-integration.sh
./scripts/run-rustls-integration.sh ${{ matrix.latest == 1 && '--latest-release' }}
links-crate-tests:
if: github.repository_owner == 'aws'
Expand Down
21 changes: 15 additions & 6 deletions aws-lc-rs/scripts/run-rustls-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

ROOT="${GITHUB_WORKSPACE:-$(git rev-parse --show-toplevel)}"

latest_release=0
for arg in "$@"; do
if [ "$arg" = "--latest-release" ]; then
latest_release=1
fi
done

CLEANUP_ON_EXIT=()

function cleanup() {
Expand Down Expand Up @@ -86,12 +93,14 @@ fi
# Trigger Cargo to generate the lock file
cargo update
cargo update "aws-lc-rs@${AWS_LC_RS_VERSION}"
cargo tree -i aws-lc-rs --features aws_lc_rs
cargo test --features aws_lc_rs
cargo tree -i aws-lc-rs --features aws-lc-rs
cargo test --features aws-lc-rs
popd &>/dev/null # "${RUSTLS_WEBPKI_DIR}"

pushd "${RUSTLS_DIR}"
git checkout "${RUSTLS_COMMIT}"
if [[ $latest_release == "1" ]]; then
git checkout "${RUSTLS_COMMIT}"
fi
rm Cargo.lock
# Update the Cargo.toml to use the GitHub repository reference under test.
RUSTLS_RCGEN_STRING="^rcgen = { .* }"
Expand All @@ -114,8 +123,8 @@ pushd ./rustls

# Print the dependency tree for debug purposes, if we did everything right there
# should only be one aws-lc-rs version. Otherwise this will fail sine there are multiple versions
cargo tree -i aws-lc-rs --features aws_lc_rs
# Run the rustls tests with the aws_lc_rs feature enabled
cargo test --features aws_lc_rs
cargo tree -i aws-lc-rs --features aws-lc-rs
# Run the rustls tests with the aws-lc-rs feature enabled
cargo test --features aws-lc-rs
popd &>/dev/null # ./rustls
popd &>/dev/null # ${RUSTLS_DIR}

0 comments on commit 055d40c

Please sign in to comment.