Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
toolchain: ${{ env.RUSTTOOLCHAIN }}

- name: Run cargo test
run: cargo test --verbose --all-targets --features=boringssl-boring-crate,${{ env.FEATURES }}
run: cargo test --verbose --all-targets --features=${{ env.FEATURES }}

# Need to run doc tests separately.
# (https://github.com/rust-lang/cargo/issues/6669)
- name: Run cargo doc test
run: cargo test --verbose --doc --features=boringssl-boring-crate,${{ env.FEATURES }}
run: cargo test --verbose --doc --features=${{ env.FEATURES }}

# NOTE: this is disabled as it fails when building changes that bump
# version of local crates (e.g. when doing a `qlog` release) that have not
Expand Down
68 changes: 45 additions & 23 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
strategy:
matrix:
tls-feature:
- "" # default, boringssl-vendored
- "boringssl-boring-crate"
- "" # default
- "openssl"
# Only run on "pull_request" event for external PRs. This is to avoid
# duplicate builds for PRs created from internal branches.
Expand Down Expand Up @@ -56,29 +55,29 @@ jobs:
echo "LD_LIBRARY_PATH=$PWD" >> "$GITHUB_ENV"

- name: Run cargo test
if: ${{ matrix.tls-feature == 'boringssl-boring-crate' }}
run: cargo test --verbose --all-targets --features=${{ matrix.tls-feature }} ${{ env.DEFAULT_OPTIONS }}
if: ${{ matrix.tls-feature == '' }}
run: cargo test --verbose --all-targets --no-default-features --features=${{ matrix.tls-feature }} ${{ env.DEFAULT_OPTIONS }}

# tokio-quiche requires the `boring` crate, so don't run its tests when
# building without it.
- name: Run cargo test
if: ${{ matrix.tls-feature != 'boringssl-boring-crate' }}
run: cargo test --verbose --all-targets --features=${{ matrix.tls-feature }} ${{ env.NO_BORING_OPTIONS }}
if: ${{ matrix.tls-feature != '' }}
run: cargo test --verbose --all-targets --no-default-features --features=${{ matrix.tls-feature }} ${{ env.NO_BORING_OPTIONS }}

# Need to run doc tests separately.
# (https://github.com/rust-lang/cargo/issues/6669)
- name: Run cargo doc test
if: ${{ matrix.tls-feature == 'boringssl-boring-crate' }}
run: cargo test --verbose --doc --features=${{ matrix.tls-feature }} ${{ env.DEFAULT_OPTIONS }}
if: ${{ matrix.tls-feature == '' }}
run: cargo test --verbose --doc --no-default-features --features=${{ matrix.tls-feature }} ${{ env.DEFAULT_OPTIONS }}

# Need to run doc tests separately.
# (https://github.com/rust-lang/cargo/issues/6669)
#
# tokio-quiche requires the `boring` crate, so don't run its tests when
# building without it.
- name: Run cargo doc test
if: ${{ matrix.tls-feature != 'boringssl-boring-crate' }}
run: cargo test --verbose --doc --features=${{ matrix.tls-feature }} ${{ env.NO_BORING_OPTIONS }}
if: ${{ matrix.tls-feature != '' }}
run: cargo test --verbose --doc --no-default-features --features=${{ matrix.tls-feature }} ${{ env.NO_BORING_OPTIONS }}

# NOTE: this is disabled as it fails when building changes that bump
# version of local crates (e.g. when doing a `qlog` release) that have not
Expand All @@ -88,10 +87,10 @@ jobs:
# run: cargo package --verbose --workspace --exclude=quiche_apps --allow-dirty

- name: Run cargo clippy
run: cargo clippy --features=${{ matrix.tls-feature }} ${{ env.DEFAULT_OPTIONS }} -- -D warnings
run: cargo clippy --no-default-features --features=${{ matrix.tls-feature }} ${{ env.DEFAULT_OPTIONS }} -- -D warnings

