From 938d980e706a5bfe7c9ec8e16752cb228d547266 Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Thu, 12 Dec 2024 01:22:07 +0000 Subject: [PATCH] PR comments; script and check optimizations --- .github/workflows/integrations.yml | 11 ++++++++++- tests/ci/integration/run_ruby_integration.sh | 12 ++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integrations.yml b/.github/workflows/integrations.yml index c258986b5c..66ad8a2347 100644 --- a/.github/workflows/integrations.yml +++ b/.github/workflows/integrations.yml @@ -259,7 +259,14 @@ jobs: ./tests/ci/integration/run_accp_integration.sh ruby-releases: if: github.repository_owner == 'aws' + strategy: + fail-fast: false + matrix: + fips: + - "0" + - "1" runs-on: ubuntu-latest + name: Ruby releases (FIPS=${{ matrix.fips}}) steps: - name: Install OS Dependencies run: | @@ -268,4 +275,6 @@ jobs: - uses: actions/checkout@v3 - name: Build AWS-LC, build ruby, run tests run: | - ./tests/ci/integration/run_ruby_integration.sh ruby_3_1 ruby_3_2 + ./tests/ci/integration/run_ruby_integration.sh ruby_3_2 ruby_3_1 + env: + FIPS: ${{ matrix.fips }} diff --git a/tests/ci/integration/run_ruby_integration.sh b/tests/ci/integration/run_ruby_integration.sh index 4cbd18b033..9727e6a701 100755 --- a/tests/ci/integration/run_ruby_integration.sh +++ b/tests/ci/integration/run_ruby_integration.sh @@ -8,6 +8,9 @@ set -exuo pipefail # Set up environment. +# Default env parameters to "off" +FIPS=${FIPS:-"0"} + # SYS_ROOT # - SRC_ROOT(aws-lc) # - SCRATCH_FOLDER @@ -27,7 +30,7 @@ AWS_LC_INSTALL_FOLDER="${SCRATCH_FOLDER}/aws-lc-install" function ruby_build() { local branch=${1} - pushd ${branch} + pushd "${RUBY_SRC_FOLDER}/${branch}" ./autogen.sh mkdir -p install ./configure --disable-install-doc \ @@ -38,6 +41,9 @@ function ruby_build() { # Check that AWS-LC was used. ./install/bin/ruby -e 'require "openssl"; puts OpenSSL::OPENSSL_VERSION' | grep -q "AWS-LC" && echo "AWS-LC found!" || exit 1 + ldd "$(find "$PWD/install" -name "openssl.so")" | grep "${AWS_LC_INSTALL_FOLDER}/lib/libcrypto.so" || exit 1 + ldd "$(find "$PWD/install" -name "openssl.so")" | grep "${AWS_LC_INSTALL_FOLDER}/lib/libssl.so" || exit 1 + #TODO: add more relevant tests here make test-all TESTS="test/openssl/*.rb" @@ -71,10 +77,9 @@ rm -rf ${SCRATCH_FOLDER}/* cd ${SCRATCH_FOLDER} mkdir -p ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} -aws_lc_build ${SRC_ROOT} ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} -DBUILD_TESTING=OFF -DFIPS=1 +aws_lc_build ${SRC_ROOT} ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} -DBUILD_TESTING=OFF -DFIPS=${FIPS} -DBUILD_SHARED_LIBS=1 mkdir -p ${RUBY_SRC_FOLDER} -pushd ${RUBY_SRC_FOLDER} # NOTE: As we add more versions to support, we may want to parallelize here for branch in "$@"; do @@ -82,4 +87,3 @@ for branch in "$@"; do ruby_build ${branch} done -popd