From 5e93d5e99649d9940534c50ea3e5b509da89a5d2 Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Fri, 20 Dec 2024 09:48:29 -0500 Subject: [PATCH] Fix CI for aws-lc-rs --- .github/workflows/aws-lc-rs.yml | 81 +++++++++++++++------------------ 1 file changed, 37 insertions(+), 44 deletions(-) diff --git a/.github/workflows/aws-lc-rs.yml b/.github/workflows/aws-lc-rs.yml index 129030976a..34027e766c 100644 --- a/.github/workflows/aws-lc-rs.yml +++ b/.github/workflows/aws-lc-rs.yml @@ -14,26 +14,18 @@ env: jobs: standard: if: github.repository_owner == 'aws' - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + 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 + - uses: dtolnay/rust-toolchain@stable - name: Remove aws-lc submodule from crate directory working-directory: ./aws-lc-rs/aws-lc-sys run: | @@ -41,36 +33,37 @@ jobs: - 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 - 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 - run: | - cargo build - - name: aws-lc-sys test - working-directory: ./aws-lc-rs/aws-lc-sys - run: | - cargo test - - name: aws-lc-sys packaging - working-directory: ./aws-lc-rs/aws-lc-sys + - 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: | - cargo package --allow-dirty - - name: aws-lc-rs build - working-directory: ./aws-lc-rs/aws-lc-rs + cargo test -p aws-lc-sys --features bindgen + - name: Collect symbols + working-directory: ./aws-lc-rs run: | - cargo build - - name: aws-lc-rs test - working-directory: ./aws-lc-rs/aws-lc-rs + ./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: Install cross - run: cargo install cross --git https://github.com/cross-rs/cross - - name: Cross-compile arm-linux-androideabi + cargo test -p aws-lc-sys --features bindgen + - name: Collect source from ${{ matrix.os }} working-directory: ./aws-lc-rs - run: cross test -p aws-lc-rs --release --features bindgen,unstable --target arm-linux-androideabi + run: ./scripts/build/collect_build_src.sh