name: Netem Interop on: push: branches: - main pull_request: branches: - main workflow_dispatch: permissions: contents: read env: CARGO_TERM_COLOR: always GOBIN: ${{ github.workspace }}/.tools/bin IRTT_UPSTREAM_VERSION: v0.9.1 jobs: netem: name: netem interop runs-on: ubuntu-latest timeout-minutes: 25 steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: persist-credentials: false - name: Install Rust toolchain uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2 with: cache: false - name: Install Go toolchain uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: go-version: '1.27.3' cache: false - name: Install netem dependencies run: | sudo apt-get update sudo apt-get install -y --no-install-recommends iproute2 python3 - name: Check host tools and network administration access run: | ip -V tc -V go version # Exercise the namespace, veth, and qdisc operations the harness needs. # sudo/NET_ADMIN alone do not establish mount/namespace permissions. sudo -n bash -euo pipefail <<'SH' probe_ns="irtt-preflight-$$" ip netns add "$probe_ns" trap 'ip netns delete "$probe_ns"' EXIT ip netns exec "$probe_ns" sh -ec ' ip link add probe0 type veth peer name probe1 tc qdisc add dev probe0 root netem delay 1ms ' SH - name: Install upstream irtt run: | mkdir -p "$GOBIN" go install "github.com/heistp/irtt/cmd/irtt@${IRTT_UPSTREAM_VERSION}" "$GOBIN/irtt" version - name: Build irtt-rs client run: cargo build -p irtt-rs --bin irtt-client --locked - name: Run netem interop comparisons run: | python3 scripts/run_netem_interop_ci.py \ --all \ --skip-build \ --upstream-irtt "$GOBIN/irtt" \ --irtt-rs-command "$PWD/target/debug/irtt-client" - name: Append netem interop summary if: always() run: | latest_summary="$(find target/interop-netem -mindepth 2 -maxdepth 2 -name github-step-summary.md -type f -print 2>/dev/null | sort | tail -n 1)" if [ -n "$latest_summary" ]; then cat "$latest_summary" >> "$GITEA_STEP_SUMMARY" else echo "No netem interop github-step-summary.md found." >> "$GITEA_STEP_SUMMARY" fi - name: Upload netem interop artifacts if: always() uses: https://gitea.com/actions/gitea-upload-artifact@v7 with: name: interop-netem path: target/interop-netem