From 50c8acfdf4072c7ed40101520516e4d73c148259 Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Fri, 6 Oct 2023 18:40:07 +0000 Subject: [PATCH 01/11] Add CI dimension for Windows SDE 32 and 64 bit --- CMakeLists.txt | 2 +- .../github_ci_windows_x86_omnibus.yaml | 36 ++++++++++++++-- ...ws-msvc2015.yml => run_windows_target.yml} | 3 +- .../windows-x86/windows-msvc2017.yml | 14 ------- .../docker_images/windows/vs2017/Dockerfile | 14 +++++++ .../windows/windows_base/Dockerfile | 3 ++ tests/ci/run_windows_tests.bat | 42 +++++++++++++++++-- 7 files changed, 91 insertions(+), 23 deletions(-) rename tests/ci/codebuild/windows-x86/{windows-msvc2015.yml => run_windows_target.yml} (53%) delete mode 100644 tests/ci/codebuild/windows-x86/windows-msvc2017.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 42e021bb55..d748f1b6d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1054,7 +1054,7 @@ if(BUILD_TESTING) add_custom_target( run_tests_valgrind COMMAND ${GO_EXECUTABLE} run util/all_tests.go -build-dir - ${PROJECT_BINARY_DIR} -valgrind=true -valgrind-supp-dir "tests/ci" + ${PROJECT_BINARY_DIR} -valgrind=true -valgrind-supp-dir="tests/ci" WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} DEPENDS all_tests ${MAYBE_USES_TERMINAL}) diff --git a/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml b/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml index c650eb8f76..71b92bcd41 100644 --- a/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml +++ b/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml @@ -7,7 +7,7 @@ version: 0.2 batch: build-list: - identifier: windows_msvc2015_x64 - buildspec: ./tests/ci/codebuild/windows-x86/windows-msvc2015.yml + buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml env: # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html type: WINDOWS_SERVER_2019_CONTAINER @@ -15,12 +15,42 @@ batch: compute-type: BUILD_GENERAL1_LARGE # Build failure on Docker image `vs2015_latest`, tracked in CryptoAlg-741. image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-windows-x86:vs2015_latest + variables: + MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat' + ARCH_OPTION: x64 - identifier: windows_msvc2017_x64 - buildspec: ./tests/ci/codebuild/windows-x86/windows-msvc2017.yml + buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + privileged-mode: false + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-windows-x86:vs2017_latest + variables: + # vcvarsall will set the required lib and libpath for MSVC to compile everything + MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' + ARCH_OPTION: x64 + + - identifier: windows_msvc2017_x64_sde + buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + privileged-mode: false + compute-type: BUILD_GENERAL1_LARGE + image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-windows-x86:vs2017_latest + variables: + MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' + ARCH_OPTION: x64 + RUN_SDE: true + + - identifier: windows_msvc2017_x32_sde + buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml env: - # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html type: WINDOWS_SERVER_2019_CONTAINER privileged-mode: false compute-type: BUILD_GENERAL1_LARGE image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-windows-x86:vs2017_latest + variables: + MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' + ARCH_OPTION: x86 + RUN_SDE: true diff --git a/tests/ci/codebuild/windows-x86/windows-msvc2015.yml b/tests/ci/codebuild/windows-x86/run_windows_target.yml similarity index 53% rename from tests/ci/codebuild/windows-x86/windows-msvc2015.yml rename to tests/ci/codebuild/windows-x86/run_windows_target.yml index 9f81bdb5b2..3ff3dafe8a 100644 --- a/tests/ci/codebuild/windows-x86/windows-msvc2015.yml +++ b/tests/ci/codebuild/windows-x86/run_windows_target.yml @@ -10,5 +10,4 @@ env: phases: build: commands: - # vcvarsall will set the required lib and libpath for MSVC to compile everything - - .\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" + - .\tests\ci\run_windows_tests.bat "${MSVC_PATH}" "${ARCH_OPTION}" "${RUN_SDE}" diff --git a/tests/ci/codebuild/windows-x86/windows-msvc2017.yml b/tests/ci/codebuild/windows-x86/windows-msvc2017.yml deleted file mode 100644 index 6a8bd4d284..0000000000 --- a/tests/ci/codebuild/windows-x86/windows-msvc2017.yml +++ /dev/null @@ -1,14 +0,0 @@ -# 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 - -phases: - build: - commands: - # vcvarsall will set the required lib and libpath for MSVC to compile everything - - .\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" diff --git a/tests/ci/docker_images/windows/vs2017/Dockerfile b/tests/ci/docker_images/windows/vs2017/Dockerfile index a2fa42b07e..21befce32d 100644 --- a/tests/ci/docker_images/windows/vs2017/Dockerfile +++ b/tests/ci/docker_images/windows/vs2017/Dockerfile @@ -6,6 +6,9 @@ # Keep parity with the upstream tags at https://hub.docker.com/_/microsoft-windows-servercore FROM aws-lc/windows_base:2019 +ENV SDE_VERSION_TAG=sde-external-9.21.1-2023-04-24-win +ENV SDE_MIRROR_URL="https://downloadmirror.intel.com/777395/sde-external-9.21.1-2023-04-24-win.tar.xz" + SHELL ["cmd", "/S", "/C"] RUN ` # Download the Build Tools bootstrapper. @@ -22,7 +25,18 @@ RUN ` # Cleanup && del /q vs_buildtools.exe +RUN ` + # Install Windows Intel SDE. + curl -SL --output temp.tar.xz %SDE_MIRROR_URL% ` + ` + && 7z x temp.tar.xz ` + && 7z x temp.tar ` + && ren %SDE_VERSION_TAG% windows-sde ` + && del temp.tar.xz ` + && del temp.tar RUN setx /M PATH "%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin" +RUN setx /M SDEROOT C:/windows-sde + CMD [ "cmd.exe" ] diff --git a/tests/ci/docker_images/windows/windows_base/Dockerfile b/tests/ci/docker_images/windows/windows_base/Dockerfile index 51c53fe85d..9395ae543c 100644 --- a/tests/ci/docker_images/windows/windows_base/Dockerfile +++ b/tests/ci/docker_images/windows/windows_base/Dockerfile @@ -9,10 +9,13 @@ ADD https://download.microsoft.com/download/6/A/A/6AA4EDFF-645B-48C5-81CC-ED5963 RUN start /wait C:\vc_redist.x64.exe /quiet /norestart # Install chocolatey +# https://stackoverflow.com/questions/76470752/chocolatey-installation-in-docker-started-to-fail-restart-due-to-net-framework +ENV chocolateyVersion=1.4.0 # https://chocolatey.org/docs/troubleshooting#the-request-was-aborted-could-not-create-ssltls-secure-channel RUN @powershell Set-ExecutionPolicy Bypass -Scope Process -Force; [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; $env:chocolateyUseWindowsCompression = 'true'; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) RUN choco install git --version 2.23.0 -y && ` +choco install 7zip.install -y && ` choco install ninja --version 1.9.0.20190208 -y && ` choco install strawberryperl --version 5.32.0.1 -y && ` choco install nasm --version 2.14.02 -y && ` diff --git a/tests/ci/run_windows_tests.bat b/tests/ci/run_windows_tests.bat index fdb9a59f4d..b8d08f8f67 100644 --- a/tests/ci/run_windows_tests.bat +++ b/tests/ci/run_windows_tests.bat @@ -3,11 +3,26 @@ set SRC_ROOT=%cd% set BUILD_DIR=%SRC_ROOT%\test_build_dir @rem %1 contains the path to the setup batch file for the version of of visual studio that was passed in from the build spec file. -@rem x64 comes from the architecture options https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line +@rem %2 specifies the architecture option to build against: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line +@rem %3 is to indicate running SDE simulation tests. If not set, SDE tests are not run. set MSVC_PATH=%1 -call %MSVC_PATH% x64 || goto error +set ARCH_OPTION=%2 +if "%~3"=="" ( set RUN_SDE=false ) else ( set RUN_SDE=%3 ) +call %MSVC_PATH% %ARCH_OPTION% || goto error SET +@echo on +if /i "%RUN_SDE%" == "false " ( + goto :run_basic_tests +) else if /i "%RUN_SDE%" == "true " ( + goto :run_sde_tests +) else ( + @rem Unrecognized option + goto error +) +goto :EOF + +:run_basic_tests @rem Run the same builds as run_posix_tests.sh @rem Check which version of MSVC we're building with: remove 14.0 from the path to the compiler and check if it matches the @rem original string. MSVC 14 has an issue with a missing DLL that causes the debug unit tests to fail @@ -23,8 +38,13 @@ call :build_and_test Release "-DBUILD_SHARED_LIBS=1" || goto error call :build_and_test Release "-DBUILD_SHARED_LIBS=1 -DFIPS=1" || goto error @rem For FIPS on Windows we also have a RelWithDebInfo build to generate debug symbols. call :build_and_test RelWithDebInfo "-DBUILD_SHARED_LIBS=1 -DFIPS=1" || goto error +exit /b 0 -goto :EOF +:run_sde_tests +@rem Run and test the same dimensions as our Linux SDE tests. +call :build_and_test_with_sde Debug "" || goto error +call :build_and_test_with_sde Release "" || goto error +exit /b 0 @rem %1 is the build type (e.g. Release/Debug) @rem %2 is the additional full CMake args @@ -34,6 +54,14 @@ call :build %1 %2 || goto error call :test %1 %2 || goto error exit /b 0 +@rem %1 is the build type (e.g. Release/Debug) +@rem %2 is the additional full CMake args +:build_and_test_with_sde +@echo on +call :build %1 %2 || goto error +call :test_with_sde %1 %2 || goto error +exit /b 0 + @rem Use the same parameters as build_and_test :build @echo on @@ -57,6 +85,14 @@ ninja run_tests || goto error @echo LOG: %date%-%time% %1 %2 tests complete exit /b %errorlevel% +@rem Runs the SDE simulator tests, this assumes the build is complete +:test_with_sde +@echo on +@echo LOG: %date%-%time% %1 %2 build finished, starting tests with SDE +ninja run_tests_with_sde || goto error +@echo LOG: %date%-%time% %1 %2 SDE tests complete +exit /b %errorlevel% + :error echo Failed with error #%errorlevel%. exit /b 1 From 80181ed3a5ea7e215e7fe939907321a3d56a54aa Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Tue, 10 Oct 2023 00:04:20 +0000 Subject: [PATCH 02/11] testing 64 core windows instance --- .github/workflows/windows-sde.yml | 66 +++++++++++++++++++ .../github_ci_windows_x86_omnibus.yaml | 44 ++++++------- 2 files changed, 88 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/windows-sde.yml diff --git a/.github/workflows/windows-sde.yml b/.github/workflows/windows-sde.yml new file mode 100644 index 0000000000..de2eeb685b --- /dev/null +++ b/.github/workflows/windows-sde.yml @@ -0,0 +1,66 @@ +name: Windows SDE Tests +on: + pull_request: + branches: [ '*' ] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + GOPROXY: https://proxy.golang.org,direct + SDE_MIRROR_URL: "https://downloadmirror.intel.com/777395/sde-external-9.21.1-2023-04-24-win.tar.xz" + SDE_VERSION_TAG: sde-external-9.21.1-2023-04-24-win + +jobs: + SDE-64-bit: + runs-on: temporary-performance-testing_windows-latest_64-core + steps: + - name: Git clone the repository + uses: actions/checkout@v3 + + - name: Build Windows Dependencies + run: | + choco install ninja --version 1.9.0.20190208 -y && + choco install nasm --version 2.14.02 -y + + - name: Install SDE simulator + run: | + curl -SL --output temp.tar.xz ${{ env.SDE_MIRROR_URL }} + 7z x temp.tar.xz + 7z x temp.tar + ren ${{ env.SDE_VERSION_TAG }} windows-sde + del temp.tar.xz + del temp.tar + + - name: Run Windows SDE Tests for 64 bit + run: | + $env:SDEROOT = "${PWD}\windows-sde" + echo ${env:SDEROOT} + .\tests\ci\run_windows_tests.bat "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 true + + SDE-32-bit: + runs-on: temporary-performance-testing_windows-latest_64-core + steps: + - name: Git clone the repository + uses: actions/checkout@v3 + + - name: Build Windows Dependencies + run: | + choco install ninja --version 1.9.0.20190208 -y && + choco install nasm --version 2.14.02 -y + + - name: Install SDE simulator + run: | + curl -SL --output temp.tar.xz ${{ env.SDE_MIRROR_URL }} + 7z x temp.tar.xz + 7z x temp.tar + ren ${{ env.SDE_VERSION_TAG }} windows-sde + del temp.tar.xz + del temp.tar + + - name: Run Windows SDE Tests for 32 bit + run: | + $env:SDEROOT = "${PWD}\windows-sde" + echo ${env:SDEROOT} + .\tests\ci\run_windows_tests.bat "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 true diff --git a/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml b/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml index 71b92bcd41..61a003b3fc 100644 --- a/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml +++ b/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml @@ -31,26 +31,26 @@ batch: MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' ARCH_OPTION: x64 - - identifier: windows_msvc2017_x64_sde - buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml - env: - type: WINDOWS_SERVER_2019_CONTAINER - privileged-mode: false - compute-type: BUILD_GENERAL1_LARGE - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-windows-x86:vs2017_latest - variables: - MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' - ARCH_OPTION: x64 - RUN_SDE: true + # - identifier: windows_msvc2017_x64_sde + # buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml + # env: + # type: WINDOWS_SERVER_2019_CONTAINER + # privileged-mode: false + # compute-type: BUILD_GENERAL1_LARGE + # image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-windows-x86:vs2017_latest + # variables: + # MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' + # ARCH_OPTION: x64 + # RUN_SDE: true - - identifier: windows_msvc2017_x32_sde - buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml - env: - type: WINDOWS_SERVER_2019_CONTAINER - privileged-mode: false - compute-type: BUILD_GENERAL1_LARGE - image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-windows-x86:vs2017_latest - variables: - MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' - ARCH_OPTION: x86 - RUN_SDE: true + # - identifier: windows_msvc2017_x32_sde + # buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml + # env: + # type: WINDOWS_SERVER_2019_CONTAINER + # privileged-mode: false + # compute-type: BUILD_GENERAL1_LARGE + # image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-windows-x86:vs2017_latest + # variables: + # MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' + # ARCH_OPTION: x86 + # RUN_SDE: true From dc41fa06e2edcd55a0bf8e5feb9d69f0dbcb6f6c Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Wed, 11 Oct 2023 23:30:46 +0000 Subject: [PATCH 03/11] try 32 core --- .github/workflows/windows-sde.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-sde.yml b/.github/workflows/windows-sde.yml index de2eeb685b..f1b81bec8c 100644 --- a/.github/workflows/windows-sde.yml +++ b/.github/workflows/windows-sde.yml @@ -14,7 +14,7 @@ env: jobs: SDE-64-bit: - runs-on: temporary-performance-testing_windows-latest_64-core + runs-on: temporary-performance-testing_windows-latest_32-core steps: - name: Git clone the repository uses: actions/checkout@v3 @@ -40,7 +40,7 @@ jobs: .\tests\ci\run_windows_tests.bat "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 true SDE-32-bit: - runs-on: temporary-performance-testing_windows-latest_64-core + runs-on: temporary-performance-testing_windows-latest_32-core steps: - name: Git clone the repository uses: actions/checkout@v3 From f8924a856a5770f1099bc4d4ce10bc2ca57974de Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Thu, 12 Oct 2023 18:11:25 +0000 Subject: [PATCH 04/11] test windows 2019 32 core --- .github/workflows/windows-sde.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows-sde.yml b/.github/workflows/windows-sde.yml index f1b81bec8c..513d4c5dd6 100644 --- a/.github/workflows/windows-sde.yml +++ b/.github/workflows/windows-sde.yml @@ -14,7 +14,10 @@ env: jobs: SDE-64-bit: - runs-on: temporary-performance-testing_windows-latest_32-core + # We have to run against windows-2019 due to an assembly intruction bug in MSVC2022's msvcrt.dll. + # The dll library tries to call vinsertf128 with memset, but this isn't available when testing + # against older processors with SDE. + runs-on: temporary-performance-testing_windows-2019_32-core steps: - name: Git clone the repository uses: actions/checkout@v3 @@ -37,10 +40,10 @@ jobs: run: | $env:SDEROOT = "${PWD}\windows-sde" echo ${env:SDEROOT} - .\tests\ci\run_windows_tests.bat "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 true + .\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 true SDE-32-bit: - runs-on: temporary-performance-testing_windows-latest_32-core + runs-on: temporary-performance-testing_windows-2019_32-core steps: - name: Git clone the repository uses: actions/checkout@v3 @@ -63,4 +66,5 @@ jobs: run: | $env:SDEROOT = "${PWD}\windows-sde" echo ${env:SDEROOT} - .\tests\ci\run_windows_tests.bat "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 true + .\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 true + From e638a5a240388dba3bb65400d1621829881016f5 Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Thu, 12 Oct 2023 18:51:00 +0000 Subject: [PATCH 05/11] test skipping tests that aren't vital to sde --- util/all_tests.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util/all_tests.json b/util/all_tests.json index 723501dfa2..6453be74bc 100644 --- a/util/all_tests.json +++ b/util/all_tests.json @@ -96,14 +96,17 @@ "cmd": ["ssl/ssl_test"] }, { - "cmd": ["crypto/mem_test"] + "cmd": ["crypto/mem_test"], + "skip_sde": true }, { - "cmd": ["crypto/mem_set_test"] + "cmd": ["crypto/mem_set_test"], + "skip_sde": true }, { "cmd": [ "crypto/dynamic_loading_test" - ] + ], + "skip_sde": true } ] From 52f62bb4169fa1987428a70271a7c06978384fa6 Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Thu, 12 Oct 2023 23:35:13 +0000 Subject: [PATCH 06/11] test 64 core instances --- .github/workflows/windows-sde.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-sde.yml b/.github/workflows/windows-sde.yml index 513d4c5dd6..f9b0b0a47c 100644 --- a/.github/workflows/windows-sde.yml +++ b/.github/workflows/windows-sde.yml @@ -17,7 +17,7 @@ jobs: # We have to run against windows-2019 due to an assembly intruction bug in MSVC2022's msvcrt.dll. # The dll library tries to call vinsertf128 with memset, but this isn't available when testing # against older processors with SDE. - runs-on: temporary-performance-testing_windows-2019_32-core + runs-on: temporary-performance-testing_windows-2019_64-core steps: - name: Git clone the repository uses: actions/checkout@v3 @@ -43,7 +43,7 @@ jobs: .\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 true SDE-32-bit: - runs-on: temporary-performance-testing_windows-2019_32-core + runs-on: temporary-performance-testing_windows-2019_64-core steps: - name: Git clone the repository uses: actions/checkout@v3 From 3e0542f680211fda06e4c13d5e1c5231d7e83290 Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Fri, 13 Oct 2023 17:24:26 +0000 Subject: [PATCH 07/11] extend more windows CI and skip known debug failure --- .../{windows-sde.yml => windows.yml} | 28 ++++++++++++++++++- crypto/impl_dispatch_test.cc | 4 +++ .../github_ci_windows_x86_omnibus.yaml | 24 ---------------- 3 files changed, 31 insertions(+), 25 deletions(-) rename .github/workflows/{windows-sde.yml => windows.yml} (70%) diff --git a/.github/workflows/windows-sde.yml b/.github/workflows/windows.yml similarity index 70% rename from .github/workflows/windows-sde.yml rename to .github/workflows/windows.yml index f9b0b0a47c..3d8734c3a7 100644 --- a/.github/workflows/windows-sde.yml +++ b/.github/workflows/windows.yml @@ -1,4 +1,4 @@ -name: Windows SDE Tests +name: Windows Tests on: pull_request: branches: [ '*' ] @@ -13,6 +13,32 @@ env: SDE_VERSION_TAG: sde-external-9.21.1-2023-04-24-win jobs: + MSVC-2019: + runs-on: windows-2019 + steps: + - name: Git clone the repository + uses: actions/checkout@v3 + - name: Build Windows Dependencies + run: | + choco install ninja --version 1.9.0.20190208 -y && + choco install nasm --version 2.14.02 -y + - name: Run Windows Tests on MSVC-2019 + run: | + .\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 + + MSVC-2022: + runs-on: windows-2022 + steps: + - name: Git clone the repository + uses: actions/checkout@v3 + - name: Build Windows Dependencies + run: | + choco install ninja --version 1.9.0.20190208 -y && + choco install nasm --version 2.14.02 -y + - name: Run Windows Tests on MSVC-2022 + run: | + .\tests\ci\run_windows_tests.bat "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + SDE-64-bit: # We have to run against windows-2019 due to an assembly intruction bug in MSVC2022's msvcrt.dll. # The dll library tries to call vinsertf128 with memset, but this isn't available when testing diff --git a/crypto/impl_dispatch_test.cc b/crypto/impl_dispatch_test.cc index 0d6fc893a4..f78c3aa667 100644 --- a/crypto/impl_dispatch_test.cc +++ b/crypto/impl_dispatch_test.cc @@ -209,6 +209,9 @@ TEST_F(ImplDispatchTest, AES_single_block) { }); } +// TODO(CryptoAlg-2137): Fix SHA256 dispatch test failure on newer 32-bit Intel +// processors that happens only on Debug Builds. +#if !(defined(OPENSSL_WINDOWS) && defined(OPENSSL_X86) && !defined(NDEBUG)) TEST_F(ImplDispatchTest, SHA256) { AssertFunctionsHit( { @@ -220,6 +223,7 @@ TEST_F(ImplDispatchTest, SHA256) { SHA256(in, 32, out); }); } +#endif // !(defined(OPENSSL_WINDOWS) && defined(OPENSSL_X86)) #ifdef OPENSSL_AARCH64 TEST_F(ImplDispatchTest, SHA512) { diff --git a/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml b/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml index 61a003b3fc..4d45117966 100644 --- a/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml +++ b/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml @@ -30,27 +30,3 @@ batch: # vcvarsall will set the required lib and libpath for MSVC to compile everything MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' ARCH_OPTION: x64 - - # - identifier: windows_msvc2017_x64_sde - # buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml - # env: - # type: WINDOWS_SERVER_2019_CONTAINER - # privileged-mode: false - # compute-type: BUILD_GENERAL1_LARGE - # image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-windows-x86:vs2017_latest - # variables: - # MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' - # ARCH_OPTION: x64 - # RUN_SDE: true - - # - identifier: windows_msvc2017_x32_sde - # buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml - # env: - # type: WINDOWS_SERVER_2019_CONTAINER - # privileged-mode: false - # compute-type: BUILD_GENERAL1_LARGE - # image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-windows-x86:vs2017_latest - # variables: - # MSVC_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' - # ARCH_OPTION: x86 - # RUN_SDE: true From 467aa8c2789028e2aaefadb9e8738113290f0c5c Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Fri, 13 Oct 2023 18:43:11 +0000 Subject: [PATCH 08/11] upgrade to larger instance for msvc2019/2022 CI --- .github/workflows/windows.yml | 6 +++--- crypto/impl_dispatch_test.cc | 2 +- .../ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml | 4 ++-- .../{windows-x86 => windows}/run_windows_target.yml | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename tests/ci/codebuild/{windows-x86 => windows}/run_windows_target.yml (100%) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3d8734c3a7..d28130afa2 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -4,7 +4,7 @@ on: branches: [ '*' ] concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} cancel-in-progress: true env: @@ -14,7 +14,7 @@ env: jobs: MSVC-2019: - runs-on: windows-2019 + runs-on: temporary-performance-testing_windows-2019_8-core steps: - name: Git clone the repository uses: actions/checkout@v3 @@ -27,7 +27,7 @@ jobs: .\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 MSVC-2022: - runs-on: windows-2022 + runs-on: temporary-performance-testing_windows-latest_8-core steps: - name: Git clone the repository uses: actions/checkout@v3 diff --git a/crypto/impl_dispatch_test.cc b/crypto/impl_dispatch_test.cc index f78c3aa667..cb0f7850e7 100644 --- a/crypto/impl_dispatch_test.cc +++ b/crypto/impl_dispatch_test.cc @@ -210,7 +210,7 @@ TEST_F(ImplDispatchTest, AES_single_block) { } // TODO(CryptoAlg-2137): Fix SHA256 dispatch test failure on newer 32-bit Intel -// processors that happens only on Debug Builds. +// processors that happens only on Windows Debug Builds. #if !(defined(OPENSSL_WINDOWS) && defined(OPENSSL_X86) && !defined(NDEBUG)) TEST_F(ImplDispatchTest, SHA256) { AssertFunctionsHit( diff --git a/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml b/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml index 4d45117966..8ad4d38d5f 100644 --- a/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml +++ b/tests/ci/cdk/cdk/codebuild/github_ci_windows_x86_omnibus.yaml @@ -7,7 +7,7 @@ version: 0.2 batch: build-list: - identifier: windows_msvc2015_x64 - buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml + buildspec: ./tests/ci/codebuild/windows/run_windows_target.yml env: # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html type: WINDOWS_SERVER_2019_CONTAINER @@ -20,7 +20,7 @@ batch: ARCH_OPTION: x64 - identifier: windows_msvc2017_x64 - buildspec: ./tests/ci/codebuild/windows-x86/run_windows_target.yml + buildspec: ./tests/ci/codebuild/windows/run_windows_target.yml env: type: WINDOWS_SERVER_2019_CONTAINER privileged-mode: false diff --git a/tests/ci/codebuild/windows-x86/run_windows_target.yml b/tests/ci/codebuild/windows/run_windows_target.yml similarity index 100% rename from tests/ci/codebuild/windows-x86/run_windows_target.yml rename to tests/ci/codebuild/windows/run_windows_target.yml From ff5fee68c6a0fb32718e1e840d585439dba0806f Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Tue, 17 Oct 2023 19:56:28 +0000 Subject: [PATCH 09/11] change expectations instead of skipping test --- crypto/impl_dispatch_test.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/crypto/impl_dispatch_test.cc b/crypto/impl_dispatch_test.cc index cb0f7850e7..e7f83ea4fd 100644 --- a/crypto/impl_dispatch_test.cc +++ b/crypto/impl_dispatch_test.cc @@ -39,7 +39,15 @@ class ImplDispatchTest : public ::testing::Test { aes_hw_ = CRYPTO_is_AESNI_capable(); avx_movbe_ = CRYPTO_is_AVX_capable() && CRYPTO_is_MOVBE_capable(); aes_vpaes_ = CRYPTO_is_SSSE3_capable(); - sha_ext_ = CRYPTO_is_SHAEXT_capable(); + sha_ext_ = +// TODO(CryptoAlg-2137): sha_ext_ isn't enabled on Windows Debug Builds with newer +// 32-bit Intel processors. +#if !(defined(OPENSSL_WINDOWS) && defined(OPENSSL_X86) && !defined(NDEBUG)) + CRYPTO_is_SHAEXT_capable(); +#else + false; +#endif + vaes_vpclmulqdq_ = #if !defined(OPENSSL_WINDOWS) // crypto_gcm_avx512_enabled excludes Windows @@ -209,9 +217,6 @@ TEST_F(ImplDispatchTest, AES_single_block) { }); } -// TODO(CryptoAlg-2137): Fix SHA256 dispatch test failure on newer 32-bit Intel -// processors that happens only on Windows Debug Builds. -#if !(defined(OPENSSL_WINDOWS) && defined(OPENSSL_X86) && !defined(NDEBUG)) TEST_F(ImplDispatchTest, SHA256) { AssertFunctionsHit( { @@ -223,7 +228,6 @@ TEST_F(ImplDispatchTest, SHA256) { SHA256(in, 32, out); }); } -#endif // !(defined(OPENSSL_WINDOWS) && defined(OPENSSL_X86)) #ifdef OPENSSL_AARCH64 TEST_F(ImplDispatchTest, SHA512) { From d953cb09dcb3050b0af725b1f7a61c17e4542a48 Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Wed, 18 Oct 2023 02:20:45 +0000 Subject: [PATCH 10/11] see how long no skipping takes --- util/all_tests.json | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/util/all_tests.json b/util/all_tests.json index 6453be74bc..723501dfa2 100644 --- a/util/all_tests.json +++ b/util/all_tests.json @@ -96,17 +96,14 @@ "cmd": ["ssl/ssl_test"] }, { - "cmd": ["crypto/mem_test"], - "skip_sde": true + "cmd": ["crypto/mem_test"] }, { - "cmd": ["crypto/mem_set_test"], - "skip_sde": true + "cmd": ["crypto/mem_set_test"] }, { "cmd": [ "crypto/dynamic_loading_test" - ], - "skip_sde": true + ] } ] From 41e00853c824d43bab367d4e744dc72ebb7a0f0f Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Fri, 20 Oct 2023 20:07:59 +0000 Subject: [PATCH 11/11] change wording of yml file --- .github/workflows/windows.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d28130afa2..706a331890 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -40,9 +40,8 @@ jobs: .\tests\ci\run_windows_tests.bat "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 SDE-64-bit: - # We have to run against windows-2019 due to an assembly intruction bug in MSVC2022's msvcrt.dll. - # The dll library tries to call vinsertf128 with memset, but this isn't available when testing - # against older processors with SDE. + # TODO: Update this to run on windows-2022. windows-2022 (Windows 11) has phased out support for older processors. + # https://learn.microsoft.com/en-us/windows-hardware/design/minimum/supported/windows-11-supported-intel-processors runs-on: temporary-performance-testing_windows-2019_64-core steps: - name: Git clone the repository