Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to workspace, move ech-fetch to separate crate, add ECH CI coverage #509

Merged
merged 9 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
-DDYN_LINK=${{matrix.dyn_link}} \
-DCMAKE_BUILD_TYPE=Debug \
${{ matrix.os == 'macos-latest' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=14.5' || '' }} \
-S . -B build
-S librustls -B build

- name: Build
run: cmake --build build
Expand All @@ -120,14 +120,20 @@ jobs:
- name: Build release binaries
run: |
cmake --build build -- clean
CC=${{matrix.cc}} CXX=${{matrix.cc}} cmake -S . -B build -DCRYPTO_PROVIDER=${{matrix.crypto}} -DCMAKE_BUILD_TYPE=Release
CC=${{matrix.cc}} CXX=${{matrix.cc}} cmake -S librustls -B build -DCRYPTO_PROVIDER=${{matrix.crypto}} -DCMAKE_BUILD_TYPE=Release
cmake --build build

- name: Verify release builds were not using ASAN
if: runner.os == 'Linux' # For 'nm'
run: |
! nm build/tests/client | grep '__asan_init'
! nm build/tests/server | grep '__asan_init'
! nm build/tests/server | grep '__asan_init'

- name: Run ECH connect test
if: matrix.crypto == 'aws-lc-rs' # No HPKE in ring
run: |
cmake --build build --target ech-test > ech-test.log
grep 'sni=encrypted' ech-test.log

# Our integration tests rely on a built-in provider being enabled.
# Double-check the library/unit tests work without any providers to
Expand All @@ -154,7 +160,7 @@ jobs:
curl -L $LINK/$CARGO_C_FILE | tar xz -C ~/.cargo/bin

- name: Setup cmake build
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release # No ASAN w/ Valgrind
run: cmake -S librustls -B build -DCMAKE_BUILD_TYPE=Release # No ASAN w/ Valgrind

- run: VALGRIND=valgrind cmake --build build --target integration-test

Expand Down Expand Up @@ -186,7 +192,7 @@ jobs:
cmake \
-DFIPS=true \
-DCMAKE_BUILD_TYPE=Release \
-S . -B build
-S librustls -B build

- name: Integration tests
run: cmake --build build --target integration-test
Expand Down Expand Up @@ -236,16 +242,25 @@ jobs:
powershell -Command "Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force"

- name: Configure CMake
run: cmake -DCRYPTO_PROVIDER="${{ matrix.crypto }}" -DCERT_COMPRESSION="${{ matrix.cert_compression }}" -DDYN_LINK="${{ matrix.dyn_link }}" -S . -B build
run: cmake -DCRYPTO_PROVIDER="${{ matrix.crypto }}" -DCERT_COMPRESSION="${{ matrix.cert_compression }}" -DDYN_LINK="${{ matrix.dyn_link }}" -S librustls -B build

- name: Build
run: cmake --build build --config "${{ matrix.config }}"

- name: Integration test
run: cmake --build build --config "${{matrix.config}}" --target integration-test

- name: Run ECH connect test
if: matrix.crypto == 'aws-lc-rs' # No HPKE in ring
run: |
cmake --build build --target ech-test > ech-test.log
grep 'sni=encrypted' ech-test.log

ensure-header-updated:
runs-on: ubuntu-latest
defaults:
run:
working-directory: librustls
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -265,7 +280,7 @@ jobs:

- run: cbindgen --version

- run: make src/rustls.h
- run: cbindgen > src/rustls.h

- run: git diff --exit-code

Expand Down Expand Up @@ -323,7 +338,7 @@ jobs:
run: pip install gersemi

- name: Setup cmake build
run: cmake -S . -B build
run: cmake -S librustls -B build

- name: Check formatting
run: cmake --build build --target format-check
Expand Down Expand Up @@ -387,7 +402,7 @@ jobs:
persist-credentials: false

- name: Clang tidy
run: clang-tidy tests/*.c -- -I src/
run: clang-tidy librustls/tests/*.c -- -I librustls/src/

miri:
name: Miri
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
target
/build
librustls/cmake-build*
.idea
.venv
.vs
.vs
Loading
Loading