- name: Run cargo clippy on examples
run: cargo clippy --examples --features=${{ matrix.tls-feature }} ${{ env.DEFAULT_OPTIONS }} -- -D warnings
run: cargo clippy --examples --no-default-features --features=${{ matrix.tls-feature }} ${{ env.DEFAULT_OPTIONS }} -- -D warnings

- name: Run cargo doc
run: cargo doc --no-deps --all-features --document-private-items
Expand Down Expand Up @@ -199,17 +198,20 @@ jobs:

- name: Run cargo build
if: endsWith(matrix.target, '-gnu')
run: cargo build --target=${{ matrix.target }} --verbose --all-targets ${{ env.DEFAULT_OPTIONS }} --features=boringssl-boring-crate
run: cargo build --target=${{ matrix.target }} --verbose --all-targets ${{ env.DEFAULT_OPTIONS }}

- name: Run cargo test
if: endsWith(matrix.target, '-msvc')
run: cargo test --target=${{ matrix.target }} --verbose --all-targets ${{ env.DEFAULT_OPTIONS }} --features=boringssl-boring-crate
run: cargo test --target=${{ matrix.target }} --verbose --all-targets ${{ env.DEFAULT_OPTIONS }}

quiche_multiarch:
runs-on: ubuntu-latest
strategy:
matrix:
target: ["aarch64-unknown-linux-gnu","armv7-unknown-linux-gnueabihf","i686-unknown-linux-gnu"]
targets: [
["aarch64-unknown-linux-gnu", "arm64", "aarch64"],
["i686-unknown-linux-gnu", "i386", "i686"],
]
# Only run on "pull_request" event for external PRs. This is to avoid
# duplicate builds for PRs created from internal branches.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
Expand All @@ -223,15 +225,35 @@ jobs:
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTTOOLCHAIN }}
targets: ${{ matrix.targets[0] }}

- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main

- name: Install cross
run: cargo-binstall -y cross

- name: Run cargo test using cross
run: cross test --target=${{ matrix.target }} --verbose --all-targets ${{ env.NO_BORING_OPTIONS }}
- name: Debian cross setup ${{ matrix.targets[1] }}
run: |
QEMU_PACKAGES=""
if [[ "${{ matrix.targets[1] }}" != "i386" ]]; then
QEMU_PACKAGES="qemu-user libc6:${{ matrix.targets[1] }}"

sudo dpkg --add-architecture ${{ matrix.targets[1] }}
# In Ubuntu only ports have packages for other architectures
THE_ANIMAL_DJ=$(lsb_release -sc)
echo "
deb [arch=${{ matrix.targets[1] }}] http://ports.ubuntu.com/ubuntu-ports/ ${THE_ANIMAL_DJ} main restricted universe multiverse
deb [arch=${{ matrix.targets[1] }}] http://ports.ubuntu.com/ubuntu-ports/ ${THE_ANIMAL_DJ}-updates main restricted universe multiverse
deb [arch=${{ matrix.targets[1] }}] http://ports.ubuntu.com/ubuntu-ports/ ${THE_ANIMAL_DJ}-security main restricted universe multiverse
" | sudo tee /etc/apt/sources.list.d/cross-${{ matrix.targets[1] }}.list
sudo apt-get update || true

echo >> $GITHUB_ENV CARGO_TARGET_$(echo ${{ matrix.targets[0] }} | tr '[:lower:]-' '[:upper:]_')_RUNNER=qemu-${{ matrix.targets[2] }}
fi

sudo apt-get -y --no-install-recommends install crossbuild-essential-${{ matrix.targets[1] }} libclang-dev $QEMU_PACKAGES

echo >> $GITHUB_ENV CC=/usr/bin/${{ matrix.targets[2] }}-linux-gnu-gcc
echo >> $GITHUB_ENV CXX=/usr/bin/${{ matrix.targets[2] }}-linux-gnu-g++
echo >> $GITHUB_ENV CARGO_TARGET_$(echo ${{ matrix.targets[0] }} | tr '[:lower:]-' '[:upper:]_')_LINKER=/usr/bin/${{ matrix.targets[2] }}-linux-gnu-gcc

- name: Run cargo test ${{ matrix.targets[1] }}
run: cargo test --target=${{ matrix.targets[0] }} --verbose --all-targets ${{ env.NO_BORING_OPTIONS }}

http3_test:
runs-on: ubuntu-latest
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
[submodule "boringssl"]
path = quiche/deps/boringssl
url = https://github.com/google/boringssl.git
ignore = dirty
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY quiche/ ./quiche/
COPY task-killswitch ./task-killswitch/
COPY tokio-quiche ./tokio-quiche/

RUN apt-get update && apt-get install -y cmake && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y clang cmake && rm -rf /var/lib/apt/lists/*

RUN cargo build --release --manifest-path apps/Cargo.toml

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,17 @@ cargo can also be used to run the testsuite:
Note that [BoringSSL], which is used to implement QUIC's cryptographic handshake
based on TLS, needs to be built and linked to quiche. This is done automatically
when building quiche using cargo, but requires the `cmake` command to be
available during the build process. On Windows you also need
[NASM](https://www.nasm.us/). The [official BoringSSL
available during the build process.

On Windows [NASM](https://www.nasm.us/) is also required. The [official BoringSSL
documentation](https://github.com/google/boringssl/blob/master/BUILDING.md) has
more details.

In alternative you can use your own custom build of BoringSSL by configuring
the BoringSSL directory with the ``QUICHE_BSSL_PATH`` environment variable:
In alternative you can use your own custom build of BoringSSL by configuring the
BoringSSL directory with the ``BORING_BSSL_PATH`` environment variable:

```bash
$ QUICHE_BSSL_PATH="/path/to/boringssl" cargo build --examples
$ BORING_BSSL_PATH="/path/to/boringssl" cargo build --examples
```

Alternatively you can use [OpenSSL/quictls]. To enable quiche to use this vendor
Expand Down
3 changes: 0 additions & 3 deletions apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ fuzzing = ["quiche/fuzzing"]
# Enable qlog support.
qlog = ["quiche/qlog"]

# Use BoringSSL provided by the boring crate.
boringssl-boring-crate = ["quiche/boringssl-boring-crate"]

# Enable sfv support.
sfv = ["quiche/sfv"]

Expand Down
14 changes: 2 additions & 12 deletions quiche/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,14 @@ include = [
"/*.md",
"/*.toml",
"/COPYING",
"/deps/boringssl/**/*.[chS]",
"/deps/boringssl/**/*.asm",
"/deps/boringssl/src/**/*.cc",
"/deps/boringssl/**/CMakeLists.txt",
"/deps/boringssl/**/sources.cmake",
"/deps/boringssl/LICENSE",
"/examples",
"/include",
"/quiche.svg",
"/src",
]

[features]
default = ["boringssl-vendored"]

# Build the vendored BoringSSL library.
boringssl-vendored = []
default = ["boringssl-boring-crate"]

# Use the BoringSSL library provided by the boring crate.
boringssl-boring-crate = ["boring", "foreign-types-shared"]
Expand Down Expand Up @@ -60,11 +51,10 @@ tag-prefix = ""

[package.metadata.docs.rs]
no-default-features = true
features = ["boringssl-boring-crate", "qlog"]
features = ["qlog"]
rustdoc-args = ["--cfg", "docsrs"]

[build-dependencies]
cmake = "0.1"
pkg-config = { version = "0.3", optional = true }
cdylib-link-lines = { version = "0.1", optional = true }

Expand Down
1 change: 0 additions & 1 deletion quiche/deps/boringssl
Submodule boringssl deleted from f1c753
Loading
Loading