Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mozilla/neqo into bin-udp
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Mar 14, 2024
2 parents 716ac26 + 2750423 commit 92e2f22
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 21 deletions.
7 changes: 3 additions & 4 deletions .github/actions/quic-interop-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ runs:
cd quic-interop-runner
jq --arg key "${{ inputs.name }}" --argjson newEntry '{"image": "${{ inputs.image }}", "url": "${{ inputs.url }}", "role": "${{ inputs.role }}"}' '.[$key] = $newEntry' implementations.json > temp.$$ && mv temp.$$ implementations.json
cat implementations.json
ARGS="--log-dir logs --must-include ${{ inputs.name }}"
ARGS="--log-dir logs --markdown --must-include ${{ inputs.name }}"
if [ -n "${{ inputs.client }}" ]; then
ARGS="$ARGS --client ${{ inputs.client }}"
fi
Expand All @@ -92,9 +92,8 @@ runs:
run: |
echo '[**QUIC Interop Runner**](https://github.com/quic-interop/quic-interop-runner)' >> comment
echo '' >> comment
echo '```' >> comment
cat quic-interop-runner/summary >> comment
echo '```' >> comment
# Ignore all, but table, which starts with "|:--".
cat quic-interop-runner/summary | awk '/^\|:--/{flag=1} flag' >> comment
echo '' >> comment
shell: bash

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:

- name: Install Rust tools
shell: bash
run: cargo +${{ inputs.version }} binstall --no-confirm cargo-llvm-cov cargo-nextest flamegraph cargo-hack
run: cargo +${{ inputs.version }} binstall --no-confirm cargo-llvm-cov cargo-nextest flamegraph cargo-hack cargo-mutants

# sccache slows CI down, so we leave it disabled.
# Leaving the steps below commented out, so we can re-evaluate enabling it later.
Expand Down
40 changes: 24 additions & 16 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ./target/criterion
key: criterion-${{ runner.os }}-${{ hashFiles('./target/criterion/**.json') }}
restore-keys: criterion-${{ runner.os }}-
key: criterion-${{ runner.name }}-${{ hashFiles('./target/criterion/**.json') }}
restore-keys: criterion-${{ runner.name }}-

# Disable turboboost, hyperthreading and use performance governor.
- name: Prepare machine
Expand Down Expand Up @@ -115,12 +115,33 @@ jobs:
perf report -i server/perf.data --no-children --stdio > server.perf.txt &
wait
- name: Format results as Markdown
id: results
run: |
{
echo "### Benchmark results"
echo
echo "Performance differences relative to $(cat target/criterion/baseline-sha.txt)."
echo
} > results.md
grep -Ev 'ignored|running \d+ tests|%\)' results.txt |\
sed -E -e 's/(Performance has regressed.)/:broken_heart: **\1**/gi' \
-e 's/(Performance has improved.)/:green_heart: **\1**/gi' \
-e 's/^ +/ /gi' \
-e 's/^([a-z0-9].*)$/* **\1**/gi' \
-e 's/(change:[^%]*% )([^%]*%)(.*)/\1**\2**\3/gi' \
>> results.md
- name: Remember main-branch push URL
if: github.ref == 'refs/heads/main'
run: echo "${{ github.sha }}" > target/criterion/baseline-sha.txt

- name: Cache main-branch results
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@v4
with:
path: ./target/criterion
key: ${{ steps.criterion-cache.outputs.cache-primary-key }}
key: criterion-${{ runner.name }}-${{ hashFiles('./target/criterion/**.json') }}

- name: Export perf data
id: export
Expand All @@ -135,19 +156,6 @@ jobs:
target/criterion*
compression-level: 9

- name: Format results as Markdown
id: results
run: |
echo '### Benchmark results' > results.md
grep -Ev 'ignored|running \d+ tests|%\)' results.txt |\
sed -E -e 's/(Performance has regressed.)/:broken_heart: **\1**/gi' \
-e 's/(Performance has improved.)/:green_heart: **\1**/gi' \
-e 's/^ +/ /gi' \
-e 's/^([a-z0-9].*)$/* **\1**/gi' \
-e 's/(change:[^%]*% )([^%]*%)(.*)/\1**\2**\3/gi' \
>> results.md
echo '' >> results.md
- name: Export PR comment data
uses: ./.github/actions/pr-comment-data-export
with:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/mutants.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Find mutants
on:
pull_request:
branches: ["main"]
paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
incremental-mutants:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Relative diff
run: git diff origin/${{ github.base_ref }}.. > pr.diff

- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get install -y --no-install-recommends gyp mercurial ninja-build lld
echo "RUSTFLAGS=-C link-arg=-fuse-ld=lld" >> "$GITHUB_ENV"
- name: Fetch and build NSS and NSPR
uses: ./.github/actions/nss

- name: Install Rust
uses: ./.github/actions/rust
with:
version: stable

- name: Mutants
run: cargo mutants --test-tool=nextest --no-shuffle -j 2 -vV --in-diff pr.diff

- name: Archive mutants.out
uses: actions/upload-artifact@v4
if: always()
with:
name: mutants-incremental.out
path: mutants.out

0 comments on commit 92e2f22

Please sign in to comment.