Skip to content

Commit

Permalink
Use CodeBuild batch matrix to test all major releases of GCC between …
Browse files Browse the repository at this point in the history
…8 and 13
  • Loading branch information
andrewhop committed Apr 18, 2024
1 parent b6daf74 commit 7f82bb9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
23 changes: 23 additions & 0 deletions tests/ci/cdk/cdk/codebuild/github_ci_linux_x86_omnibus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
dyanmic:
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
Expand Down
Original file line number Diff line number Diff line change
@@ -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}"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7f82bb9

Please sign in to comment.