mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-21 10:43:25 +00:00
058aaab548
## Description When we are NAT probing and we are sending a PATH_RESPONSE as a client, we include a PATH_CHALLENGE. This ensures that if the peer got through the firewall first that the client immediately gets through as well and can open the path. Speeding up NAT traversal. ## Breaking Changes n/a ## Notes & open questions Closes #570. Also fixes an oversight from before: we were still consuming CIDs for off-path responses. For now we want to not do that. ## Change checklist - [x] Self-review. --------- Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
92 lines
2.6 KiB
YAML
92 lines
2.6 KiB
YAML
name: iroh-patchbay
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: iroh-patchbay-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
SCCACHE_CACHE_SIZE: "10G"
|
|
IROH_FORCE_STAGING_RELAYS: "1"
|
|
NEXTEST_VERSION: "0.9.80"
|
|
|
|
jobs:
|
|
iroh_patchbay:
|
|
name: iroh patchbay
|
|
timeout-minutes: 30
|
|
runs-on: [self-hosted, linux, X64]
|
|
env:
|
|
RUSTC_WRAPPER: "sccache"
|
|
steps:
|
|
- name: Enable unprivileged user namespaces
|
|
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
|
continue-on-error: true
|
|
|
|
- name: Checkout noq
|
|
uses: actions/checkout@v6
|
|
with:
|
|
path: noq
|
|
|
|
- name: Checkout iroh
|
|
uses: actions/checkout@v6
|
|
with:
|
|
repository: n0-computer/iroh
|
|
ref: main
|
|
path: iroh
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: mozilla-actions/sccache-action@v0.0.9
|
|
- name: Install cargo-make and cargo-nextest
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: nextest@${{ env.NEXTEST_VERSION }},cargo-make
|
|
|
|
- name: Patch noq crates in iroh workspace
|
|
working-directory: iroh
|
|
run: |
|
|
# Delete any pre-existing trailing patch section. This
|
|
# assumes the patch section is trailing and the only reason
|
|
# there would be any patch is because of noq. Could be
|
|
# smarter.
|
|
mv Cargo.toml Cargo.toml.in
|
|
awk 'BEGIN { in_patch = 0 }; /\[patch\.crates-io\]/ { in_patch = 1 }; !in_patch { print }' Cargo.toml.in > Cargo.toml
|
|
|
|
# Add our own patch section.
|
|
cat >> Cargo.toml <<'EOF'
|
|
|
|
[patch.crates-io]
|
|
noq = { path = "../noq/noq" }
|
|
noq-proto = { path = "../noq/noq-proto" }
|
|
noq-udp = { path = "../noq/noq-udp" }
|
|
EOF
|
|
|
|
- name: Build patchbay tests
|
|
working-directory: iroh
|
|
run: cargo make patchbay --no-run
|
|
|
|
- name: Run patchbay tests
|
|
working-directory: iroh
|
|
run: |
|
|
set -o pipefail
|
|
cargo make patchbay 2>&1 | tee "$RUNNER_TEMP/logs.txt"
|
|
env:
|
|
PATCHBAY_LOG: ${{ runner.debug && 'trace' || 'debug' }}
|
|
RUST_LOG: ${{ runner.debug && 'trace' || 'debug' }}
|
|
|
|
- name: Upload test results
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: iroh-patchbay-testdir-${{ github.sha }}
|
|
path: |
|
|
iroh/target/testdir-*/
|
|
${{ runner.temp }}/logs.txt
|
|
retention-days: 7
|
|
if-no-files-found: ignore
|