Skip to content

Commit

Permalink
Merge PR 5, ci: restore aws-lc-rs crypto provider, use cargo-c for li…
Browse files Browse the repository at this point in the history
…brustls install

commit 3280e4f
Author: Daniel McCarney <[email protected]>
Date:   Sat Jan 18 10:37:15 2025 -0500

    ci: restore aws-lc-rs crypto provider in matrix

    This works without issue with the main branch of rustls-ffi.

    For the 0.14.1 release when using the Makefile to install there's an
    upstream issue where the CFLAGS intended for the rustls-ffi
    client/server examples are _also_ used when building librustls and its
    rust dependencies.

    This includes aws-lc-sys, which at the version used by
    librustls/rustls/aws-lc-rs (0.21.1) produces errors under the pedantic
    settings used by rustls-ffi for its examples. The warnings have been
    fixed upstream, but not for the version in use by rustls-ffi 0.14.x.

    To work around this issue we pass CFLAGS="" when running the make
    install for librustls 0.14.1.

commit 681edd0
Author: Daniel McCarney <[email protected]>
Date:   Sat Jan 18 10:18:45 2025 -0500

    ci: install w/ cargo-c instead of cmake

    cmake is only required for the client/server example binaries. For
    mod_tls we only need the librustls bits and can use cargo-c directly.

    cargo-c respects the host OS pattern of putting libs in an
    arch-specific subdir. To make the older 0.14.x Makefile install and the
    cargo-c install equivalent we override this behaviour by setting
    --libdir.

commit 1f7376a
Author: Daniel McCarney <[email protected]>
Date:   Sat Jan 18 10:15:58 2025 -0500

    ci: remove stale comment RE: MSRV/cargo-c

    The workflow is using the latest cargo-c release, not one tailored to
    a Minimum Supported Rust Version (MSRV).
  • Loading branch information
icing committed Jan 20, 2025
1 parent 5f65a43 commit e343725
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
crypto:
- ring
# aws-lc-sys v0.21.1 is not building due to compiler warnings
# - aws-lc-rs
- aws-lc-rs
rustls-version:
- v0.14.1
- main
Expand Down Expand Up @@ -86,27 +86,27 @@ jobs:
if: matrix.rustls-version != 'main'
run: |
cd $HOME/rustls-ffi
make DESTDIR=$HOME/rustls-ffi/build/rust CRYPTO_PROVIDER=${{ matrix.crypto }} install
make CFLAGS="" DESTDIR=$HOME/rustls-ffi/build/rust CRYPTO_PROVIDER=${{ matrix.crypto }} install
- name: Install cargo-c
if: matrix.rustls-version == 'main'
env:
# Version picked for MSRV compat.
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download/
CARGO_C_FILE: cargo-c-x86_64-unknown-linux-musl.tar.gz
run: |
curl -L $LINK/$CARGO_C_FILE | tar xz -C ~/.cargo/bin
- name: 'build rustls-ffi (cmake)'
- name: 'build rustls-ffi (cargo-c)'
if: matrix.rustls-version == 'main'
run: |
cd $HOME/rustls-ffi
cmake \
-DCRYPTO_PROVIDER=${{matrix.crypto}} \
-DDYN_LINK=on \
-DCMAKE_BUILD_TYPE=Release \
-S librustls -B build
cmake --build build --config "Release"
cargo capi install \
--libdir lib \
--prefix "$HOME/rustls-ffi/build/rust" \
--release \
--locked \
--no-default-features \
--features ${{ matrix.crypto }}
- name: 'install test prereqs'
run: |
Expand Down

0 comments on commit e343725

Please sign in to comment.