diff --git a/tests/ci/cdk/cdk/codebuild/github_ci_legacy_avx.yaml b/tests/ci/cdk/cdk/codebuild/github_ci_legacy_avx.yaml new file mode 100644 index 0000000000..6fa6e30cc1 --- /dev/null +++ b/tests/ci/cdk/cdk/codebuild/github_ci_legacy_avx.yaml @@ -0,0 +1,64 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 OR ISC + +version: 0.2 + +# Doc for batch https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-list +batch: + build-list: + - identifier: centos7_gcc4x_x86 + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: false + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:centos-7_gcc-4x_latest + variables: + AWSLC_32BIT: 1 + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" + - identifier: centos7_gcc4x_x86_64 + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: true + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:centos-7_gcc-4x_latest + variables: + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" + - identifier: centos8_gcc8x_x86_64 + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: true + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:centos-8_gcc-8x_latest + variables: + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" + - identifier: amazonlinux2_gcc7x_x86_64 + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: true + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:amazonlinux-2_gcc-7x_latest + variables: + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" + - identifier: ubuntu1604_gcc5x_x86 + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: false + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-16.04_gcc-5x_latest + variables: + AWSLC_32BIT: 1 + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" + - identifier: ubuntu1804_clang6x_x86_64 + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: true + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-18.04_clang-6x_latest + variables: + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" \ No newline at end of file diff --git a/tests/ci/cdk/cdk/codebuild/github_ci_linux_x86_omnibus.yaml b/tests/ci/cdk/cdk/codebuild/github_ci_linux_x86_omnibus.yaml index df307a6d4f..e9ff48d693 100644 --- a/tests/ci/cdk/cdk/codebuild/github_ci_linux_x86_omnibus.yaml +++ b/tests/ci/cdk/cdk/codebuild/github_ci_linux_x86_omnibus.yaml @@ -663,3 +663,61 @@ batch: image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:amazonlinux-2023_gcc-11x_latest variables: AWS_LC_CI_TARGET: "tests/ci/run_fips_callback_tests.sh" + + # TEMPORARY, TO TEST run_legacy_avx_tests.sh without deploying the CI locally + - identifier: centos7_gcc4x_x86_avx_legacy + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: false + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:centos-7_gcc-4x_latest + variables: + AWSLC_32BIT: 1 + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" + - identifier: centos7_gcc4x_x86_64_avx_legacy + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: true + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:centos-7_gcc-4x_latest + variables: + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" + - identifier: centos8_gcc8x_x86_64_avx_legacy + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: true + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:centos-8_gcc-8x_latest + variables: + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" + - identifier: amazonlinux2_gcc7x_x86_64_avx_legacy + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: true + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:amazonlinux-2_gcc-7x_latest + variables: + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" + - identifier: ubuntu1604_gcc5x_x86_avx_legacy + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: false + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-16.04_gcc-5x_latest + variables: + AWSLC_32BIT: 1 + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" + - identifier: ubuntu1804_clang6x_x86_64_avx_legacy + buildspec: ./tests/ci/codebuild/common/run_simple_target.yml + env: + type: LINUX_CONTAINER + privileged-mode: true + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-18.04_clang-6x_latest + variables: + AWS_LC_CI_TARGET: "tests/ci/run_legacy_avx_tests.sh" \ No newline at end of file diff --git a/tests/ci/cdk/pipeline/ci_util.py b/tests/ci/cdk/pipeline/ci_util.py index 44fcfc917a..75cf0f53fc 100644 --- a/tests/ci/cdk/pipeline/ci_util.py +++ b/tests/ci/cdk/pipeline/ci_util.py @@ -106,3 +106,13 @@ def add_ci_stacks( ignore_failure=True, stack_name="aws-lc-ci-x509", ) + + legacy_avx_build_spec_file = "cdk/codebuild/github_ci_legacy_avx.yaml" + AwsLcGitHubCIStack( + scope, + "aws-lc-ci-legacy-avx", + legacy_avx_build_spec_file, + env=env, + ignore_failure=False, + stack_name="aws-lc-ci-legacy-avx", + ) \ No newline at end of file diff --git a/tests/ci/run_legacy_avx_tests.sh b/tests/ci/run_legacy_avx_tests.sh new file mode 100755 index 0000000000..fbe049f1fb --- /dev/null +++ b/tests/ci/run_legacy_avx_tests.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 OR ISC + +set -exo pipefail + +source tests/ci/common_posix_setup.sh + +# Lightly verify that uncommon build options does not break the build. First +# define a list of typical build options to verify the special build option with +build_options_to_test=("" "-DBUILD_SHARED_LIBS=1" "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release" "-DENABLE_PRE_SONAME_BUILD=0") + +## Build option: MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX +for build_option in "${build_options_to_test[@]}"; do + build_and_test ${build_option} -DMY_ASSEMBLER_IS_TOO_OLD_FOR_AVX=ON +done + +## Build option: MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX +for build_option in "${build_options_to_test[@]}"; do + build_and_test ${build_option} -DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON +done + +# When Go is disabled, a different test target is produced +build_and_run_minimal_test -DDISABLE_PERL=ON -DDISABLE_GO=ON -DMY_ASSEMBLER_IS_TOO_OLD_FOR_AVX=ON +build_and_run_minimal_test -DDISABLE_PERL=ON -DDISABLE_GO=ON -DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON \ No newline at end of file diff --git a/tests/ci/run_posix_tests.sh b/tests/ci/run_posix_tests.sh index 8b7e752f69..8dce298fc3 100755 --- a/tests/ci/run_posix_tests.sh +++ b/tests/ci/run_posix_tests.sh @@ -37,16 +37,3 @@ build_and_test -DDISABLE_PERL=ON echo "Testing building with AArch64 Data-Independent Timing (DIT) on." build_and_test -DENABLE_DATA_INDEPENDENT_TIMING=ON -DCMAKE_BUILD_TYPE=Release -# Lightly verify that uncommon build options does not break the build. Fist -# define a list of typical build options to verify the special build option with -build_options_to_test=("" "-DBUILD_SHARED_LIBS=1" "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release" "-DDISABLE_PERL=ON -DDISABLE_GO=ON" "-DENABLE_PRE_SONAME_BUILD=0") - -## Build option: MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX -for build_option in "${build_options_to_test[@]}"; do - run_build ${build_option} -DMY_ASSEMBLER_IS_TOO_OLD_FOR_AVX=ON -done - -## Build option: MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX -for build_option in "${build_options_to_test[@]}"; do - run_build ${build_option} -DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON -done