Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge changes from main up to 28f56fd906da320c54d28582d4ff57616e30ff80 #2207

Open
wants to merge 8 commits into
base: randomness_generation
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 6 additions & 2 deletions .github/docker_images/gcc-4.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0 OR ISC

FROM gcc:4.8
FROM gcc:4.8.5

VOLUME ["/awslc"]

Expand All @@ -14,7 +14,11 @@ RUN curl -LOk "https://github.com/Kitware/CMake/releases/download/v3.6.3/cmake-3
RUN sha256sum cmake-3.6.3-Linux-x86_64.tar.gz | grep -q "9d915d505c07d84b610e1be6242c7cad68b4b7a4090ce85ecf9cec5effa47c43"
RUN tar -C /usr/local -xzf cmake-3.6.3-Linux-x86_64.tar.gz
RUN rm cmake-3.6.3-Linux-x86_64.tar.gz
RUN curl -LOk "https://go.dev/dl/go1.18.10.linux-amd64.tar.gz"
RUN sha256sum go1.18.10.linux-amd64.tar.gz | grep -q "5e05400e4c79ef5394424c0eff5b9141cb782da25f64f79d54c98af0a37f8d49"
RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.10.linux-amd64.tar.gz
RUN rm go1.18.10.linux-amd64.tar.gz

ENV PATH="${PATH}:/usr/local/cmake-3.6.3-Linux-x86_64/bin"
ENV PATH="${PATH}:/usr/local/cmake-3.6.3-Linux-x86_64/bin:/usr/local/go/bin"

ENTRYPOINT ["/entry.sh"]
4 changes: 2 additions & 2 deletions .github/docker_images/gcc-4.8/awslc_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SRC_DIR="${SRC_DIR:-/awslc}"

pushd "${BUILD_DIR}"

cmake "${SRC_DIR}" "-DDISABLE_GO=ON" "-DDISABLE_PERL=ON" "-DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=1"
make -j 4 ssl
cmake "${SRC_DIR}" "-DDISABLE_PERL=ON" "-DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=1"
cmake --build "${BUILD_DIR}" --target run_tests

popd # ${BUILD_DIR}
78 changes: 59 additions & 19 deletions .github/workflows/actions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
os:
- "macos-14-large"
- "macos-13-large"
- "macos-12-large"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
Expand All @@ -59,7 +58,6 @@ jobs:
os:
- "macos-14-large"
- "macos-13-large"
- "macos-12-large"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
Expand Down Expand Up @@ -281,18 +279,23 @@ jobs:
- name: Build SSL
run: cmake --build ./build --target ssl

clang-18-pedantic:
clang-19-pedantic:
if: github.repository_owner == 'aws'
needs: [ sanity-test-run ]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: Install clang-19
run: |
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 19
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: clang-18
cxx-compiler: clang++-18
c-compiler: clang-19
cxx-compiler: clang++-19
options: CMAKE_BUILD_TYPE=Release CMAKE_C_FLAGS=-pedantic CMAKE_CXX_FLAGS=-pedantic
- name: Build Crypto
run: cmake --build ./build --target crypto
Expand Down Expand Up @@ -392,27 +395,61 @@ jobs:
- name: Run tests
run: cmake --build ./build --target run_tests

OpenBSD-x86-64:
clang-19-sanity:
if: github.repository_owner == 'aws'
needs: [ sanity-test-run ]
strategy:
fail-fast: false
matrix:
fips:
- "0"
- "1"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Install clang-19
run: |
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 19
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: clang-19
cxx-compiler: clang++-19
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
- name: Build Project
run: cmake --build ./build --target all
- name: Run tests
run: cmake --build ./build --target run_tests

