Skip to content

Commit

Permalink
Migrate 2nd batch of jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatnghiho committed Jan 2, 2025
1 parent a16c659 commit 6c703b5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
32 changes: 32 additions & 0 deletions tests/ci/cdk/cdk/codebuild/github_ci_integration_omnibus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,35 @@ batch:
image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-22.04_gcc-12x_latest
variables:
AWS_LC_CI_TARGET: "tests/ci/integration/run_ntp_integration.sh"

- identifier: openldap_integration_x86_64
buildspec: tests/ci/codebuild/common/run_simple_target.yml
env:
type: LINUX_CONTAINER
privileged-mode: false
compute-type: BUILD_GENERAL1_MEDIUM
image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-22.04_gcc-12x_latest
variables:
AWS_LC_CI_TARGET: "tests/ci/integration/run_openldap_integration.sh"
OPENLDAP_BRANCH: "master"
OPENLDAP_RELEASE: "OPENLDAP_REL_ENG_2_5"

- identifier: cyrus_sasl_integration_x86_64
buildspec: tests/ci/codebuild/common/run_simple_target.yml
env:
type: LINUX_CONTAINER
privileged-mode: false
compute-type: BUILD_GENERAL1_SMALL
image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-22.04_gcc-12x_latest
variables:
AWS_LC_CI_TARGET: "tests/ci/integration/run_cyrus_sasl_integration.sh"

- identifier: libevent_integration_x86_64
buildspec: tests/ci/codebuild/common/run_simple_target.yml
env:
type: LINUX_CONTAINER
privileged-mode: false
compute-type: BUILD_GENERAL1_SMALL
image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-22.04_gcc-12x_latest
variables:
AWS_LC_CI_TARGET: "tests/ci/integration/run_libevent_integration.sh"
18 changes: 9 additions & 9 deletions tests/ci/integration/run_openldap_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ AWS_LC_INSTALL_FOLDER="${SCRATCH_FOLDER}/aws-lc-install"

function openldap_build() {
local branch=${1}
pushd ${branch}
pushd "$OPENLDAP_BRANCH"
# Modify CFLAGS and LDFLAGS so compiler and linker can find AWS-LC's artifacts
export STRICT_C_COMPILER="gcc"
export CPPFLAGS="-I$AWS_LC_INSTALL_FOLDER/include"
Expand All @@ -57,22 +57,22 @@ function openldap_build() {

function openldap_run_tests() {
local branch=${1}
pushd ${branch}
pushd "$OPENLDAP_BRANCH"
make -j ${NUM_CPU_THREADS} test
popd
}

function openldap_patch() {
local branch=${1}
local src_dir="${OPENLDAP_SRC_FOLDER}/${branch}"
local patch_dir="${OPENLDAP_PATCH_FOLDER}/${branch}"
local src_dir="${OPENLDAP_SRC_FOLDER}/$OPENLDAP_BRANCH"
local patch_dir="${OPENLDAP_PATCH_FOLDER}/$OPENLDAP_BRANCH"
if [[ ! $(find -L ${patch_dir} -type f -name '*.patch') ]]; then
echo "No patch for ${branch}!"
echo "No patch for $OPENLDAP_BRANCH!"
exit 1
fi
git clone https://github.com/openldap/openldap.git ${src_dir} \
--depth 1 \
--branch ${branch}
--branch "$OPENLDAP_BRANCH"
for patchfile in $(find -L ${patch_dir} -type f -name '*.patch'); do
echo "Apply patch ${patchfile}..."
cat ${patchfile} \
Expand Down Expand Up @@ -103,9 +103,9 @@ pushd ${OPENLDAP_SRC_FOLDER}

# NOTE: As we add more versions to support, we may want to parallelize here
for branch in "$@"; do
openldap_patch ${branch}
openldap_build ${branch}
openldap_run_tests ${branch}
openldap_patch $OPENLDAP_BRANCH
openldap_build $OPENLDAP_BRANCH
openldap_run_tests $OPENLDAP_BRANCH
done

popd

0 comments on commit 6c703b5

Please sign in to comment.