Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mozilla/neqo into release-v…
Browse files Browse the repository at this point in the history
…0.9.1
  • Loading branch information
mxinden committed Oct 3, 2024
2 parents 258a1a2 + 12ff014 commit d19dda2
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/actions/nss/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ runs:
- name: Checkout NSS
if: env.USE_SYSTEM_NSS == '0'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
repository: nss-dev/nss
path: nss

- name: Checkout NSPR
if: env.USE_SYSTEM_NSS == '0'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
repository: nss-dev/nspr
path: nspr
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/quic-interop-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
using: "composite"
steps:
- name: Checkout quic-interop/quic-interop-runner repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
repository: 'quic-interop/quic-interop-runner'
path: 'quic-interop-runner'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:

steps:
- name: Checkout neqo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Checkout msquic
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
repository: microsoft/msquic
ref: main
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- uses: ./.github/actions/rust
with:
version: ${{ matrix.rust-toolchain }}
components: ${{ matrix.rust-toolchain == 'stable' && 'llvm-tools-preview' || '' }}
components: ${{ matrix.rust-toolchain == 'stable' && 'llvm-tools-preview' || matrix.rust-toolchain == 'nightly' && 'rust-src' || '' }}
tools: ${{ matrix.rust-toolchain == 'stable' && 'cargo-llvm-cov, ' || '' }} cargo-nextest
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -103,6 +103,24 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: matrix.type == 'debug' && matrix.rust-toolchain == 'stable'

- name: Run tests with sanitizers
if: (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest') && matrix.rust-toolchain == 'nightly'
env:
RUST_LOG: trace
run: |
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
TARGET="x86_64-unknown-linux-gnu"
SANITIZERS="address thread leak"
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
TARGET="aarch64-apple-darwin"
# no leak sanitizer support yet
SANITIZERS="address thread"
fi
for sanitizer in $SANITIZERS; do
echo "Running tests with $sanitizer sanitizer..."
RUSTFLAGS="-Z sanitizer=$sanitizer" RUSTDOCFLAGS="-Z sanitizer=$sanitizer" cargo +nightly nextest run -Z build-std --features ci --target "$TARGET"
done
bench:
needs: [check]
if: >
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./.github/actions/rust
with:
components: clippy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
with:
base-ref: ${{ github.event.pull_request.base.sha || 'main' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/firefox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Check out Neqo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Maximize build space
if: runner.os == 'Linux'
Expand All @@ -54,7 +54,7 @@ jobs:
df -h
- name: Check out Firefox
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
repository: mozilla/gecko-dev
path: mozilla-unified
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
needs: firefox
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzz-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fuzz-bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./.github/actions/rust
with:
version: nightly
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/machete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
machete:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Install Rust
uses: ./.github/actions/rust
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mutants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
mutants:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
github.event.workflow_run.event == 'pull_request' &&
(github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure')
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./.github/actions/pr-comment
with:
name: ${{ github.event.workflow_run.name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/qns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
echo "client=$(echo "$PAIR" | cut -d% -f1)" >> "$GITHUB_OUTPUT"
echo "server=$(echo "$PAIR" | cut -d% -f2)" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

# TODO: Replace once https://github.com/quic-interop/quic-interop-runner/pull/356 is merged.
- uses: ./.github/actions/quic-interop-runner
Expand All @@ -161,7 +161,7 @@ jobs:
runs-on: ubuntu-latest
if: always()
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: '*results'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./.github/actions/rust
with:
version: nightly
Expand Down
8 changes: 8 additions & 0 deletions neqo-common/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,12 @@ fn main() {
if target.contains("windows") {
println!("cargo:rustc-link-lib=winmm");
}

// `cfg(sanitize = "..")` is not stabilized.
//
// See <https://doc.rust-lang.org/stable/unstable-book/language-features/cfg-sanitize.html>.
println!("cargo:rustc-check-cfg=cfg(neqo_sanitize)");
if env::var("CARGO_CFG_SANITIZE").is_ok() {
println!("cargo:rustc-cfg=neqo_sanitize");
}
}
4 changes: 3 additions & 1 deletion neqo-common/src/hrtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ impl Drop for Time {
// inaccuracies are too high to pass the tests.
#[cfg(all(
test,
not(all(any(target_os = "macos", target_os = "windows"), feature = "ci"))
not(all(any(target_os = "macos", target_os = "windows"), feature = "ci")),
// Sanitizers are too slow to uphold timing assumptions.
not(neqo_sanitize),
))]
mod test {
use std::{
Expand Down

0 comments on commit d19dda2

Please sign in to comment.