From 8a78f5a0bce6efc429947f7b935ae53eb6181282 Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Thu, 18 Apr 2024 15:16:51 -0700 Subject: [PATCH 1/6] Use CodeBuild batch matrix to test all major releases of GCC between 8 and 13 --- .../github_ci_linux_x86_omnibus.yaml | 23 +++++++++++++++++++ ...un_simple_target_with_apt_dependencies.yml | 19 +++++++++++++++ .../install_common_dependencies.sh | 4 ++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 tests/ci/codebuild/common/run_simple_target_with_apt_dependencies.yml 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 918ed91309..9ad34e53c8 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 @@ -5,6 +5,29 @@ 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-matrix: + static: + buildspec: ./tests/ci/codebuild/common/run_simple_target_with_apt_dependencies.yml + env: + type: LINUX_CONTAINER + privileged-mode: false + compute-type: BUILD_GENERAL1_SMALL + variables: + AWS_LC_CI_DEPENDENCIES: "cmake" + dynamic: + env: + variables: + - AWS_LC_CI_TARGET: + - "tests/ci/run_posix_tests.sh" + - "tests/ci/run_fips_tests.sh" + image: + - public.ecr.aws/docker/library/gcc:8 + - public.ecr.aws/docker/library/gcc:9 + - public.ecr.aws/docker/library/gcc:10 + - public.ecr.aws/docker/library/gcc:11 + - public.ecr.aws/docker/library/gcc:12 + - public.ecr.aws/docker/library/gcc:13 + build-list: - identifier: pre_push_checker buildspec: ./tests/ci/codebuild/linux-x86/pre-push.yml diff --git a/tests/ci/codebuild/common/run_simple_target_with_apt_dependencies.yml b/tests/ci/codebuild/common/run_simple_target_with_apt_dependencies.yml new file mode 100644 index 0000000000..3b40775776 --- /dev/null +++ b/tests/ci/codebuild/common/run_simple_target_with_apt_dependencies.yml @@ -0,0 +1,19 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 OR ISC + +version: 0.2 + +env: + variables: + GOPROXY: https://proxy.golang.org,direct + GOROOT: /usr/local/go + PATH: "$GOROOT/bin:$PATH" + +phases: + install: + commands: + - apt update && apt install "${AWS_LC_CI_DEPENDENCIES}" -y + - ./tests/ci/docker_images/dependencies/install_common_dependencies.sh + build: + commands: + - "./${AWS_LC_CI_TARGET}" diff --git a/tests/ci/docker_images/dependencies/install_common_dependencies.sh b/tests/ci/docker_images/dependencies/install_common_dependencies.sh index b9631933de..d8c4f16b2b 100755 --- a/tests/ci/docker_images/dependencies/install_common_dependencies.sh +++ b/tests/ci/docker_images/dependencies/install_common_dependencies.sh @@ -4,6 +4,7 @@ set -exo pipefail PLATFORM=$(uname -m) # Install golang +rm -rf "$GOROOT" mkdir "$GOROOT" GO_VERSION=1.20.1 if [[ "$PLATFORM" == *x86* ]]; then @@ -12,8 +13,7 @@ else GO_ARCHIVE="go${GO_VERSION}.linux-arm64.tar.gz" fi wget "https://dl.google.com/go/${GO_ARCHIVE}" -tar -xvf $GO_ARCHIVE -mv go/* "$GOROOT" +tar -C /usr/local -xzf "$GO_ARCHIVE" rm $GO_ARCHIVE # Common Go configuration go env -w GO111MODULE=on From 88ac6f17ddbe1d4fe86c732202ee361e0a0a64b9 Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Thu, 18 Apr 2024 15:34:51 -0700 Subject: [PATCH 2/6] Remove all of the build-list to try out the build-matrix --- .../github_ci_linux_x86_omnibus.yaml | 584 +----------------- 1 file changed, 1 insertion(+), 583 deletions(-) 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 9ad34e53c8..ee1815ec71 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 @@ -26,586 +26,4 @@ batch: - public.ecr.aws/docker/library/gcc:10 - public.ecr.aws/docker/library/gcc:11 - public.ecr.aws/docker/library/gcc:12 - - public.ecr.aws/docker/library/gcc:13 - - build-list: - - identifier: pre_push_checker - buildspec: ./tests/ci/codebuild/linux-x86/pre-push.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-20.04_clang-8x_latest - - - 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_posix_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_posix_tests.sh" - - - identifier: ubuntu1804_clang6x_x86_64_fips - 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_fips_tests.sh" - - - identifier: ubuntu1804_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:ubuntu-18.04_gcc-7x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: ubuntu1804_gcc7x_x86_64_fips - 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_gcc-7x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: ubuntu2004_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:ubuntu-20.04_gcc-7x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: ubuntu2004_gcc7x_x86_64_fips - 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-20.04_gcc-7x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: ubuntu2004_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:ubuntu-20.04_gcc-8x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: ubuntu2004_gcc8x_x86_64_fips - 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-20.04_gcc-8x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: amazonlinux2_gcc7x_intel_sde_x86_64 - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_2XLARGE - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:amazonlinux-2_gcc-7x_intel-sde_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_tests_with_sde.sh" - - - identifier: ubuntu2204_clang14x_sde_asan_x86_64 - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_2XLARGE - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-22.04_clang-14x-sde_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_tests_with_sde_asan.sh" - - - identifier: ubuntu2204_gcc11x_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-22.04_gcc-11x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: ubuntu2204_gcc11x_x86_64_fips - 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-22.04_gcc-11x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: ubuntu2204_gcc11x_x86_64_prefix - 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-22.04_gcc-11x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_prefix_tests.sh" - - - identifier: ubuntu2204_gcc12x_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-22.04_gcc-12x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: ubuntu2204_gcc12x_x86_64_fips - 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-22.04_gcc-12x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: ubuntu2004_clang7x_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-20.04_clang-7x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: ubuntu2004_clang7x_x86_64_fips - 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-20.04_clang-7x_latest - variables: - AWSLC_NO_ASM_FIPS: 1 - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: ubuntu2004_clang8x_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-20.04_clang-8x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: ubuntu2004_clang8x_x86_64_fips - 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-20.04_clang-8x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: ubuntu2004_clang9x_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-20.04_clang-9x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: ubuntu2004_clang9x_x86_64_fips - 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-20.04_clang-9x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: ubuntu2004_clang10x_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-20.04_clang-10x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: ubuntu2004_clang10x_x86_64_fips - 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-20.04_clang-10x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - 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_posix_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_posix_tests.sh" - - - identifier: centos7_gcc4x_x86_64_fips - 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_fips_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_posix_tests.sh" - - - identifier: centos8_gcc8x_x86_64_fips - 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_fips_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_posix_tests.sh" - - - identifier: amazonlinux2_gcc7x_x86_64_fips - 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_fips_tests.sh" - - - identifier: amazonlinux2_clang7x_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_clang-7x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: amazonlinux2_clang7x_x86_64_fips - 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_clang-7x_latest - variables: - # AL2 Clang-7 does not support AddressSanitizer. Related ticket is linked in CryptoAlg-694. - # https://github.com/aws/aws-lc/pull/120#issuecomment-808439279 - AWSLC_NO_ASM_FIPS: 0 - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: amazonlinux2_clang7x_x86_64_prefix - 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_clang-7x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_prefix_tests.sh" - - - identifier: amazonlinux2023_gcc11x_x86_64_valgrind - 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-2023_gcc-11x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_valgrind_tests.sh" - - - identifier: amazonlinux2023_gcc11x_x86_64_ssl_runner_valgrind - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_2XLARGE - 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_ssl_runner_valgrind_tests.sh" - - - identifier: amazonlinux2023_gcc11x_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-2023_gcc-11x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: amazonlinux2023_gcc11x_x86_64_fips - 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-2023_gcc-11x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: amazonlinux2023_clang15x_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-2023_clang-15x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_tests.sh" - - - identifier: amazonlinux2023_clang15x_x86_64_fips - 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-2023_clang-15x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_fips_tests.sh" - - - identifier: amazonlinux2023_clang15x_x86_64_sanitizer - 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-2023_clang-15x_sanitizer_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_posix_sanitizers.sh" - - - identifier: install_shared_and_static - 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-20.04_clang-9x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_install_shared_and_static.sh" - - - identifier: fedora31_clang9x_x86_64 - buildspec: ./tests/ci/codebuild/linux-x86/fedora-31_clang-9x.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:fedora-31_clang-9x_latest - - # We parallel the quick check proof scripts. - # Since each proof script takes around 7GB of memory, this results in a high demand for memory. - # Current benchmarks show running quick check using 8 processes can consume more than 55 GB of memory. - # Therefore, BUILD_GENERAL1_2XLARGE (72 vCPUs, 145 GB memory) is selected for quick check. - # SAW proofs on platform X86_64 - - identifier: ubuntu2004_clang10x_formal_verification_saw_x86_64 - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: false - compute-type: BUILD_GENERAL1_2XLARGE - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-20.04_clang-10x_formal-verification-saw-x86_64_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_formal_verification_saw_x86_64.sh" - - # SAW proofs on platform AArch64 - - identifier: ubuntu2004_clang10x_formal_verification_saw_aarch64 - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: false - compute-type: BUILD_GENERAL1_2XLARGE - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-20.04_clang-10x_formal-verification-saw-aarch64_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_formal_verification_saw_aarch64.sh" - - # NSym proofs on platform AArch64 - - identifier: ubuntu2204_clang14x_formal_verification_nsym_aarch64 - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: false - compute-type: BUILD_GENERAL1_2XLARGE - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-22.04_clang-14x_formal-verification-nsym-aarch64_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_formal_verification_nsym_aarch64.sh" - - # Build and test aws-lc without Perl/Go. - - identifier: amazonlinux2_gcc7x_x86_64_minimal - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_SMALL - 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_minimal_tests.sh" - - - identifier: centos7_gcc4x_x86_64_minimal - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_SMALL - 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_minimal_tests.sh" - - - identifier: ubuntu1604_gcc5x_x86_minimal - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_SMALL - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-16.04_gcc-5x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_minimal_tests.sh" - - - identifier: ubuntu2004_gcc7x_x86_64_minimal - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_SMALL - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-20.04_gcc-7x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_minimal_tests.sh" - - - identifier: ubuntu2004_gcc8x_x86_64_minimal - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_SMALL - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-20.04_gcc-8x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_minimal_tests.sh" - - - identifier: ubuntu1804_clang6x_x86_64_minimal - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_SMALL - 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_minimal_tests.sh" - - - identifier: ubuntu2004_clang8x_x86_64_minimal - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_SMALL - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-20.04_clang-8x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_minimal_tests.sh" - - - identifier: ubuntu2004_clang9x_x86_64_minimal - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_SMALL - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-20.04_clang-9x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_minimal_tests.sh" - - - identifier: ubuntu2004_clang7x_x86_64_benchmark - 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-22.04_clang-14x-sde_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_benchmark_build_tests.sh" - - - identifier: ubuntu1004_gcc4_1x_x86_64_build - buildspec: ./tests/ci/codebuild/common/run_simple_target.yml - env: - type: LINUX_CONTAINER - privileged-mode: true - compute-type: BUILD_GENERAL1_SMALL - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-10.04_gcc-4.1x_latest - variables: - AWS_LC_CI_TARGET: "tests/ci/run_legacy_build.sh" + - public.ecr.aws/docker/library/gcc:13 \ No newline at end of file From 20b4220e338c973e2954d7fce5501f923732de2b Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Thu, 18 Apr 2024 15:50:08 -0700 Subject: [PATCH 3/6] Fix yaml array syntax --- tests/ci/cdk/cdk/codebuild/github_ci_linux_x86_omnibus.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ee1815ec71..6e505c32f1 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 @@ -17,7 +17,7 @@ batch: dynamic: env: variables: - - AWS_LC_CI_TARGET: + AWS_LC_CI_TARGET: - "tests/ci/run_posix_tests.sh" - "tests/ci/run_fips_tests.sh" image: From 1b9c44d9dbcad183e81c4169b7654f70c4c22e9e Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Thu, 18 Apr 2024 16:05:18 -0700 Subject: [PATCH 4/6] Build spec must be specified in the dynamic section --- tests/ci/cdk/cdk/codebuild/github_ci_linux_x86_omnibus.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6e505c32f1..c0c66de492 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 @@ -7,7 +7,6 @@ version: 0.2 batch: build-matrix: static: - buildspec: ./tests/ci/codebuild/common/run_simple_target_with_apt_dependencies.yml env: type: LINUX_CONTAINER privileged-mode: false @@ -15,6 +14,7 @@ batch: variables: AWS_LC_CI_DEPENDENCIES: "cmake" dynamic: + buildspec: ./tests/ci/codebuild/common/run_simple_target_with_apt_dependencies.yml env: variables: AWS_LC_CI_TARGET: From 470d0d3341433f9f26a68f5e5210f0743c01ca87 Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Thu, 18 Apr 2024 21:22:07 -0700 Subject: [PATCH 5/6] Try putting all the commands into the same file --- .../codebuild/github_ci_linux_x86_omnibus.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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 c0c66de492..a7513c6f05 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 @@ -13,8 +13,10 @@ batch: compute-type: BUILD_GENERAL1_SMALL variables: AWS_LC_CI_DEPENDENCIES: "cmake" + GOPROXY: https://proxy.golang.org,direct + GOROOT: /usr/local/go + PATH: "$GOROOT/bin:$PATH" dynamic: - buildspec: ./tests/ci/codebuild/common/run_simple_target_with_apt_dependencies.yml env: variables: AWS_LC_CI_TARGET: @@ -26,4 +28,13 @@ batch: - public.ecr.aws/docker/library/gcc:10 - public.ecr.aws/docker/library/gcc:11 - public.ecr.aws/docker/library/gcc:12 - - public.ecr.aws/docker/library/gcc:13 \ No newline at end of file + - public.ecr.aws/docker/library/gcc:13 + +phases: + install: + commands: + - apt update && apt install "${AWS_LC_CI_DEPENDENCIES}" -y + - ./tests/ci/docker_images/dependencies/install_common_dependencies.sh + build: + commands: + - "./${AWS_LC_CI_TARGET}" From ae0d0a9842916582ec2bb27ede841b9031f3ca9f Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Thu, 18 Apr 2024 21:31:34 -0700 Subject: [PATCH 6/6] Move env variables out of static block which is not supported --- .../cdk/codebuild/github_ci_linux_x86_omnibus.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 a7513c6f05..902aafd7ca 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 @@ -4,6 +4,13 @@ version: 0.2 # Doc for batch https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch.build-list +env: + variables: + AWS_LC_CI_DEPENDENCIES: "cmake" + GOPROXY: https://proxy.golang.org,direct + GOROOT: /usr/local/go + PATH: "$GOROOT/bin:$PATH" + batch: build-matrix: static: @@ -11,11 +18,6 @@ batch: type: LINUX_CONTAINER privileged-mode: false compute-type: BUILD_GENERAL1_SMALL - variables: - AWS_LC_CI_DEPENDENCIES: "cmake" - GOPROXY: https://proxy.golang.org,direct - GOROOT: /usr/local/go - PATH: "$GOROOT/bin:$PATH" dynamic: env: variables: @@ -33,7 +35,7 @@ batch: phases: install: commands: - - apt update && apt install "${AWS_LC_CI_DEPENDENCIES}" -y + - "apt update && apt install ${AWS_LC_CI_DEPENDENCIES} -y" - ./tests/ci/docker_images/dependencies/install_common_dependencies.sh build: commands: