Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,13 @@ ignore = [
# a compatible bump; the affected methods are not exercised by our stack.
"RUSTSEC-2026-0002",
"RUSTSEC-2026-0253",

# RUSTSEC-2026-0620 — curve25519-dalek 4.1.3, scalar-multiplication bug in the AVX-512 backend. The fix is
# only in curve25519-dalek 5.1.0, which needs ed25519-dalek 3 and x25519-dalek 3 (direct dependencies of
# transferd-crypto, both 2.x now): a major bump with API changes, not a lockfile bump. The bug is reached only
# when the crate is compiled on nightly on an AVX-512 CPU (runtime backend selection), so stable builds and the
# release binaries are not affected. The nightly fuzz smoke job is the one to watch. Time-boxed: remove by
# 2026-12-31 through the ed25519-dalek 3 / x25519-dalek 3 migration of transferd-crypto. Deadline tracked by the
# maintainer.
"RUSTSEC-2026-0620",
]
20 changes: 20 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
# Runs the fast local checks before each commit: preflight (tools, lockfile, line endings, staged changes,
# secrets) and the pipeline's own tests. Full reference: docs/LOCAL_CI.md.
# Skip once with: git commit --no-verify
set -eu

PY=""
for candidate in python3 python "py -3"; do
if $candidate -c 'import sys; raise SystemExit(sys.version_info < (3, 11))' >/dev/null 2>&1; then
PY=$candidate
break
fi
done
if [ -z "$PY" ]; then
echo "pre-commit: Python 3.11 or newer is needed for the local checks (skip once: git commit --no-verify)" >&2
exit 1
fi

cd "$(git rev-parse --show-toplevel)"
exec $PY ci/ci.py run --profile precommit
20 changes: 20 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
# Runs the checks before each push: the workflow's Rust checks (fmt, clippy, tests), the Python tests with
# interop, and the pipeline's own tests. The full profile (GUI, TypeScript, audit) runs nightly or by hand.
# Full reference: docs/LOCAL_CI.md. Skip once with: git push --no-verify
set -eu

PY=""
for candidate in python3 python "py -3"; do
if $candidate -c 'import sys; raise SystemExit(sys.version_info < (3, 11))' >/dev/null 2>&1; then
PY=$candidate
break
fi
done
if [ -z "$PY" ]; then
echo "pre-push: Python 3.11 or newer is needed for the local checks (skip once: git push --no-verify)" >&2
exit 1
fi

cd "$(git rev-parse --show-toplevel)"
exec $PY ci/ci.py run --profile prepush
42 changes: 32 additions & 10 deletions .github/workflows/core-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings

# Every job runs on the project's own self-hosted runners, never on a GitHub-hosted machine: Linux, plus the
# Windows leg of the build. The repository is public, so a pull request from a fork must never run on a
# self-hosted runner: each job below checks that the pull request comes from this repository. Runners must be
# registered before any job starts; until one is, jobs stay queued.
#
# Everything in this workflow builds from this repository alone. No GUI toolkit,
# no daemon, no system libraries beyond the Rust toolchain.
jobs:
check:
name: format, clippy, tests
runs-on: ubuntu-latest
runs-on: [self-hosted, Linux, X64]
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -32,20 +38,33 @@ jobs:
- run: cargo test --workspace --all-features

build:
name: build relay binaries (${{ matrix.os }})
name: build relay binaries (${{ matrix.label }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
include:
- label: Linux
artifact: linux
runs_on: '["self-hosted", "Linux", "X64"]'
# The Windows leg needs the MSVC toolchain (Visual Studio Build Tools, C++ workload), which only the msvc runners have.
- label: Windows
artifact: windows
runs_on: '["self-hosted", "Windows", "X64", "msvc"]'
# macOS is not built here: there is no macOS self-hosted runner yet. Add it back when one is registered.
runs-on: ${{ fromJSON(matrix.runs_on) }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# The Windows runner shares this PC's memory: two parallel compile jobs stay inside the paging file.
- if: runner.os == 'Windows'
shell: pwsh
run: echo "CARGO_BUILD_JOBS=2" >> $env:GITHUB_ENV
- run: cargo build --release -p relayd -p transferd-relay -p transferd-cat
- uses: actions/upload-artifact@v4
with:
name: transferd-core-${{ matrix.os }}
name: transferd-core-${{ matrix.artifact }}
path: |
target/release/relayd*
target/release/relayd-ws*
Expand All @@ -54,7 +73,8 @@ jobs:

fuzz:
name: fuzz smoke (relay protocol parser)
runs-on: ubuntu-latest
runs-on: [self-hosted, Linux, X64]
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
Expand All @@ -64,7 +84,8 @@ jobs:

python:
name: python (tests, including interop with the reference)
runs-on: ubuntu-latest
runs-on: [self-hosted, Linux, X64]
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -82,7 +103,8 @@ jobs:

typescript:
name: typescript (tests, including interop with the reference)
runs-on: ubuntu-latest
runs-on: [self-hosted, Linux, X64]
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -102,8 +124,8 @@ jobs:

audit:
name: dependency audit
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
runs-on: [self-hosted, Linux, X64]
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand Down
Loading
Loading