-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added CI dimension that will run the benchmarking tools to verify that we haven't made any changes that break them
- Loading branch information
Dominic Dams
authored
Jul 18, 2022
1 parent
2b38edd
commit 726062d
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
version: 0.2 | ||
|
||
phases: | ||
pre_build: | ||
commands: | ||
# To use this build spec file, CMake environment variable CC and CXX compiler should be defined before build. | ||
- if [[ -z "${CC+x}" || -z "${CC}" ]]; then echo "CC is not defined." && exit 1; else ${CC} --version && echo "Found correct CC."; fi | ||
- if [[ -z "${CXX+x}" || -z "${CXX}" ]]; then echo "CXX is not defined." && exit 1; else ${CXX} --version && echo "Found correct CXX."; fi | ||
build: | ||
commands: | ||
- ./tests/ci/run_benchmark_build_tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash -ex | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
source tests/ci/common_posix_setup.sh | ||
|
||
install_dir="$(pwd)/../librypto_install_dir" | ||
openssl_url='https://github.com/openssl/openssl.git' | ||
openssl_1_1_branch='OpenSSL_1_1_1-stable' | ||
openssl_3_0_branch='openssl-3.0' | ||
|
||
function build_openssl_1_1 { | ||
echo "building OpenSSL 1.1" | ||
git clone --branch "${openssl_1_1_branch}" "${openssl_url}" "../openssl-1.1" | ||
pushd "../openssl-1.1" | ||
mkdir -p "${install_dir}/openssl-1.1" | ||
./config --prefix="${install_dir}/openssl-1.1" --openssldir="${install_dir}/openssl-1.1" | ||
make "-j${NUM_CPU_THREADS}" | ||
make install | ||
popd | ||
rm -rf "../openssl-1.1" | ||
} | ||
|
||
function build_openssl_3_0 { | ||
echo "building OpenSSL 3.0" | ||
git clone --branch "${openssl_3_0_branch}" "${openssl_url}" "../openssl-3.0" | ||
pushd "../openssl-3.0" | ||
mkdir -p "${install_dir}/openssl-3.0" | ||
./Configure --prefix="${install_dir}/openssl-3.0" --openssldir="${install_dir}/openssl-3.0" | ||
make "-j${NUM_CPU_THREADS}" | ||
make install | ||
popd | ||
rm -rf "../openssl-1.1" | ||
} | ||
|
||
# We build each tool individually so we can have more insight into what is failing | ||
|
||
mkdir -p "${install_dir}" | ||
echo "Testing awslc_bm" | ||
mkdir "${install_dir}/aws_lc" | ||
run_build -DAWSLC_INSTALL_DIR="${install_dir}/aws_lc" | ||
"${BUILD_ROOT}/tool/awslc_bm" | ||
|
||
build_openssl_1_1 | ||
echo "Testing ossl_bm with OpenSSL 1.1" | ||
run_build -DOPENSSL_INSTALL_DIR="${install_dir}/openssl-1.1" | ||
"${BUILD_ROOT}/tool/ossl_bm" | ||
|
||
build_openssl_3_0 | ||
echo "Testing ossl_bm with OpenSSL 3.0" | ||
run_build -DOPENSSL3_INSTALL_DIR="${install_dir}/openssl-3.0" | ||
"${BUILD_ROOT}/tool/ossl3_bm" |