ParsedPublicKey for agreement #1941
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cross | |
on: | |
push: | |
branches: | |
- "*" | |
- "!generate/aws-lc-*" | |
pull_request: | |
branches: | |
- "*" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
env: | |
RUST_BACKTRACE: 1 | |
# We can pin the version if nightly is too unstable. | |
# Otherwise, we test against the latest version. | |
RUST_NIGHTLY_TOOLCHAIN: nightly | |
jobs: | |
aws-lc-rs-cross-test: | |
if: github.repository_owner == 'aws' | |
name: cross tests ${{ matrix.target[0] }} | |
runs-on: ubuntu-22.04 | |
env: | |
# The flag below is set to avoid the following error with GCC 11.4.0 on the riscv64 platform: | |
# /home/runner/work/aws-lc-rs/aws-lc-rs/aws-lc-sys/aws-lc/crypto/pem/pem_lib.c:707:11: error: 'strncmp' of strings of length 1 and 9 and bound of 9 evaluates to nonzero [-Werror=string-compare] | |
# 707 | if (strncmp(buf, "-----END ", 9) == 0) { | |
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
AWS_LC_SYS_CFLAGS_riscv64gc_unknown_linux_gnu: '-Wno-string-compare' | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- [ aarch64-linux-android, 0, 1 ] | |
- [ aarch64-unknown-linux-gnu, 1, 1 ] | |
- [ aarch64-unknown-linux-musl, 1, 1 ] | |
- [ arm-linux-androideabi, 0, 0 ] | |
- [ arm-unknown-linux-gnueabihf, 0, 0 ] | |
- [ arm-unknown-linux-musleabi, 1, 0 ] | |
- [ arm-unknown-linux-musleabihf, 1, 0 ] | |
- [ armv7-linux-androideabi, 0, 0 ] | |
- [ armv7-unknown-linux-gnueabihf, 0, 0 ] | |
- [ i686-unknown-linux-gnu, 0, 1 ] | |
- [ i686-pc-windows-gnu, 0, 0 ] | |
- [ powerpc-unknown-linux-gnu, 1, 0 ] | |
- [ powerpc64-unknown-linux-gnu, 1, 0 ] | |
- [ powerpc64le-unknown-linux-gnu, 1, 0 ] | |
- [ riscv64gc-unknown-linux-gnu, 0, 1 ] | |
- [ s390x-unknown-linux-gnu, 0, 0 ] | |
- [ x86_64-pc-windows-gnu, 0, 1 ] # Requires release build. See: https://github.com/rust-lang/rust/issues/139380 | |
- [ x86_64-unknown-linux-musl, 0, 1 ] | |
- [ x86_64-unknown-illumos, 0, 0 ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: "stable" | |
- name: Install cross | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
- uses: dtolnay/rust-toolchain@master | |
id: toolchain | |
with: | |
toolchain: "stable" | |
target: ${{ matrix.target[0] }} | |
- name: Set Rust toolchain override | |
run: rustup override set ${{ steps.toolchain.outputs.name }} | |
- if: ${{ !startsWith(matrix.target[0], 'x86_64') }} | |
run: | | |
echo 'AWS_LC_RS_DISABLE_SLOW_TESTS=1' >> "$GITHUB_ENV" | |
- if: ${{ matrix.target[2] == 1 }} | |
run: | | |
echo 'AWS_LC_SYS_EXTERNAL_BINDGEN=0' >> "$GITHUB_ENV" | |
- if: ${{ matrix.target[0] == 'x86_64-unknown-illumos' }} | |
run: | | |
echo 'CROSS_TEST_EXTRA_FLAG=--no-run' >> "$GITHUB_ENV" | |
- if: ${{ matrix.target[0] != 'x86_64-unknown-illumos' }} | |
# Since Rust 1.89, doctests run by default. | |
# When cross-compiling, doctests do not have the environment setup properly to link to shared libraries. | |
# Per documentation: | |
# --all-targets Test all targets (does not include doctests) | |
run: | | |
echo 'CROSS_TEST_EXTRA_FLAG=--all-targets' >> "$GITHUB_ENV" | |
- name: Cross-compilation (test release) | |
run: cross test -p aws-lc-rs --release "${CROSS_TEST_EXTRA_FLAG}" --features unstable --target ${{ matrix.target[0] }} | |
- if: ${{ matrix.target[1] == 1 }} | |
name: Cross-compilation (test FIPS release) | |
run: cross test -p aws-lc-rs --release "${CROSS_TEST_EXTRA_FLAG}" --no-default-features --features fips --target ${{ matrix.target[0] }} | |
- name: Cross-compilation (test aws-lc-sys ssl feature) | |
# There's a bug in the clang "atomic" header | |
# It was reported here: https://reviews.llvm.org/D75183 | |
# It was finally fixed here: https://reviews.llvm.org/D118391 | |
# Instead of trying to hack around this, we just won't test building libssl on that platform. | |
# We should update this test once cross-rs has an updated docker image for this target. | |
if: ${{ matrix.target[0] != 'arm-linux-androideabi' }} | |
run: | | |
unset AWS_LC_SYS_EXTERNAL_BINDGEN | |
cross test -p aws-lc-sys --release "${CROSS_TEST_EXTRA_FLAG}" --features ssl --target ${{ matrix.target[0] }} | |
aws-lc-rs-cross-0_2_5-test: | |
if: github.repository_owner == 'aws' | |
name: cross tests ${{ matrix.target }} | |
runs-on: ubuntu-latest | |
env: | |
CROSS_CONFIG: "./Cross.toml.x86_64-unknown-linux-gnu" | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: "stable" | |
- name: Install cross | |
run: cargo install cross --locked --version 0.2.5 | |
- uses: dtolnay/rust-toolchain@master | |
id: toolchain | |
with: | |
toolchain: "stable" | |
target: ${{ matrix.target }} | |
- name: Set Rust toolchain override | |
run: rustup override set ${{ steps.toolchain.outputs.name }} | |
- name: Cross-compilation (build debug) | |
run: cross build -p aws-lc-rs --features unstable --target ${{ matrix.target }} | |
- name: Cross-compilation (test release) | |
run: cross test -p aws-lc-rs --release --features unstable --target ${{ matrix.target }} | |
aws-lc-rs-ios-aarch64: | |
if: github.repository_owner == 'aws' | |
name: iOS aarch64 cross-platform build | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- run: | | |
brew install llvm | |
- uses: dtolnay/rust-toolchain@master | |
id: toolchain | |
with: | |
toolchain: stable | |
target: aarch64-apple-ios-sim | |
- name: Install bash | |
run: brew install bash | |
- name: iOS Simulator Runner | |
run: ./scripts/ci/ios-simulator-runner.sh | |
aws-lc-rs-ios-x86_64: | |
if: github.repository_owner == 'aws' | |
name: iOS x86-64 cross-platform build | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- run: | | |
brew install llvm | |
- uses: dtolnay/rust-toolchain@master | |
id: toolchain | |
with: | |
toolchain: stable | |
target: x86_64-apple-ios | |
- name: Debug build for `x86_64-apple-ios` | |
run: cargo build -p aws-lc-rs --target x86_64-apple-ios --features bindgen | |
- name: Release build for `x86_64-apple-ios` | |
run: cargo build -p aws-lc-rs --release --target x86_64-apple-ios --features bindgen | |
cargo-xwin: | |
if: github.repository_owner == 'aws' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install build dependencies | |
# cargo-xwin apparently require ninja-build | |
run: | | |
sudo apt-get update && sudo apt-get install --assume-yes nasm clang ninja-build llvm | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
target: x86_64-pc-windows-msvc | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
target: aarch64-pc-windows-msvc | |
- name: Install cargo-xwin and bindgen-cli | |
run: cargo install --locked cargo-xwin bindgen-cli | |
- name: cargo xwin build for `x86_64-pc-windows-msvc` | |
run: cargo xwin build -p aws-lc-rs --release --all-targets --target x86_64-pc-windows-msvc | |
- name: cargo xwin build for `aarch64-pc-windows-msvc` | |
run: cargo xwin build -p aws-lc-rs --release --all-targets --target aarch64-pc-windows-msvc | |
aws-lc-rs-windows-msvc: | |
if: ${{ github.repository_owner == 'aws' }} | |
name: ${{ matrix.target }} - ${{ (matrix.crt_static == '1' && 'crt-static and /WX') || '/WX' }} | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- "x86_64-pc-windows-msvc" | |
- "i686-pc-windows-msvc" | |
- "aarch64-pc-windows-msvc" | |
crt_static: | |
- "0" | |
- "1" | |
steps: | |
- name: Install NASM | |
if: ${{ matrix.target == 'x86_64-pc-windows-msvc' || matrix.target == 'i686-pc-windows-msvc' }} | |
uses: ilammy/setup-nasm@v1 | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- uses: dtolnay/rust-toolchain@master | |
id: toolchain | |
with: | |
toolchain: stable | |
target: ${{ matrix.target }} | |
- name: Set ACTION_CARGO | |
run: | | |
if ('${{ matrix.target }}' -like '*aarch64*') { | |
echo "ACTION_CARGO=build" | Out-File -FilePath $env:GITHUB_ENV -Append | |
} else { | |
echo "ACTION_CARGO=test" | Out-File -FilePath $env:GITHUB_ENV -Append | |
} | |
- name: Set RUSTFLAGS | |
run: | | |
if ('${{ matrix.crt_static }}' -eq '1') { | |
echo "RUSTFLAGS=-Clink-arg=/WX -Ctarget-feature=+crt-static" | Out-File -FilePath $env:GITHUB_ENV -Append | |
} else { | |
echo "RUSTFLAGS=-Clink-arg=/WX" | Out-File -FilePath $env:GITHUB_ENV -Append | |
} | |
- name: Debug build | |
run: cargo ${{ env.ACTION_CARGO }} -p aws-lc-rs --all-targets --target ${{ matrix.target }} --features bindgen | |
- name: Release Build for ${{ matrix.target }} | |
run: cargo ${{ env.ACTION_CARGO }} --release -p aws-lc-rs --all-targets --target ${{ matrix.target }} | |
freebsd: | |
if: github.repository_owner == 'aws' | |
name: aws-lc-rs freebsd test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [ 13.4, 14.1 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Prepare VM | |
uses: vmactions/freebsd-vm@v1 | |
with: | |
release: ${{ matrix.target }} | |
usesh: true | |
copyback: false | |
prepare: | | |
pkg install -y git gmake bash sudo cmake-core llvm-devel-lite curl go | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
. "$HOME/.cargo/env" | |
cargo test -p aws-lc-rs | |
cargo test -p aws-lc-rs --no-default-features --features=fips | |
cross-x86_64-pc-windows-gnu: | |
if: github.repository_owner == 'aws' | |
name: cross (prebuilt nasm) - x86_64-pc-windows-gnu | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- uses: dtolnay/rust-toolchain@stable | |
id: toolchain | |
with: | |
toolchain: "stable" | |
target: x86_64-pc-windows-gnu | |
- name: Install mingw | |
run: sudo apt-get update && sudo apt-get install --assume-yes mingw-w64 | |
- name: Run cargo test | |
run: cargo build -p aws-lc-rs --features prebuilt-nasm --target x86_64-pc-windows-gnu | |
open-harmony: | |
if: github.repository_owner == 'aws' | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_BUILDKIT: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Build Docker Image | |
working-directory: .github/docker_images/ohos-5.0.0 | |
run: | | |
./build_image.sh | |
- name: Build | |
run: | | |
docker run -v "${{ github.workspace }}:/aws_lc_rs" ohos:5.0.0 | |
alpine-linux: | |
if: github.repository_owner == 'aws' | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_BUILDKIT: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Build Docker Image | |
working-directory: .github/docker_images/alpine-3.20 | |
run: | | |
./build_image.sh | |
- name: Build | |
run: | | |
docker run -v "${{ github.workspace }}:/aws_lc_rs" alpine:3.20 | |
msys2: | |
name: msys2 ${{ matrix.sys }} - ${{ matrix.nasm }}, ${{ matrix.generator }} | |
if: github.repository_owner == 'aws' | |
runs-on: windows-latest | |
env: | |
AWS_LC_SYS_EXTERNAL_BINDGEN: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
sys: | |
- mingw64 | |
- ucrt64 | |
- clang64 | |
nasm: | |
- 'prebuilt' | |
- 'nasm' | |
generator: | |
- ninja | |
- msys | |
- mingw | |
steps: | |
- name: Install MSYS2 | |
uses: msys2/setup-msys2@v2 | |
id: setup_msys2 | |
with: | |
msystem: ${{ matrix.sys }} | |
update: true | |
pacboy: >- | |
cmake | |
toolchain | |
llvm | |
rust | |
rust-bindgen | |
ninja | |
cc | |
go | |
${{ (matrix.nasm == 'nasm' && 'nasm') || 'make' }} | |
- name: Update Environment | |
shell: bash | |
run: | | |
SYSROOT=$(cygpath -a -m '${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}') | |
echo "AWS_LC_SYS_PREBUILT_NASM=${{ (matrix.nasm == 'nasm' && '0') || '1' }}" >> $GITHUB_ENV | |
echo "BINDGEN_EXTRA_CLANG_ARGS=-target x86_64-pc-windows-gnu" >> $GITHUB_ENV | |
echo "GOPATH=${SYSROOT}" >> $GITHUB_ENV | |
echo "GOROOT=${SYSROOT}/lib/go" >> $GITHUB_ENV | |
cygpath -w ${SYSROOT}/bin >> $GITHUB_PATH | |
- name: Set CMAKE_GENERATOR | |
if: matrix.generator == 'ninja' | |
shell: bash | |
run: | | |
echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV | |
- name: Set LIBCLANG_PATH | |
if: matrix.generator == 'msys' | |
shell: bash | |
run: | | |
SYSROOT=$(cygpath -a -m '${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}') | |
echo "LIBCLANG_PATH=${SYSROOT}/lib" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Test | |
if: matrix.generator != 'msys' | |
shell: bash | |
run: cargo test --verbose --features bindgen --release -p aws-lc-rs | |
- name: Test | |
if: matrix.generator == 'msys' | |
shell: msys2 {0} | |
run: cargo test --verbose --features bindgen --release -p aws-lc-rs |