Skip to content

Commit 984e2b1

Browse files
authored
Add CI dimensions for legacy AVX512 flags (#2732)
### Issues: `P299607876` ### Description of changes: We were previously only running the build, but not tests when options MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX or MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX were enabled. This PR moves this testing to its own dimension and enables running the tests. Instead of the "run_tests" target, when GO is disabled, "run_tests_minimal" is produced. Refactors to support this. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
1 parent 71144f0 commit 984e2b1

File tree

3 files changed

+63
-14
lines changed

3 files changed

+63
-14
lines changed

.github/workflows/linux_x86_omnibus.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,3 +465,41 @@ jobs:
465465
with:
466466
image: ${{ steps.ecr.outputs.AWS_ECR_REPO_LINUX_X86 }}:${{ matrix.image }}
467467
run: ./tests/ci/run_fips_callback_tests.sh
468+
469+
legacy_avx_tests:
470+
name: legacy-avx-${{ matrix.image }}-${{ matrix.build32 && 'x86' || 'x86_64' }}
471+
runs-on:
472+
- codebuild-aws-lc-ci-github-actions-${{ github.run_id }}-${{ github.run_attempt }}
473+
image:linux-5.0
474+
instance-size:large
475+
buildspec-override:true
476+
strategy:
477+
fail-fast: false
478+
matrix:
479+
image:
480+
- centos-7_gcc-4x_latest
481+
- centos-8_gcc-8x_latest
482+
- amazonlinux-2_gcc-7x_latest
483+
- ubuntu-16.04_gcc-5x_latest
484+
- ubuntu-18.04_clang-6x_latest
485+
build32: [0]
486+
include:
487+
- image: centos-7_gcc-4x_latest
488+
build32: 1
489+
- image: ubuntu-16.04_gcc-5x_latest
490+
build32: 1
491+
steps:
492+
- uses: actions/checkout@v5
493+
- name: Get ECR Repository URL
494+
id: ecr
495+
run: echo AWS_ECR_REPO_LINUX_X86=${AWS_ECR_REPO_LINUX_X86} >> "$GITHUB_OUTPUT"
496+
- uses: ./.github/actions/codebuild-docker-run
497+
name: Run Container (${{ matrix.image }})
498+
env:
499+
AWSLC_32BIT: ${{ matrix.build32 || 0 }}
500+
with:
501+
image: ${{ steps.ecr.outputs.AWS_ECR_REPO_LINUX_X86 }}:${{ matrix.image }}
502+
env: |
503+
AWSLC_32BIT
504+
run: ./tests/ci/run_legacy_avx_tests.sh
505+
options: --privileged

tests/ci/run_legacy_avx_tests.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
# SPDX-License-Identifier: Apache-2.0 OR ISC
4+
5+
set -exo pipefail
6+
7+
source tests/ci/common_posix_setup.sh
8+
9+
# Lightly verify that uncommon build options does not break the build. First
10+
# define a list of typical build options to verify the special build option with
11+
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")
12+
13+
## Build option: MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX
14+
for build_option in "${build_options_to_test[@]}"; do
15+
build_and_test ${build_option} -DMY_ASSEMBLER_IS_TOO_OLD_FOR_AVX=ON
16+
done
17+
18+
## Build option: MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX
19+
for build_option in "${build_options_to_test[@]}"; do
20+
build_and_test ${build_option} -DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON
21+
done
22+
23+
# When Go is disabled, a different test target is produced
24+
build_and_run_minimal_test -DDISABLE_PERL=ON -DDISABLE_GO=ON -DMY_ASSEMBLER_IS_TOO_OLD_FOR_AVX=ON
25+
build_and_run_minimal_test -DDISABLE_PERL=ON -DDISABLE_GO=ON -DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON

tests/ci/run_posix_tests.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,3 @@ build_and_test -DDISABLE_PERL=ON
3636

3737
echo "Testing building with AArch64 Data-Independent Timing (DIT) on."
3838
build_and_test -DENABLE_DATA_INDEPENDENT_TIMING=ON -DCMAKE_BUILD_TYPE=Release
39-
40-
# Lightly verify that uncommon build options does not break the build. Fist
41-
# define a list of typical build options to verify the special build option with
42-
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")
43-
44-
## Build option: MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX
45-
for build_option in "${build_options_to_test[@]}"; do
46-
run_build ${build_option} -DMY_ASSEMBLER_IS_TOO_OLD_FOR_AVX=ON
47-
done
48-
49-
## Build option: MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX
50-
for build_option in "${build_options_to_test[@]}"; do
51-
run_build ${build_option} -DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON
52-
done

0 commit comments

Comments
 (0)