Skip to content

Commit e343725

Browse files
committed
Merge PR 5, ci: restore aws-lc-rs crypto provider, use cargo-c for librustls 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).
1 parent 5f65a43 commit e343725

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/linux.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
crypto:
5353
- ring
5454
# aws-lc-sys v0.21.1 is not building due to compiler warnings
55-
# - aws-lc-rs
55+
- aws-lc-rs
5656
rustls-version:
5757
- v0.14.1
5858
- main
@@ -86,27 +86,27 @@ jobs:
8686
if: matrix.rustls-version != 'main'
8787
run: |
8888
cd $HOME/rustls-ffi
89-
make DESTDIR=$HOME/rustls-ffi/build/rust CRYPTO_PROVIDER=${{ matrix.crypto }} install
89+
make CFLAGS="" DESTDIR=$HOME/rustls-ffi/build/rust CRYPTO_PROVIDER=${{ matrix.crypto }} install
9090
9191
- name: Install cargo-c
9292
if: matrix.rustls-version == 'main'
9393
env:
94-
# Version picked for MSRV compat.
9594
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download/
9695
CARGO_C_FILE: cargo-c-x86_64-unknown-linux-musl.tar.gz
9796
run: |
9897
curl -L $LINK/$CARGO_C_FILE | tar xz -C ~/.cargo/bin
9998
100-
- name: 'build rustls-ffi (cmake)'
99+
- name: 'build rustls-ffi (cargo-c)'
101100
if: matrix.rustls-version == 'main'
102101
run: |
103102
cd $HOME/rustls-ffi
104-
cmake \
105-
-DCRYPTO_PROVIDER=${{matrix.crypto}} \
106-
-DDYN_LINK=on \
107-
-DCMAKE_BUILD_TYPE=Release \
108-
-S librustls -B build
109-
cmake --build build --config "Release"
103+
cargo capi install \
104+
--libdir lib \
105+
--prefix "$HOME/rustls-ffi/build/rust" \
106+
--release \
107+
--locked \
108+
--no-default-features \
109+
--features ${{ matrix.crypto }}
110110
111111
- name: 'install test prereqs'
112112
run: |

0 commit comments

Comments
 (0)