Skip to content

Commit 38b912a

Browse files
authored
Release 1.226.0
2 parents 48d1c12 + 65b8dd1 commit 38b912a

1,930 files changed

Lines changed: 198220 additions & 30315 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/audit.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
ignore = [
88
# capnp unsound APIs, transitive via hypersync-client, awaiting upstream fix
99
"RUSTSEC-2025-0143",
10+
# paste unmaintained, transitive via alloy
11+
"RUSTSEC-2024-0436",
12+
# rand 0.8.5 unsoundness, transitive build-time only via pyo3-stub-gen
13+
"RUSTSEC-2026-0097",
1014
# rsa Marvin Attack, transitive via sqlx-mysql, no fix available
1115
"RUSTSEC-2023-0071",
1216
]

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ rustflags = [
1010

1111
[target.'cfg(target_os = "linux")']
1212
rustflags = [
13+
"-C",
14+
"link-arg=-fuse-ld=lld",
1315
"-C",
1416
"link-arg=-Wl,--gc-sections",
1517
"-C",

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
[codespell]
55
# Comma-separated list of words to ignore
6-
ignore-words-list = ACN,ALO,Alo,allTime,BadAloPx,CapTable,arange,crate,datas,deques,disjointness,HIGHTER,Implementors,ot,pre,ser,socio-economic,Superseed,SUPERSEED,trough,usIn,zar
6+
ignore-words-list = ACN,ALO,Alo,allTime,BadAloPx,CapTable,arange,crate,datas,deques,disjointness,HIGHTER,Implementors,ot,pre,ser,socio-economic,Superseed,SUPERSEED,te,trough,usIn,zar

.docker/DockerfileUbuntu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ ENV CXX="clang++"
2929
RUN apt-get update && apt-get install -y \
3030
curl \
3131
clang \
32+
lld \
3233
git \
3334
pkg-config \
3435
make \

.docker/nautilus_trader.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ FROM base AS builder
1717

1818
# Install build deps
1919
RUN apt-get update && \
20-
apt-get install -y curl clang git make pkg-config capnproto libcapnp-dev && \
20+
apt-get install -y curl clang lld git make pkg-config capnproto libcapnp-dev && \
2121
apt-get clean && \
2222
rm -rf /var/lib/apt/lists/*
2323

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# =============================================================================
1212
/.github/workflows/ @nautechsystems/core
1313
/.github/actions/ @nautechsystems/core
14-
/.github/dependabot.yml @nautechsystems/core
1514
/.github/CODEOWNERS @nautechsystems/core
1615

1716
# =============================================================================

.github/OVERVIEW.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CI/CD, testing, publishing, and automation within the NautilusTrader repository.
99
## Composite actions (`.github/actions`)
1010

1111
- **cargo-tool-install**: installs cargo tools (cargo-deny, cargo-vet) with caching.
12-
- **common-setup**: prepares the environment (OS packages, Rust toolchain, Rust cache, Python, pre-commit, swap space).
12+
- **common-setup**: prepares the environment (OS packages, Rust toolchain, Rust cache, Python, prek, swap space).
1313
- **common-test-data**: caches large test data under `tests/test_data/large`.
1414
- **common-wheel-build**: builds and installs Python wheels across Linux, macOS, and Windows for multiple Python versions.
1515
- **install-capnp**: installs the Cap'n Proto compiler with caching across Linux, macOS, and Windows.
@@ -24,11 +24,11 @@ CI/CD, testing, publishing, and automation within the NautilusTrader repository.
2424
- **cli-binaries.yml**: builds and publishes CLI binaries for multiple platforms.
2525
- **codeql-analysis.yml**: CodeQL security scans for Python and Rust on PRs and via cron.
2626
- **copilot-setup-steps.yml**: environment setup for GitHub Copilot coding agent.
27-
- **coverage.yml**: coverage report generation for the `nightly` branch.
27+
- **coverage.yml**: coverage report generation, currently paused and runs only on `workflow_dispatch`.
2828
- **docker.yml**: builds and pushes multi-platform Docker images (`nautilus_trader`, `jupyterlab`) using Buildx and native ARM runners.
2929
- **nightly-docs-features-check.yml**: nightly docs.rs build checks and crate feature compatibility verification.
3030
- **nightly-merge.yml**: auto-merges `develop` into `nightly` when CI succeeds.
31-
- **nightly-tests.yml**: extended test suites (turmoil network tests) that are too slow for PR builds.
31+
- **nightly-tests.yml**: extended test suites too slow for PR builds - turmoil network tests plus macOS, Windows, and Linux ARM build-and-test jobs that run daily at 12:00 UTC to give early visibility on develop before `nightly-merge` at 14:00 UTC.
3232
- **performance.yml**: Rust/Python benchmarks on `nightly`, reporting to CodSpeed.
3333
- **security-audit.yml**: nightly supply chain security checks (cargo-audit, cargo-deny, cargo-vet, osv-scanner).
3434
- **trigger-reindexing.yml**: triggers documentation reindexing for search.
@@ -45,7 +45,7 @@ CI/CD, testing, publishing, and automation within the NautilusTrader repository.
4545
### Dependency security
4646

4747
- **cargo-deny**: Rust dependency auditing for security advisories (RUSTSEC/GHSA), license compliance, banned crates, and supply chain integrity. Configuration in `deny.toml`.
48-
- **Dependency pinning**: Key tools (pre-commit, Python versions, Rust toolchain, cargo-nextest, uv) are locked to fixed versions or SHAs. The uv version is pinned via `required-version` in `pyproject.toml` and extracted by `scripts/uv-version.sh` for CI, Docker, and local builds.
48+
- **Dependency pinning**: Key tools (prek, Python versions, Rust toolchain, cargo-nextest, uv) are locked to fixed versions or SHAs. The uv version is pinned via `required-version` in `pyproject.toml` and extracted by `scripts/uv-version.sh` for CI, Docker, and local builds.
4949
- **Dependency cooldown**: Python dependency resolution excludes packages published within the last 3 days (`exclude-newer = "3 days"` in `[tool.uv]`). This gives the community time to detect and quarantine compromised releases before they enter the lockfile.
5050
- **Code scanning**: CodeQL is enabled for continuous security analysis of Python and Rust code on all PRs and weekly via cron.
5151

@@ -54,7 +54,7 @@ CI/CD, testing, publishing, and automation within the NautilusTrader repository.
5454
- **Build attestations**: All published artifacts include cryptographic SLSA build provenance attestations, linking each artifact to a specific commit SHA. Verify via `gh attestation verify`.
5555
- **Immutable action pinning**: All third-party GitHub Actions are pinned to specific commit SHAs.
5656
- **Docker image pinning**: Base images in Dockerfiles and service containers in workflows are pinned to SHA256 digests to prevent supply-chain attacks via tag mutation.
57-
- **Caching**: Rust target directory cache (`Swatinem/rust-cache`), pip/site-packages, pre-commit, and test data caches speed up workflows while preserving hermetic (reproducible) builds. Rust cache saves are restricted to push events to prevent PR cache pollution.
57+
- **Caching**: Rust target directory cache (`Swatinem/rust-cache`), prek hook environments, and test data caches speed up workflows while preserving hermetic (reproducible) builds. Rust cache saves are restricted to push events to prevent PR cache pollution.
5858
- **Concurrency**: PR CI runs are cancelled when a new push arrives to the same PR. Push events to mainline branches are never cancelled.
5959
- **Runners**: Linux and Windows builds use Depot 8-core runners (32 GB RAM, 150 GB SSD). macOS builds use GitHub free runners. Lightweight jobs (plan, cargo-deny, cargo-vet, publish) use GitHub free runners. Custom runner labels are declared in `.github/actionlint.yaml`.
6060

.github/actionlint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ self-hosted-runner:
55
- depot-windows-2022-8
66
- depot-macos-14
77
- depot-macos-15
8+
- self-hosted-linux-x86
9+
- build
10+
- build-v2

.github/actions/cargo-tool-install/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ runs:
3131

3232
# https://github.com/actions-rust-lang/setup-rust-toolchain
3333
- name: Set up Rust toolchain
34-
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2
34+
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4
3535
with:
3636
toolchain: ${{ env.TOOLCHAIN }}
3737
override: true
3838

3939
# https://github.com/actions/cache
4040
- name: Cache tool binary
41-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
41+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
4242
with:
4343
path: ${{ runner.tool_cache }}/${{ inputs.tool-name }}
4444
key: ${{ inputs.tool-name }}-bin-${{ env.TOOL_VERSION }}-${{ runner.os }}-${{ env.TOOLCHAIN }}

.github/actions/common-setup/action.yml

Lines changed: 82 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,40 @@ inputs:
2929
description: Whether to save the Rust cache (set to false for read-only cache on PR builds)
3030
required: false
3131
default: "true"
32+
rust-cache-enabled:
33+
description: >-
34+
Whether to invoke Swatinem/rust-cache at all (set to false on self-hosted
35+
runners using a persistent on-disk CARGO_TARGET_DIR).
36+
required: false
37+
default: "true"
38+
uv-cache-enabled:
39+
description: >-
40+
Whether to persist the uv cache with GitHub Actions cache: true, false, or
41+
auto (enabled on GitHub-hosted runners, disabled on self-hosted runners).
42+
required: false
43+
default: "auto"
44+
prek-cache-enabled:
45+
description: >-
46+
Whether to persist the prek cache with GitHub Actions cache: true, false, or
47+
auto (enabled on GitHub-hosted runners, disabled on self-hosted runners).
48+
required: false
49+
default: "auto"
3250

3351
runs:
3452
using: "composite"
3553
steps:
3654
# > --------------------------------------------------
3755
# > OS
56+
# Auto-skip on the nautilus-ci-runner-* self-hosted pool: those machines
57+
# have ample disk and the action's tool-cache/docker-images cleanup
58+
# actively erases the pre-installed Python toolcache and cached Docker
59+
# layers we want to keep across runs. Depot runners and GitHub-hosted
60+
# runners still need the cleanup, so they remain unaffected.
3861
- name: Free disk space (Ubuntu)
39-
if: inputs.free-disk-space == 'true' && runner.os == 'Linux'
62+
if: >-
63+
inputs.free-disk-space == 'true'
64+
&& runner.os == 'Linux'
65+
&& !startsWith(runner.name, 'nautilus-ci-runner-')
4066
# https://github.com/jlumbroso/free-disk-space
4167
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
4268
with:
@@ -98,7 +124,7 @@ runs:
98124
shell: bash
99125
run: |
100126
sudo apt-get update -o Acquire::Retries=5
101-
sudo apt-get install -y curl clang git make pkg-config ripgrep -o Acquire::Retries=5
127+
sudo apt-get install -y curl clang lld git make pkg-config ripgrep -o Acquire::Retries=5
102128
sudo apt-get install -y python3-dev libpython3-dev -o Acquire::Retries=5
103129
sudo apt-get clean
104130
sudo rm -rf /var/lib/apt/lists/*
@@ -123,7 +149,7 @@ runs:
123149
124150
# https://github.com/actions-rust-lang/setup-rust-toolchain
125151
- name: Set up Rust toolchain
126-
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2
152+
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4
127153
with:
128154
toolchain: ${{ env.TOOLCHAIN }}
129155
components: clippy,rustfmt
@@ -132,6 +158,7 @@ runs:
132158

133159
# https://github.com/Swatinem/rust-cache
134160
- name: Rust cache
161+
if: inputs.rust-cache-enabled == 'true'
135162
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
136163
with:
137164
workspaces: ${{ inputs.rust-cache-workspaces || '. -> target' }}
@@ -153,7 +180,7 @@ runs:
153180
- name: Install cargo-nextest
154181
if: inputs.build-type != 'pre-commit' && runner.os != 'macOS'
155182
# https://github.com/taiki-e/install-action
156-
uses: taiki-e/install-action@cede0bb282aae847dfa8aacca3a41c86d973d4d7 # v2.68.1
183+
uses: taiki-e/install-action@0d865d5cc6d507df4765f1f866bfae8bab4e2a73 # v2.69.7
157184
with:
158185
tool: cargo-nextest@${{ env.CARGO_NEXTEST_VERSION }}
159186

@@ -180,24 +207,12 @@ runs:
180207
run: |
181208
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
182209
183-
- name: Get pre-commit version
184-
if: inputs.build-type == 'pre-commit'
185-
shell: bash
186-
run: |
187-
echo "PRE_COMMIT_VERSION=$(bash scripts/pre-commit-version.sh)" >> $GITHUB_ENV
188-
189-
- name: Get cache scope and uv lock hash
210+
- name: Get cache scope
190211
shell: bash
191212
env:
192213
CACHE_SCOPE: ${{ runner.os }}-${{ runner.arch }}-py${{ inputs.python-version }}
193214
run: |
194215
echo "CACHE_SCOPE=$CACHE_SCOPE" >> "$GITHUB_ENV"
195-
python - <<'PY' >> "$GITHUB_ENV"
196-
import hashlib
197-
from pathlib import Path
198-
199-
print(f"UV_LOCK_HASH={hashlib.sha256(Path('uv.lock').read_bytes()).hexdigest()}")
200-
PY
201216
202217
- name: Get pre-commit config hash
203218
if: inputs.build-type == 'pre-commit'
@@ -212,20 +227,13 @@ runs:
212227
)
213228
PY
214229
215-
# Keep this exact-keyed since site-packages is an installed environment, not a download cache
216-
- name: Cache Python site-packages
217-
if: inputs.build-type == 'pre-commit'
218-
id: cached-site-packages
219-
# https://github.com/actions/cache
220-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
221-
with:
222-
path: ~/.local/lib/python${{ inputs.python-version }}/site-packages
223-
key: ${{ env.CACHE_SCOPE }}-site-packages-pre-commit-${{ env.PRE_COMMIT_VERSION }}
224-
225-
- name: Install pre-commit
230+
- name: Install prek
226231
if: inputs.build-type == 'pre-commit'
227232
shell: bash
228-
run: pip install pre-commit==${{ env.PRE_COMMIT_VERSION }}
233+
run: |
234+
PREK_VERSION="$(bash scripts/tool-version.sh prek)"
235+
curl --proto '=https' --tlsv1.2 -LsSf \
236+
"https://github.com/j178/prek/releases/download/v${PREK_VERSION}/prek-installer.sh" | sh
229237
230238
# > --------------------------------------------------
231239
# > UV
@@ -236,39 +244,61 @@ runs:
236244
237245
- name: Install uv
238246
# https://github.com/astral-sh/setup-uv
239-
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
247+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
240248
with:
241249
version: ${{ env.UV_VERSION }}
250+
enable-cache: ${{ inputs.uv-cache-enabled }}
251+
cache-suffix: ${{ env.CACHE_SCOPE }}-uv-${{ env.UV_VERSION }}
252+
prune-cache: true
242253

243254
- name: Set uv cache-dir
244255
shell: bash
245256
run: |
246257
echo "UV_CACHE_DIR=$(uv cache dir)" >> $GITHUB_ENV
247258
248-
- name: Cached uv
249-
# Skip on macOS: hashFiles() broken in composite actions after Nov 20 runner update
250-
# See: https://github.com/actions/runner/issues/3765
251-
if: runner.os != 'macOS'
252-
id: cached-uv
253-
# https://github.com/actions/cache
254-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
255-
with:
256-
path: ${{ env.UV_CACHE_DIR }}
257-
key: ${{ env.CACHE_SCOPE }}-uv-${{ env.UV_VERSION }}-${{ env.UV_LOCK_HASH }}
258-
restore-keys: |
259-
${{ env.CACHE_SCOPE }}-uv-${{ env.UV_VERSION }}-
259+
# Self-hosted runners skip setup-uv's save-cache (and its built-in prune) under auto.
260+
- name: Prune uv cache
261+
shell: bash
262+
run: uv cache prune --ci
260263

261264
# > --------------------------------------------------
262-
# > pre-commit
263-
- name: Cached pre-commit
264-
if: inputs.build-type == 'pre-commit' && runner.os != 'macOS'
265-
# Skip on macOS: hashFiles() broken in composite actions after Nov 20 runner update
266-
# See: https://github.com/actions/runner/issues/3765
267-
id: cached-pre-commit
265+
# > prek (pre-commit hook environments)
266+
- name: Cached pre-commit environments
267+
# Skip on macOS: hashFiles() broken in composite actions, see actions/runner#3765
268+
if: >-
269+
inputs.build-type == 'pre-commit'
270+
&& runner.os != 'macOS'
271+
&& (inputs.prek-cache-enabled == 'true'
272+
|| (inputs.prek-cache-enabled == 'auto'
273+
&& runner.environment != 'self-hosted'))
274+
id: cached-prek
268275
# https://github.com/actions/cache
269-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
276+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
270277
with:
271-
path: ~/.cache/pre-commit
272-
key: ${{ env.CACHE_SCOPE }}-pre-commit-${{ env.PRE_COMMIT_VERSION }}-${{ env.PRE_COMMIT_CONFIG_HASH }}
278+
path: ~/.cache/prek
279+
key: ${{ env.CACHE_SCOPE }}-prek-${{ env.PRE_COMMIT_CONFIG_HASH }}
273280
restore-keys: |
274-
${{ env.CACHE_SCOPE }}-pre-commit-${{ env.PRE_COMMIT_VERSION }}-
281+
${{ env.CACHE_SCOPE }}-prek-
282+
283+
# > --------------------------------------------------
284+
# > Cache footprint
285+
- name: Report cache footprint
286+
if: runner.os != 'Windows'
287+
shell: bash
288+
run: |
289+
{
290+
echo "## Cache footprint"
291+
echo
292+
echo '```'
293+
df -h "$HOME" 2>/dev/null || df -h /
294+
echo
295+
for path in \
296+
"$HOME/.cache/uv" \
297+
"$HOME/.cache/prek" \
298+
"$HOME/.cache/cargo-target" \
299+
"$HOME/.cargo/registry" \
300+
"$HOME/.cargo/git"; do
301+
[ -d "$path" ] && du -sh "$path" 2>/dev/null || true
302+
done
303+
echo '```'
304+
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)