CI script to setup/test aarch64-apple-ios-sim #127
Workflow file for this run
This file contains 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: [ main ] | |
pull_request: | |
branches: | |
- '*' | |
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 == 'aws/aws-lc-rs' | |
name: aws-lc-rs cross tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [ 1.72.1 ] # TODO: return to stable | |
os: [ ubuntu-latest ] | |
target: | |
- arm-unknown-linux-gnueabihf | |
- aarch64-unknown-linux-gnu | |
- i686-unknown-linux-gnu | |
- powerpc64le-unknown-linux-gnu | |
- riscv64gc-unknown-linux-gnu | |
- arm-linux-androideabi | |
- armv7-linux-androideabi | |
- aarch64-linux-android | |
- powerpc64-unknown-linux-gnu | |
- powerpc-unknown-linux-gnu | |
- x86_64-unknown-linux-musl | |
- aarch64-unknown-linux-musl | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: dtolnay/rust-toolchain@master | |
id: toolchain | |
with: | |
toolchain: ${{ matrix.rust }} | |
target: ${{ matrix.target }} | |
- name: Set Rust toolchain override | |
run: rustup override set ${{ steps.toolchain.outputs.name }} | |
- name: Install cross | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
- name: Cross-compilation | |
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'i686-unknown-linux-gnu' }} | |
working-directory: ./aws-lc-rs | |
run: cross test --features unstable --target ${{ matrix.target }} | |
- name: Cross-compilation w/ bindgen | |
working-directory: ./aws-lc-rs | |
run: cross test --release --features bindgen,unstable --target ${{ matrix.target }} | |
aws-lc-rs-platform-build: | |
if: github.repository == 'aws/aws-lc-rs' | |
name: Cross-platform build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [ stable ] | |
os: [ macos-13-xlarge ] | |
target: [ aarch64-apple-ios-sim ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: dtolnay/rust-toolchain@master | |
id: toolchain | |
with: | |
toolchain: ${{ matrix.rust }} | |
target: ${{ matrix.target }} | |
- name: Set Rust toolchain override | |
run: rustup override set ${{ steps.toolchain.outputs.name }} | |
- name: Run cargo test | |
working-directory: ./aws-lc-rs | |
run: | | |
function find_dyld_sim() { | |
find /Library -type f -name dyld_dim | head -n 1 | |
} | |
export DYLD_ROOT_PATH=$(find_dyld_sim) | |
echo DYLD_ROOT_PATH=${DYLD_ROOT_PATH} | |
cargo test --features bindgen,unstable --target ${{ matrix.target }} |