Fix aws-lc-rs CI job #11042
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: aws-lc-rs tests | |
| on: | |
| push: | |
| branches: [ '*' ] | |
| pull_request: | |
| branches: [ '*' ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| env: | |
| GOPROXY: https://proxy.golang.org,direct | |
| RUST_BACKTRACE: 1 | |
| RUST_NIGHTLY_TOOLCHAIN: nightly | |
| RUST_SCRIPT_NIGHTLY_TOOLCHAIN: nightly | |
| DEBIAN_FRONTEND: noninteractive | |
| permissions: | |
| contents: read | |
| jobs: | |
| collect-symbols: | |
| if: github.repository_owner == 'aws' | |
| runs-on: ${{ matrix.os }} | |
| name: Collect symbols on ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-15-intel, macos-latest ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: aws/aws-lc-rs | |
| path: ./aws-lc-rs | |
| submodules: false | |
| - name: Remove aws-lc submodule from crate directory | |
| working-directory: ./aws-lc-rs/aws-lc-sys | |
| shell: bash | |
| run: | | |
| rm -rf aws-lc | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./aws-lc-rs/aws-lc-sys/aws-lc | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: 'rustfmt' | |
| - 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" | |
| AWS_LC_SYS_C_STD: "99" | |
| working-directory: ./aws-lc-rs | |
| run: | | |
| cargo test -p aws-lc-sys --features bindgen | |
| - name: Collect symbols | |
| working-directory: ./aws-lc-rs | |
| shell: bash | |
| run: | | |
| ./scripts/build/collect_symbols.sh -c aws-lc-sys | |
| collect-windows-symbols: | |
| if: github.repository_owner == 'aws' | |
| runs-on: windows-latest | |
| name: Collect symbols for ${{ matrix.target }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - 'aarch64-pc-windows-msvc' | |
| - 'x86_64-pc-windows-msvc' | |
| - 'x86_64-pc-windows-gnu' | |
| - 'i686-pc-windows-msvc' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: aws/aws-lc-rs | |
| path: ./aws-lc-rs | |
| submodules: false | |
| - name: Remove aws-lc submodule from crate directory | |
| working-directory: ./aws-lc-rs/aws-lc-sys | |
| shell: bash | |
| run: | | |
| rm -rf aws-lc | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./aws-lc-rs/aws-lc-sys/aws-lc | |
| - uses: dtolnay/rust-toolchain@stable | |
| id: toolchain | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.target }} | |
| components: 'rustfmt' | |
| - if: contains(matrix.target, 'x86') || contains(matrix.target, 'i686') | |
| uses: ilammy/setup-nasm@v1 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: '>=1.20' | |
| - name: No-prefix build for ${{ matrix.target }} | |
| env: | |
| AWS_LC_SYS_NO_PREFIX: "1" | |
| working-directory: ./aws-lc-rs | |
| run: | | |
| cargo ${{ (matrix.target == 'aarch64-pc-windows-msvc' && 'build') || 'test' }} -p aws-lc-sys --features bindgen --target ${{ matrix.target }} | |
| - name: Collect symbols | |
| working-directory: ./aws-lc-rs | |
| shell: bash | |
| run: | | |
| ./scripts/build/collect_symbols.sh -c aws-lc-sys -t ${{ matrix.target }} | |
| collect-cross-symbols: | |
| if: github.repository_owner == 'aws' | |
| runs-on: ubuntu-latest | |
| name: Collect symbols for ${{ matrix.target }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - aarch64-unknown-linux-gnu | |
| - i686-unknown-linux-gnu | |
| - aarch64-unknown-linux-musl | |
| - x86_64-unknown-linux-musl | |
| - arm-unknown-linux-gnueabi | |
| - armv7-unknown-linux-gnueabihf | |
| - powerpc-unknown-linux-gnu | |
| - powerpc64le-unknown-linux-gnu | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: aws/aws-lc-rs | |
| path: ./aws-lc-rs | |
| submodules: false | |
| - name: Remove aws-lc submodule from crate directory | |
| working-directory: ./aws-lc-rs/aws-lc-sys | |
| shell: bash | |
| run: | | |
| rm -rf aws-lc | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./aws-lc-rs/aws-lc-sys/aws-lc | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: 'rustfmt' | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: '>=1.20' | |
| - name: Install cross | |
| run: cargo install cross --locked --git https://github.com/cross-rs/cross | |
| - name: No-prefix build for ${{ matrix.target }} | |
| env: | |
| AWS_LC_SYS_NO_PREFIX: "1" | |
| working-directory: ./aws-lc-rs | |
| run: | | |
| cross test -p aws-lc-sys --features bindgen --target ${{ matrix.target }} | |
| - name: Collect symbols | |
| working-directory: ./aws-lc-rs | |
| run: | | |
| ./scripts/build/collect_symbols.sh -c aws-lc-sys -t ${{ matrix.target }} | |
| generate-headers: | |
| if: github.repository_owner == 'aws' | |
| runs-on: ubuntu-latest | |
| name: Generate prefix headers | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: aws/aws-lc-rs | |
| path: ./aws-lc-rs | |
| submodules: false | |
| - name: Remove aws-lc submodule from crate directory | |
| working-directory: ./aws-lc-rs/aws-lc-sys | |
| shell: bash | |
| run: | | |
| rm -rf aws-lc | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./aws-lc-rs/aws-lc-sys/aws-lc | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ env.RUST_SCRIPT_NIGHTLY_TOOLCHAIN }} | |
| components: 'rustfmt' | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: 'rustfmt' | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: '>=1.20' | |
| - name: No-prefix build | |
| env: | |
| AWS_LC_SYS_NO_PREFIX: "1" | |
| AWS_LC_SYS_C_STD: "99" | |
| working-directory: ./aws-lc-rs | |
| run: | | |
| cargo test -p aws-lc-sys --features bindgen | |
| - name: Delete current symbol files and headers | |
| working-directory: ./aws-lc-rs | |
| shell: bash | |
| run: | | |
| rm -rf ./aws-lc-sys/symbols/* ./aws-lc-sys/generated-include/* | |
| mkdir -p ./aws-lc-sys/symbols ./aws-lc-sys/generated-include/openssl | |
| - name: Collect symbols | |
| working-directory: ./aws-lc-rs | |
| shell: bash | |
| run: | | |
| ./scripts/build/collect_symbols.sh -c aws-lc-sys | |
| - name: Generate Prefix Headers | |
| working-directory: ./aws-lc-rs | |
| shell: bash | |
| run: ./scripts/generate/_generate_prefix_headers.sh -c aws-lc-sys | |
| - name: Update sys-crate metadata | |
| working-directory: ./aws-lc-rs | |
| shell: bash | |
| run: ./scripts/ci/update_sys_crate_metadata.sh aws-lc-sys | |
| generate-bindings: | |
| if: github.repository_owner == 'aws' | |
| runs-on: ${{ matrix.os }} | |
| name: Generate bindings on ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-15-intel, macos-latest ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: aws/aws-lc-rs | |
| path: ./aws-lc-rs | |
| submodules: false | |
| - name: Remove aws-lc submodule from crate directory | |
| working-directory: ./aws-lc-rs/aws-lc-sys | |
| shell: bash | |
| run: | | |
| rm -rf aws-lc | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./aws-lc-rs/aws-lc-sys/aws-lc | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: 'rustfmt' | |
| - 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: Generate bindings for ${{ matrix.os }} | |
| env: | |
| AWS_LC_SYS_PREGENERATING_BINDINGS: "1" | |
| working-directory: ./aws-lc-rs | |
| run: | | |
| cargo test -p aws-lc-sys --features bindgen | |
| generate-windows-bindings: | |
| if: github.repository_owner == 'aws' | |
| runs-on: windows-latest | |
| name: Generate bindings for ${{ matrix.target }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - 'aarch64-pc-windows-msvc' | |
| - 'x86_64-pc-windows-msvc' | |
| - 'x86_64-pc-windows-gnu' | |
| - 'i686-pc-windows-msvc' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: aws/aws-lc-rs | |
| path: ./aws-lc-rs | |
| submodules: false | |
| - name: Remove aws-lc submodule from crate directory | |
| working-directory: ./aws-lc-rs/aws-lc-sys | |
| shell: bash | |
| run: | | |
| rm -rf aws-lc | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./aws-lc-rs/aws-lc-sys/aws-lc | |
| - uses: dtolnay/rust-toolchain@stable | |
| id: toolchain | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.target }} | |
| components: 'rustfmt' | |
| - if: contains(matrix.target, 'x86') || contains(matrix.target, 'i686') | |
| uses: ilammy/setup-nasm@v1 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: '>=1.20' | |
| - name: Generate bindings for ${{ matrix.target }} | |
| env: | |
| AWS_LC_SYS_PREGENERATING_BINDINGS: "1" | |
| working-directory: ./aws-lc-rs | |
| run: | | |
| cargo ${{ (matrix.target == 'aarch64-pc-windows-msvc' && 'build') || 'test' }} -p aws-lc-sys --features bindgen --target ${{ matrix.target }} | |
| generate-cross-bindings: | |
| if: github.repository_owner == 'aws' | |
| runs-on: ubuntu-latest | |
| name: Generate bindings for ${{ matrix.target }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - "aarch64-linux-android" | |
| - "aarch64-unknown-linux-gnu" | |
| - "aarch64-unknown-linux-musl" | |
| - "i686-unknown-linux-gnu" | |
| - "riscv64gc-unknown-linux-gnu" | |
| - "x86_64-unknown-linux-musl" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: aws/aws-lc-rs | |
| path: ./aws-lc-rs | |
| submodules: false | |
| - name: Remove aws-lc submodule from crate directory | |
| working-directory: ./aws-lc-rs/aws-lc-sys | |
| shell: bash | |
| run: | | |
| rm -rf aws-lc | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./aws-lc-rs/aws-lc-sys/aws-lc | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: 'rustfmt' | |
| - name: Install cross | |
| run: cargo install cross --locked --git https://github.com/cross-rs/cross | |
| - name: Generate bindings for ${{ matrix.target }} | |
| env: | |
| AWS_LC_SYS_PREGENERATING_BINDINGS: "1" | |
| working-directory: ./aws-lc-rs | |
| run: | | |
| cross test -p aws-lc-sys --features bindgen --target ${{ matrix.target }} | |
| generate-universal-bindings: | |
| if: github.repository_owner == 'aws' | |
| runs-on: ${{ matrix.os }} | |
| name: Generate universal bindings on ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: aws/aws-lc-rs | |
| path: ./aws-lc-rs | |
| submodules: false | |
| - name: Remove aws-lc submodule from crate directory | |
| working-directory: ./aws-lc-rs/aws-lc-sys | |
| shell: bash | |
| run: | | |
| rm -rf aws-lc | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./aws-lc-rs/aws-lc-sys/aws-lc | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: 'rustfmt' | |
| - 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: Generate bindings for ${{ matrix.os }} | |
| env: | |
| AWS_LC_SYS_PREGENERATING_BINDINGS: "1" | |
| working-directory: ./aws-lc-rs | |
| run: | | |
| cargo test -p aws-lc-sys --no-default-features --features bindgen | |
| collect-src: | |
| if: github.repository_owner == 'aws' | |
| runs-on: ubuntu-latest | |
| name: Collect build source | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: aws/aws-lc-rs | |
| path: ./aws-lc-rs | |
| submodules: false | |
| - name: Remove aws-lc submodule from crate directory | |
| working-directory: ./aws-lc-rs/aws-lc-sys | |
| shell: bash | |
| run: | | |
| rm -rf aws-lc | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./aws-lc-rs/aws-lc-sys/aws-lc | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: 'rustfmt' | |
| - name: Install ripgrep | |
| run: cargo install --force --locked ripgrep --features pcre2 | |
| - name: Collect source | |
| working-directory: ./aws-lc-rs | |
| run: | | |
| for script in aws-lc-sys/scripts/cc_builder/*; do | |
| $script; | |
| done | |
| collect-nasm: | |
| if: github.repository_owner == 'aws' | |
| runs-on: windows-latest | |
| name: Collect NASM objects | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: aws/aws-lc-rs | |
| path: ./aws-lc-rs | |
| submodules: false | |
| - name: Remove aws-lc submodule from crate directory | |
| working-directory: ./aws-lc-rs/aws-lc-sys | |
| shell: bash | |
| run: | | |
| rm -rf aws-lc | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./aws-lc-rs/aws-lc-sys/aws-lc | |
| - uses: dtolnay/rust-toolchain@stable | |
| id: toolchain | |
| with: | |
| toolchain: stable | |
| targets: "x86_64-pc-windows-msvc,x86_64-pc-windows-gnu" | |
| components: 'rustfmt' | |
| - uses: ilammy/setup-nasm@v1 | |
| - name: Build aws-lc-sys | |
| shell: bash | |
| working-directory: ./aws-lc-rs | |
| run: AWS_LC_SYS_PREBUILT_NASM=0 cargo build -p aws-lc-sys --release --target x86_64-pc-windows-msvc | |
| - name: Collect NASM object files | |
| shell: bash | |
| working-directory: ./aws-lc-rs | |
| run: ./scripts/build/collect_nasm_obj.sh | |
| - name: Clean build | |
| shell: bash | |
| working-directory: ./aws-lc-rs | |
| run: cargo clean | |
| - name: Test aws-lc-sys for x86_64-pc-windows-msvc | |
| shell: bash | |
| working-directory: ./aws-lc-rs | |
| run: AWS_LC_SYS_PREBUILT_NASM=1 cargo build -p aws-lc-sys --target x86_64-pc-windows-msvc | |
| - name: Test aws-lc-sys for x86_64-pc-windows-gnu | |
| shell: bash | |
| working-directory: ./aws-lc-rs | |
| run: AWS_LC_SYS_PREBUILT_NASM=1 cargo build -p aws-lc-sys --target x86_64-pc-windows-gnu |