From 8a3ef6517bdbdfb1dc6f15711be0fce8b0551fac Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Wed, 18 Dec 2024 14:34:32 -0500 Subject: [PATCH] Add CI for arm-unknown-linux-muslabi(hf) --- .github/workflows/cross.yml | 95 +++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/.github/workflows/cross.yml b/.github/workflows/cross.yml index e3c3b1c3aa6..6ec37105266 100644 --- a/.github/workflows/cross.yml +++ b/.github/workflows/cross.yml @@ -3,11 +3,11 @@ name: cross on: push: branches: - - '*' - - '!generate/aws-lc-*' + - "*" + - "!generate/aws-lc-*" pull_request: branches: - - '*' + - "*" concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} cancel-in-progress: true @@ -27,35 +27,37 @@ jobs: fail-fast: false matrix: 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 + - [aarch64-linux-android, 0] + - [aarch64-unknown-linux-gnu, 1] + - [aarch64-unknown-linux-musl, 1] + - [arm-linux-androideabi, 0] + - [arm-unknown-linux-gnueabihf, 0] + - [arm-unknown-linux-musleabi, 1] + - [arm-unknown-linux-musleabihf, 1] + - [armv7-linux-androideabi, 0] + - [armv7-unknown-linux-gnueabihf, 0] + - [i686-unknown-linux-gnu, 0] + - [powerpc-unknown-linux-gnu, 1] + - [powerpc64-unknown-linux-gnu, 1] + - [powerpc64le-unknown-linux-gnu, 1] + - [riscv64gc-unknown-linux-gnu, 0] + - [s390x-unknown-linux-gnu, 0] + - [x86_64-pc-windows-gnu, 0] + - [x86_64-unknown-linux-musl, 0] steps: - uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: "recursive" - uses: dtolnay/rust-toolchain@master with: - toolchain: 'stable' + 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 }} + toolchain: "stable" + target: ${{ matrix.target[0] }} - name: Set Rust toolchain override run: rustup override set ${{ steps.toolchain.outputs.name }} # The flag below is set to avoid the following error with GCC 11.4.0 on the riscv64 platform: @@ -65,18 +67,18 @@ jobs: - if: ${{ matrix.target == 'riscv64gc-unknown-linux-gnu' }} run: | echo 'AWS_LC_SYS_CFLAGS="-Wno-string-compare"' >> "$GITHUB_ENV" - - 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 }} - + run: cross test -p aws-lc-rs --release --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 --no-default-features --features fips --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' + CROSS_CONFIG: "./Cross.toml.x86_64-unknown-linux-gnu" strategy: fail-fast: false matrix: @@ -85,16 +87,16 @@ jobs: steps: - uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: "recursive" - uses: dtolnay/rust-toolchain@master with: - toolchain: 'stable' + toolchain: "stable" - name: Install cross run: cargo install cross --locked --version 0.2.5 - uses: dtolnay/rust-toolchain@master id: toolchain with: - toolchain: 'stable' + toolchain: "stable" target: ${{ matrix.target }} - name: Set Rust toolchain override run: rustup override set ${{ steps.toolchain.outputs.name }} @@ -110,7 +112,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: "recursive" - run: | brew install llvm echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' @@ -132,7 +134,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: "recursive" - run: | brew install llvm echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' @@ -147,7 +149,6 @@ jobs: - 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 @@ -158,7 +159,7 @@ jobs: sudo apt-get update && sudo apt-get install --assume-yes nasm clang ninja-build llvm - uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: "recursive" - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -182,13 +183,13 @@ jobs: fail-fast: false matrix: target: - - 'x86_64-pc-windows-gnu' - - 'i686-pc-windows-gnu' + - "x86_64-pc-windows-gnu" + - "i686-pc-windows-gnu" steps: - uses: ilammy/setup-nasm@v1 - uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: "recursive" - uses: dtolnay/rust-toolchain@master id: toolchain with: @@ -212,19 +213,19 @@ jobs: fail-fast: false matrix: target: - - 'x86_64-pc-windows-msvc' - - 'i686-pc-windows-msvc' - - 'aarch64-pc-windows-msvc' + - "x86_64-pc-windows-msvc" + - "i686-pc-windows-msvc" + - "aarch64-pc-windows-msvc" crt_static: - - '0' - - '1' + - "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' + submodules: "recursive" - uses: dtolnay/rust-toolchain@master id: toolchain with: @@ -255,11 +256,11 @@ jobs: strategy: fail-fast: false matrix: - target: [ 13.4, 14.1 ] + target: [13.4, 14.1] steps: - uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: "recursive" - name: Prepare VM uses: vmactions/freebsd-vm@v1 with: @@ -280,11 +281,11 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: "recursive" - uses: dtolnay/rust-toolchain@stable id: toolchain with: - toolchain: 'stable' + toolchain: "stable" target: x86_64-pc-windows-gnu - name: Install mingw run: sudo apt-get update && sudo apt-get install --assume-yes mingw-w64