Skip to content

Commit 455fbd8

Browse files
committed
Wire-up rust-openssl into GitHub CI (for the time being)
1 parent c80720c commit 455fbd8

File tree

4 files changed

+70
-3
lines changed

4 files changed

+70
-3
lines changed

.github/workflows/integrations.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,28 @@ jobs:
4848
- name: Run librdkafka build
4949
run: |
5050
./tests/ci/integration/run_librdkafka_integration.sh
51-
51+
rust-openssl:
52+
if: github.repository_owner == 'aws'
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout aws-lc
56+
uses: actions/checkout@v4
57+
with:
58+
path: aws-lc
59+
- name: Checkout rust-openssl
60+
uses: actions/checkout@v4
61+
with:
62+
repository: sfackler/rust-openssl
63+
path: rust-openssl
64+
- uses: dtolnay/rust-toolchain@stable
65+
id: toolchain
66+
- name: Set Rust toolchain override
67+
run: rustup override set ${{ steps.toolchain.outputs.name }}
68+
- name: Install bindgen-cli
69+
run: cargo install --locked bindgen-cli
70+
- name: Run rust-openssl integration tests
71+
env:
72+
RUST_OPENSSL_SRC_DIR: "${GITHUB_WORKSPACE}/rust-openssl"
73+
run: |
74+
pushd "${GITHUB_WORKSPACE}/aws-lc"
75+
./tests/ci/integration/run_rust_openssl_integration.sh

tests/ci/integration/run_bind9_integration.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#!/bin/bash -exu
1+
#!/usr/bin/env bash
22
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
# SPDX-License-Identifier: Apache-2.0 OR ISC
44

5+
set -exu
6+
57
source tests/ci/common_posix_setup.sh
68

79
# Set up environment.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
# SPDX-License-Identifier: Apache-2.0 OR ISC
4+
5+
set -exo pipefail
6+
7+
source tests/ci/common_posix_setup.sh
8+
9+
if [[ -z "${RUST_OPENSSL_SRC_DIR}" ]]; then
10+
echo "RUST_OPENSSL_SRC_DIR environment variable must be set"
11+
exit 1
12+
fi
13+
14+
# Create build directory and navigate to it
15+
AWS_LC_SRC_DIR="${SRC_DIR}"
16+
AWS_LC_BUILD_DIR="${SYS_ROOT}/aws-lc-build"
17+
AWS_LC_SHARED_INSTALL_DIR="${SYS_ROOT}/aws-lc-install-shared"
18+
AWS_LC_STATIC_INSTALL_DIR="${SYS_ROOT}/aws-lc-install-static"
19+
20+
function validate_rust_openssl() {
21+
OPENSSL_DIR="${1}"
22+
OPENSSL_STATIC="${2}"
23+
cargo -v -C "${RUST_OPENSSL_SRC_DIR}" clean
24+
env OPENSSL_DIR="${OPENSSL_DIR}" OPENSSL_STATIC="${OPENSSL_STATIC}" \
25+
cargo -v -C "${RUST_OPENSSL_SRC_DIR}" test -p openssl-sys --release --no-default-features "${@:3}"
26+
env OPENSSL_DIR="${OPENSSL_DIR}" OPENSSL_STATIC="${OPENSSL_STATIC}" \
27+
cargo -v -C "${RUST_OPENSSL_SRC_DIR}" test -p openssl --release --no-default-features "${@:3}"
28+
}
29+
30+
AWS_LC_BUILD_ARGS=("-DBUILD_TESTING=OFF" "-DBUILD_TOOL=OFF" "-DCMAKE_BUILD_TYPE=RelWithDebInfo")
31+
32+
aws_lc_build "${AWS_LC_SRC_DIR}" "${AWS_LC_BUILD_DIR}" "${AWS_LC_INSTALL_DIR}" "${AWS_LC_BUILD_ARGS[@]}" -DBUILD_SHARED_LIBS=0
33+
aws_lc_build "${AWS_LC_SRC_DIR}" "${AWS_LC_BUILD_DIR}" "${AWS_LC_SHARED_INSTALL_DIR}" "${AWS_LC_BUILD_ARGS[@]}" -DBUILD_SHARED_LIBS=1
34+
35+
validate_rust_openssl "${AWS_LC_SHARED_INSTALL_DIR}" 0
36+
validate_rust_openssl "${AWS_LC_STATIC_INSTALL_DIR}" 1
37+
38+
validate_rust_openssl "${AWS_LC_SHARED_INSTALL_DIR}" 0 -F bindgen
39+
validate_rust_openssl "${AWS_LC_STATIC_INSTALL_DIR}" 1 -F bindgen

tests/ci/integration/run_strongswan_integration.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#!/bin/bash -exu
1+
#!/usr/bin/env bash
22
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
# SPDX-License-Identifier: Apache-2.0 OR ISC
44

5+
set -exu
6+
57
source tests/ci/common_posix_setup.sh
68

79
# Set up environment.

0 commit comments

Comments
 (0)