Skip to content

Test more windows targets #606

Test more windows targets

Test more windows targets #606

Workflow file for this run

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-2024-05-22
jobs:
aws-lc-rs-cross-test:
if: github.repository_owner == 'aws'
name: aws-lc-rs cross tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04 ]
target:
- aarch64-linux-android
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- arm-linux-androideabi
- arm-unknown-linux-gnueabihf
- armv7-linux-androideabi
- armv7-unknown-linux-gnueabihf
- i686-unknown-linux-gnu
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- s390x-unknown-linux-gnu
- x86_64-pc-windows-gnu
- x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 'stable'
- name: Install cross
run: cargo install cross ${{ (matrix.target == 'riscv64gc-unknown-linux-gnu' && '--locked') || '' }} --git https://github.com/cross-rs/cross
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ (matrix.target == 'riscv64gc-unknown-linux-gnu' && '1.72.1') || 'stable' }}
target: ${{ matrix.target }}
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- if: ${{ matrix.target == 'riscv64gc-unknown-linux-gnu' }}
run: |
cargo update
cargo update -p clap --precise 4.4.18
- 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-13-xlarge
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- run: |
brew install llvm
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"'
echo 'export LIBCLANG_PATH=/opt/homebrew/opt/llvm' >> "$GITHUB_ENV"
- 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-13-xlarge
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- run: |
brew install llvm
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"'
echo 'export LIBCLANG_PATH=/opt/homebrew/opt/llvm' >> "$GITHUB_ENV"
- 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
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 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-cross:
if: github.repository_owner == 'aws'
name: ${{ matrix.target }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
target:
- 'x86_64-pc-windows-gnu'
- 'i686-pc-windows-msvc'
# TODO: The build for 'i686-pc-windows-gnu' succeeds locally.
# GH CI erroring with `undefined reference` to several assembly functions.
# Verify NASM setup and symbol prefixing are working as expected.
# - 'i686-pc-windows-gnu'
steps:
- if: ${{ matrix.target == 'i686-pc-windows-gnu' }}
name: Set up MinGW
shell: bash
run: |
choco install mingw --x86
echo "C:/ProgramData/mingw64/mingw32/bin/" >> "$GITHUB_PATH"
echo "export COMPILER_PATH=C:/ProgramData/mingw64/mingw32/bin/" >> "$GITHUB_ENV"
- uses: ilammy/setup-nasm@v1
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: stable
target: ${{ matrix.target }}
- name: Debug Test on `${{ matrix.target }}`
shell: bash
run: cargo test -p aws-lc-rs --target ${{ matrix.target }} --features bindgen
- name: Release test on `${{ matrix.target }}`
shell: bash
run: cargo test -p aws-lc-rs --release --target ${{ matrix.target }} --features bindgen
aws-lc-rs-windows-arm64:
if: github.repository_owner == 'aws'
name: aarch64-pc-windows-msvc
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v4
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: stable
target: aarch64-pc-windows-msvc
- name: Degbug build for `aarch64-pc-windows-msvc`
run: cargo build -p aws-lc-rs --all-targets --target aarch64-pc-windows-msvc --features bindgen
- name: No-default-features Debug Build for `aarch64-pc-windows-msvc`
run: cargo build -p aws-lc-rs --all-targets --target aarch64-pc-windows-msvc --no-default-features --features aws-lc-sys
- name: Release Build for `aarch64-pc-windows-msvc`
run: cargo build --release -p aws-lc-rs --all-targets --target aarch64-pc-windows-msvc