build(deps): update winnow requirement from =0.4.1 to =0.5.11 #2199
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
name: netbench | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
RUSTUP_MAX_RETRIES: 10 | |
RUST_BACKTRACE: 1 | |
# Pin the nightly toolchain to prevent breakage. | |
# This should be occasionally updated. | |
RUST_NIGHTLY_TOOLCHAIN: nightly-2022-09-15 | |
CDN: https://dnglbrstg7yg.cloudfront.net | |
# By default depandabot only receives read permissions. Explicitly give it write | |
# permissions which is needed by the ouzi-dev/commit-status-updater task. | |
# | |
# Updating status is relatively safe (doesnt modify source code) and caution | |
# should we taken before adding more permissions. | |
permissions: | |
statuses: write | |
jobs: | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/[email protected] | |
id: toolchain | |
with: | |
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }} | |
profile: minimal | |
override: true | |
components: rustfmt | |
- name: Run cargo fmt | |
uses: actions-rs/[email protected] | |
with: | |
command: fmt | |
args: --manifest-path netbench/Cargo.toml --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- toolchain: stable | |
# fail on stable warnings | |
args: "-D warnings" | |
- toolchain: beta | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/[email protected] | |
id: toolchain | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
profile: minimal | |
override: true | |
components: clippy | |
- uses: camshaft/rust-cache@v1 | |
# TODO translate json reports to in-action warnings | |
- name: Run cargo clippy | |
uses: actions-rs/[email protected] | |
with: | |
command: clippy | |
# deriving Eq may break API compatibility so we disable it | |
# See https://github.com/rust-lang/rust-clippy/issues/9063 | |
args: --manifest-path netbench/Cargo.toml --all-features --all-targets -- -A clippy::derive_partial_eq_without_eq ${{ matrix.args }} | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- uses: actions-rs/[email protected] | |
id: toolchain | |
with: | |
toolchain: 1.67.0 | |
override: true | |
- uses: camshaft/rust-cache@v1 | |
- name: Restore fuzz corpus | |
shell: bash | |
run: | | |
find . -name 'corpus.tar.gz' -exec dirname {} ';' | xargs -L 1 bash -c 'cd "$0" && rm -rf corpus && tar xf corpus.tar.gz' | |
- name: Run cargo build | |
uses: actions-rs/[email protected] | |
with: | |
command: build | |
args: --manifest-path netbench/Cargo.toml --tests | |
- name: Run cargo test | |
uses: actions-rs/[email protected] | |
with: | |
command: test | |
args: --manifest-path netbench/Cargo.toml | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
scenarios: ${{ steps.scenarios.outputs.scenarios }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/[email protected] | |
id: toolchain | |
with: | |
toolchain: 1.67.0 | |
override: true | |
- uses: camshaft/rust-cache@v1 | |
- name: Run cargo build | |
uses: actions-rs/[email protected] | |
with: | |
command: build | |
args: --manifest-path netbench/Cargo.toml --release | |
- name: Generate scenarios | |
id: scenarios | |
run: | | |
./netbench/target/release/netbench-scenarios \ | |
--request_response.response_size=8GiB | |
SCENARIOS=$(find target/netbench -type f -exec basename -s .json {} \; | jq -Rcs 'rtrimstr("\n") | split("\n")') | |
echo "::set-output name=scenarios::$SCENARIOS" | |
- name: Prepare artifact | |
run: | | |
mkdir -p artifact | |
cp -r target/netbench artifact/scenarios | |
cp netbench/target/release/netbench* artifact | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: netbench | |
path: artifact | |
run-localhost: | |
runs-on: ubuntu-latest | |
needs: [build] | |
strategy: | |
fail-fast: false | |
matrix: | |
driver: | |
- s2n-quic | |
- native-tls | |
- tcp | |
- s2n-tls | |
scenario: ${{ fromJson(needs.build.outputs.scenarios) }} | |
env: | |
SCENARIO: scenarios/${{ matrix.scenario }}.json | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: netbench | |
path: . | |
- name: Prepare artifact | |
run: | | |
chmod +x ./netbench* | |
mkdir -p results/${{ matrix.scenario }}/${{ matrix.driver }} | |
- name: Install bpftrace | |
run: | | |
sudo docker pull quay.io/iovisor/bpftrace:master-vanilla_llvm_clang_glibc2.27 | |
sudo docker run -v $(pwd):/output quay.io/iovisor/bpftrace:master-vanilla_llvm_clang_glibc2.27 \ | |
/bin/bash -c "cp /usr/bin/bpftrace /output" | |
sudo chown root:root bpftrace | |
sudo chmod +x bpftrace | |
sudo mv bpftrace /usr/bin/ | |
- name: Setup environment | |
run: | | |
# set larger socket buffers | |
sudo sysctl -w net.core.wmem_default=2000000 | |
sudo sysctl -w net.core.rmem_default=2000000 | |
- name: Run server | |
run: | | |
sudo SCENARIO=$SCENARIO S2N_UNSTABLE_CRYPTO_OPT_TX=1 S2N_UNSTABLE_CRYPTO_OPT_RX=1 ./netbench-collector \ | |
./netbench-driver-${{ matrix.driver }}-server > results/${{ matrix.scenario }}/${{ matrix.driver }}/server.json & | |
- name: Run client | |
run: | | |
export SERVER_0=localhost:4433 | |
sudo SCENARIO=$SCENARIO SERVER_0=$SERVER_0 S2N_UNSTABLE_CRYPTO_OPT_TX=1 S2N_UNSTABLE_CRYPTO_OPT_RX=1 ./netbench-collector \ | |
./netbench-driver-${{ matrix.driver }}-client > results/${{ matrix.scenario }}/${{ matrix.driver }}/client.json | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: netbench-${{ matrix.driver }}-results | |
path: results | |
report: | |
runs-on: ubuntu-latest | |
needs: [run-localhost] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
path: . | |
- name: Generate reports | |
run: | | |
chmod +x ./netbench/netbench* | |
mkdir -p results | |
cp -R netbench-*-results/* results/ | |
./netbench/netbench-cli report-tree results reports | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: netbench-report | |
path: reports | |
- uses: aws-actions/[email protected] | |
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-1 | |
- name: Upload results | |
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | |
id: s3 | |
run: | | |
TARGET="${{ github.sha }}/netbench" | |
aws s3 sync reports "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks | |
URL="$CDN/$TARGET/index.html" | |
echo "::set-output name=URL::$URL" | |
- uses: ouzi-dev/[email protected] | |
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | |
with: | |
name: "netbench / report" | |
status: "success" | |
url: "${{ steps.s3.outputs.URL }}" |