Skip to content

Commit

Permalink
PR comments; script and check optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel40791765 committed Dec 12, 2024
1 parent b65fa5a commit 938d980
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}
12 changes: 8 additions & 4 deletions tests/ci/integration/run_ruby_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand All @@ -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"

Expand Down Expand Up @@ -71,15 +77,13 @@ 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
ruby_patch ${branch}
ruby_build ${branch}
done

popd

0 comments on commit 938d980

Please sign in to comment.