OpenBSD:
needs: [sanity-test-run]
runs-on: ubuntu-latest
name: OpenBSD ${{ matrix.version }} (${{ matrix.arch }}) test
strategy:
fail-fast: false
matrix:
args: ["", "-f"]
version: ["7.4", "7.5"]
arch: ["x86-64", "arm64"]
version: ["7.5", "7.6"]
steps:
- uses: actions/checkout@v3
- name: OpenBSD
uses: cross-platform-actions/action@v0.24.0
uses: cross-platform-actions/action@595d543e5d1aeb6d48c0a176965028afe56c7018
env:
AWS_LC_SSL_TEST_RUNNER_PEEK_ROUNDS: 5
AWS_LC_GO_TEST_TIMEOUT: 120m
with:
environment_variables: AWS_LC_SSL_TEST_RUNNER_PEEK_ROUNDS AWS_LC_GO_TEST_TIMEOUT
operating_system: openbsd
cpu_count: 4
memory: 16G
architecture: x86-64
version: '7.4'
cpu_count: 3
memory: 12G
architecture: ${{ matrix.arch }}
version: "${{ matrix.version }}"
shell: bash
run: |
set -x
Expand Down Expand Up @@ -445,7 +482,7 @@ jobs:
cd $(pwd)
export PATH="${HOME}/bin:${PATH}"
env
tests/ci/run_bsd_tests.sh ${{ matrix.args }}
tests/ci/run_bsd_tests.sh
EOF
gcc-4_8:
needs: [sanity-test-run]
Expand Down Expand Up @@ -517,14 +554,17 @@ jobs:
# echo ${env:SDEROOT}
# .\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 true
#
freebsd-13:
freebsd:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
name: FreeBSD ${{ matrix.version }} test
name: FreeBSD ${{ matrix.version }} (${{ matrix.arch }}) test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch:
- 'x86-64'
- 'arm64'
version:
- '13.3'
- '14.1'
Expand All @@ -541,11 +581,11 @@ jobs:
with:
environment_variables: 'AWS_LC_SSL_TEST_RUNNER_PEEK_ROUNDS AWS_LC_GO_TEST_TIMEOUT GOFLAGS'
operating_system: freebsd
architecture: x86-64
architecture: ${{ matrix.arch }}
version: ${{ matrix.version }}
shell: bash
memory: 16G
cpu_count: 4
memory: 12G
cpu_count: 3
run: |
sudo pkg install -y git gmake cmake go ninja
tests/ci/run_bsd_tests.sh
137 changes: 95 additions & 42 deletions .github/workflows/aws-lc-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,120 @@ concurrency:
env:
GOPROXY: https://proxy.golang.org,direct
AWS_LC_SYS_CMAKE_BUILDER: 1
RUST_NIGHTLY_TOOLCHAIN: nightly-2024-05-22
RUST_NIGHTLY_TOOLCHAIN: nightly
RUST_SCRIPT_NIGHTLY_TOOLCHAIN: nightly
jobs:
standard:
aws-lc-rs-bindgen:
if: github.repository_owner == 'aws'
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
name: aws-lc-rs bindgen on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-14-xlarge ]
steps:
- uses: actions/checkout@v3
with:
repository: awslabs/aws-lc-rs
repository: aws/aws-lc-rs
path: ./aws-lc-rs
submodules: false
- uses: dtolnay/rust-toolchain@master
with:
# Our aws-lc-sys generation scripts require nightly.
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
- run: rustup override set $RUST_NIGHTLY_TOOLCHAIN
- uses: actions-rs/cargo@v1
with:
command: install
args: rust-script
- name: Install OS Dependencies
run: |
sudo apt-get update -o Acquire::Languages=none -o Acquire::Translation=none
sudo apt-get -y --no-install-recommends install cmake gcc clang ninja-build golang
- name: Remove aws-lc submodule from crate directory
working-directory: ./aws-lc-rs/aws-lc-sys
run: |
rm -rf aws-lc
- uses: actions/checkout@v3
with:
path: ./aws-lc-rs/aws-lc-sys/aws-lc
- name: Regenerate aws-lc-sys crate
working-directory: ./aws-lc-rs/aws-lc-sys
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_SCRIPT_NIGHTLY_TOOLCHAIN }}
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-go@v4
with:
go-version: '>=1.20'
- name: Install current Bash on macOS
if: runner.os == 'macOS'
run: brew install bash coreutils
- name: No-prefix build for ${{ matrix.os }}
env:
AWS_LC_SYS_NO_PREFIX: "1"
# Ensure that we collect symbols unique to C99 builds
AWS_LC_SYS_C_STD: "99"
working-directory: ./aws-lc-rs
run: |
rm -rf symbols/*
rm -rf generated-include/openssl/*
../scripts/generate/_collect_symbols_build.sh -c aws-lc-sys
../scripts/generate/_generate_prefix_headers.sh -c aws-lc-sys
../scripts/generate/_generate_bindings.sh -c aws-lc-sys
- name: aws-lc-sys build
working-directory: ./aws-lc-rs/aws-lc-sys
cargo test -p aws-lc-sys --features bindgen
- name: Collect symbols
working-directory: ./aws-lc-rs
run: |
cargo build
- name: aws-lc-sys test
working-directory: ./aws-lc-rs/aws-lc-sys
./scripts/build/collect_symbols.sh -c aws-lc-sys
- name: Generate Prefix Headers
working-directory: ./aws-lc-rs
run: ./scripts/generate/_generate_prefix_headers.sh -c aws-lc-sys
- name: Update sys-crate metadata
working-directory: ./aws-lc-rs
run: ./scripts/ci/update_sys_crate_metadata.sh aws-lc-sys
- name: Generate bindings for ${{ matrix.os }}
env:
AWS_LC_SYS_PREGENERATING_BINDINGS: "1"
working-directory: ./aws-lc-rs
run: |
cargo test
- name: aws-lc-sys packaging
cargo test -p aws-lc-sys --features bindgen
- name: Collect source from ${{ matrix.os }}
working-directory: ./aws-lc-rs
run: ./scripts/build/collect_build_src.sh
windows-aws-lc-rs-bindgen:
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
name: aws-lc-rs bindgen on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-latest ]
target: [ x86_64-pc-windows-msvc ]
steps:
- uses: actions/checkout@v3
with:
repository: aws/aws-lc-rs
path: ./aws-lc-rs
submodules: false
- name: Remove aws-lc submodule from crate directory
working-directory: ./aws-lc-rs/aws-lc-sys
shell: bash
run: |
cargo package --allow-dirty
- name: aws-lc-rs build
working-directory: ./aws-lc-rs/aws-lc-rs
rm -rf aws-lc
- uses: actions/checkout@v3
with:
path: ./aws-lc-rs/aws-lc-sys/aws-lc
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_SCRIPT_NIGHTLY_TOOLCHAIN }}
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-go@v4
with:
go-version: '>=1.20'
- uses: ilammy/setup-nasm@v1
- name: No-prefix build for ${{ matrix.target }}
env:
AWS_LC_SYS_NO_PREFIX: "1"
working-directory: ./aws-lc-rs
run: |
cargo build
- name: aws-lc-rs test
working-directory: ./aws-lc-rs/aws-lc-rs
cargo test -p aws-lc-sys --features bindgen --target ${{ matrix.target }}
- name: Collect symbols
working-directory: ./aws-lc-rs
shell: bash
run: |
cargo test
- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Cross-compile arm-linux-androideabi
./scripts/build/collect_symbols.sh -c aws-lc-sys -t ${{ matrix.target }}
- name: Generate Prefix Headers
working-directory: ./aws-lc-rs
shell: bash
run: ./scripts/generate/_generate_prefix_headers.sh -c aws-lc-sys
- name: Update sys-crate metadata
working-directory: ./aws-lc-rs
run: cross test -p aws-lc-rs --release --features bindgen,unstable --target arm-linux-androideabi
shell: bash
run: ./scripts/ci/update_sys_crate_metadata.sh aws-lc-sys
- name: Generate bindings for ${{ matrix.target }}
env:
AWS_LC_SYS_PREGENERATING_BINDINGS: "1"
working-directory: ./aws-lc-rs
run: |
cargo test -p aws-lc-sys --features bindgen --target ${{ matrix.target }}
Loading
Loading