Skip to content

Commit af5fe84

Browse files
authored
Speed up CodeBuild CI (#1426)
* Speed up CodeBuild CI: 1. Split OpenSSH into two jobs, one for main branch, and another for 8.9 2. Use RelWithDebInfo build for MySQL 3. Force MySQL to use double the number of jobs to run the tests 4. Update ARM fuzzer to run for a shorter period of time * PR feedback: go back to using parallel=auto for mtr
1 parent b728edb commit af5fe84

File tree

4 files changed

+42
-18
lines changed

4 files changed

+42
-18
lines changed

tests/ci/cdk/cdk/codebuild/github_ci_integration_omnibus.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ batch:
3636
variables:
3737
AWS_LC_CI_TARGET: "tests/ci/integration/run_crt_integration.sh"
3838

39-
- identifier: openssh_integration_x86_64
39+
- identifier: openssh_integration_master_x86_64
4040
buildspec: tests/ci/codebuild/common/run_simple_target.yml
4141
env:
4242
type: LINUX_CONTAINER
@@ -45,8 +45,31 @@ batch:
4545
image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:amazonlinux-2023_clang-15x_sanitizer_latest
4646
variables:
4747
AWS_LC_CI_TARGET: "tests/ci/integration/run_openssh_integration.sh"
48+
OPENSSH_BRANCH: "master"
4849

49-
- identifier: openssh_integration_aarch
50+
- identifier: openssh_integration_8_9_x86_64
51+
buildspec: tests/ci/codebuild/common/run_simple_target.yml
52+
env:
53+
type: LINUX_CONTAINER
54+
privileged-mode: false
55+
compute-type: BUILD_GENERAL1_SMALL
56+
image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:amazonlinux-2023_clang-15x_sanitizer_latest
57+
variables:
58+
AWS_LC_CI_TARGET: "tests/ci/integration/run_openssh_integration.sh"
59+
OPENSSH_BRANCH: "V_8_9"
60+
61+
- identifier: openssh_integration_master_aarch
62+
buildspec: tests/ci/codebuild/common/run_simple_target.yml
63+
env:
64+
type: ARM_CONTAINER
65+
privileged-mode: false
66+
compute-type: BUILD_GENERAL1_LARGE
67+
image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-aarch:amazonlinux-2023_clang-15x_sanitizer_latest
68+
variables:
69+
AWS_LC_CI_TARGET: "tests/ci/integration/run_openssh_integration.sh"
70+
OPENSSH_BRANCH: "master"
71+
72+
- identifier: openssh_integration_8_9_aarch
5073
buildspec: tests/ci/codebuild/common/run_simple_target.yml
5174
env:
5275
type: ARM_CONTAINER
@@ -55,6 +78,7 @@ batch:
5578
image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-aarch:amazonlinux-2023_clang-15x_sanitizer_latest
5679
variables:
5780
AWS_LC_CI_TARGET: "tests/ci/integration/run_openssh_integration.sh"
81+
OPENSSH_BRANCH: "V_8_9"
5882

5983
- identifier: postgres_integration_x86_64
6084
buildspec: tests/ci/codebuild/common/run_nonroot_target.yml

tests/ci/integration/run_mysql_integration.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ function mysql_patch_reminder() {
4545
}
4646

4747
function mysql_build() {
48-
cmake ${MYSQL_SRC_FOLDER} -GNinja -DWITH_BOOST=${BOOST_INSTALL_FOLDER} -DWITH_SSL=${AWS_LC_INSTALL_FOLDER} "-B${MYSQL_BUILD_FOLDER}"
49-
ninja -C ${MYSQL_BUILD_FOLDER}
48+
cmake ${MYSQL_SRC_FOLDER} -GNinja -DWITH_BOOST=${BOOST_INSTALL_FOLDER} -DWITH_SSL=${AWS_LC_INSTALL_FOLDER} "-B${MYSQL_BUILD_FOLDER}" -DCMAKE_BUILD_TYPE=RelWithDebInfo
49+
time ninja -C ${MYSQL_BUILD_FOLDER}
5050
ls -R ${MYSQL_BUILD_FOLDER}
5151
}
5252

tests/ci/integration/run_openssh_integration.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ function openssh_build() {
6060

6161
function checkout_openssh_branch() {
6262
pushd "${OPENSSH_WORKSPACE_FOLDER}"
63-
make clean
6463
git clean -f -d
6564
git checkout --track origin/"$1"
6665
popd
@@ -80,24 +79,25 @@ function openssh_run_tests() {
8079
mkdir -p "${AWS_LC_BUILD_FOLDER}" "${AWS_LC_INSTALL_FOLDER}" "${OPENSSH_INSTALL_FOLDER}"
8180

8281
# Get latest OpenSSH version.
83-
git clone https://github.com/openssh/openssh-portable.git
82+
git clone https://github.com/openssh/openssh-portable.git "${OPENSSH_WORKSPACE_FOLDER}"
8483
ls
8584

86-
# Buld AWS-LC as a shared library
85+
# Build AWS-LC as a shared library
8786
aws_lc_build "$SRC_ROOT" "$AWS_LC_BUILD_FOLDER" "$AWS_LC_INSTALL_FOLDER" -DBUILD_TESTING=OFF -DBUILD_TOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=1
8887
install_aws_lc
8988

90-
CODEBUILD_SKIPPED_TESTS="agent-subprocess forwarding multiplex channel-timeout forward-control agent-restrict connection-timeout"
89+
if [ "$OPENSSH_BRANCH" != "master" ]; then
90+
checkout_openssh_branch "$OPENSSH_BRANCH"
91+
fi
9192

92-
# Using default branch. Build openssh and run tests.
9393
openssh_build
94-
openssh_run_tests "${CODEBUILD_SKIPPED_TESTS}"
9594

96-
# Using branch V_8_9
97-
checkout_openssh_branch V_8_9
98-
openssh_build
99-
# In v8.9, the "percent" test requires the 'openssl' cli command
100-
openssh_run_tests "percent ${CODEBUILD_SKIPPED_TESTS}"
95+
CODEBUILD_SKIPPED_TESTS="agent-subprocess forwarding multiplex channel-timeout forward-control agent-restrict connection-timeout"
96+
if [ "$OPENSSH_BRANCH" == "V_8_9" ]; then
97+
# In v8.9, the "percent" test requires the 'openssl' cli command
98+
openssh_run_tests "percent ${CODEBUILD_SKIPPED_TESTS}"
99+
else
100+
openssh_run_tests "${CODEBUILD_SKIPPED_TESTS}"
101+
fi
101102

102103
popd
103-

tests/ci/run_fuzz_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ set -u
1515
# 18 minutes for cleanup and merging files
1616
if [[ $PLATFORM == "aarch64" ]]; then
1717
# Arm sanitizers are very slow which causes the clean up time to take longer per
18-
# fuzz test, only run for 16 minutes
19-
TOTAL_FUZZ_TEST_TIME=1000
18+
# fuzz test, only run for 8 minutes
19+
TOTAL_FUZZ_TEST_TIME=500
2020
else
2121
TOTAL_FUZZ_TEST_TIME=1500
2222
fi

0 commit comments

Comments
 (0)