Skip to content
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
30 changes: 19 additions & 11 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ on:
pull_request:
branches: ["main"]
paths-ignore: ["*.md", "LICENSE-*"]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
check:
name: Continuous Integration
name: Continuous Integration (${{ matrix.rust }}, ${{ matrix.hpke }}, ${{ matrix.stream.name }})
runs-on: ubuntu-latest
env:
NSS_DIR: ${{ github.workspace }}/nss
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
strategy:
fail-fast: false
matrix:
Expand All @@ -25,9 +24,13 @@ jobs:
rust:
- 1.86.0 # MSRV
- stable

stream:
- name: stream-off
features: ""
- name: stream-on
features: ",stream"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Install Rust
uses: dtolnay/rust-toolchain@master
Expand Down Expand Up @@ -63,17 +66,22 @@ jobs:
- name: Fetch NSS and NSPR
if: matrix.hpke == 'nss'
run: |
hg clone https://hg.mozilla.org/projects/nspr "$NSS_DIR"/../nspr
git clone --depth 1 https://github.com/nss-dev/nss "$NSS_DIR"
git clone --depth 1 https://github.com/mozilla/nspr "$NSS_DIR"/../nspr
git clone --depth 1 https://github.com/mozilla/nss "$NSS_DIR"
echo "LD_LIBRARY_PATH=${{ github.workspace }}/dist/Debug/lib" >> "$GITHUB_ENV"

- name: Build
run: |
cargo +${{ matrix.rust }} build --tests --no-default-features --features ${{ matrix.hpke }},client,server
cargo +${{ matrix.rust }} build --tests --no-default-features --features client,server,${{ matrix.hpke }}${{ matrix.stream.features }}

- name: Run Tests
run: |
cargo +${{ matrix.rust }} test --no-default-features --features ${{ matrix.hpke }},client,server
cargo +${{ matrix.rust }} test --no-default-features --features client,server,${{ matrix.hpke }}${{ matrix.stream.features }}

- name: Check isolated OHTTP feature sets
run: |
cargo +${{ matrix.rust }} check -p ohttp --no-default-features --features ${{ matrix.hpke }}${{ matrix.stream.features }},client
cargo +${{ matrix.rust }} check -p ohttp --no-default-features --features ${{ matrix.hpke }}${{ matrix.stream.features }},server

- name: Check formatting
if: ${{ success() || failure() }}
Expand All @@ -83,4 +91,4 @@ jobs:
- name: Clippy
if: ${{ success() || failure() }}
run: |
cargo clippy --tests --no-default-features --features ${{ matrix.hpke }},client,server
cargo +${{ matrix.rust }} clippy --tests --no-default-features --features client,server,${{ matrix.hpke }}${{ matrix.stream.features }}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
resolver = "2"
resolver = "3"
members = [
"bhttp",
"bhttp-convert",
Expand Down
13 changes: 7 additions & 6 deletions ohttp/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,20 @@ mod nss {
"ghash-aes-x86_c_lib",
"ghash-aes-arm32-neon_c_lib",
"ghash-aes-aarch64_c_lib",
// NSS 3.129 adds new libraries
"pqcwrap_static",
"crux",
];

// Build rules are complex, so simply check the lib directory to see if
// any of the accelerator libraries were built to decide what to
// include. Check different variations of the filename to handle
// platform differences.
for libname in accel_libs {
let filename = if env::consts::OS == "windows" {
format!("{libname}.lib")
} else {
format!("lib{libname}.a")
};
if nsslibdir.join(filename).is_file() {
if [format!("{libname}.lib"), format!("lib{libname}.a")]
.iter()
.any(|f| nsslibdir.join(f).is_file())
{
static_libs.push(libname);
}
}
Expand Down