Skip to content

Commit bdc275e

Browse files
authored
Release 1.216.0
See release notes.
2 parents 4a95295 + 3580efc commit bdc275e

File tree

261 files changed

+7855
-2101
lines changed

Some content is hidden

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

261 files changed

+7855
-2101
lines changed

.cargo/config.toml

+4-9
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ rustflags = [
55
"-Aclippy::drop_non_drop",
66
]
77

8-
[target.x86_64-pc-windows-msvc]
9-
rustflags = [
10-
"-C", "target-feature=+crt-static",
11-
]
12-
138
[target.x86_64-apple-darwin]
149
rustflags = [
1510
"-C", "link-arg=-undefined",
@@ -22,7 +17,7 @@ rustflags = [
2217
"-C", "link-arg=dynamic_lookup",
2318
]
2419

25-
# [target.x86_64-unknown-linux-gnu]
26-
# rustflags = [
27-
# "-C", "link-arg=-fuse-ld=mold",
28-
# ]
20+
[target.x86_64-pc-windows-msvc]
21+
rustflags = [
22+
"-C", "target-feature=+crt-static",
23+
]

.docker/nautilus_trader.dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12-slim AS base
1+
FROM python:3.13-slim AS base
22
ENV PYTHONUNBUFFERED=1 \
33
PYTHONDONTWRITEBYTECODE=1 \
44
PIP_NO_CACHE_DIR=off \
@@ -27,7 +27,7 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
2727
COPY uv-version ./
2828
RUN UV_VERSION=$(cat uv-version) && curl -LsSf https://astral.sh/uv/$UV_VERSION/install.sh | sh
2929

30-
# Install package requirements (split step and with --no-root to enable caching)
30+
# Install package requirements
3131
COPY uv.lock pyproject.toml build.py ./
3232
RUN uv sync --no-install-package nautilus_trader
3333

@@ -40,10 +40,10 @@ RUN cargo build --release --all-features
4040
COPY nautilus_trader ./nautilus_trader
4141
COPY README.md ./
4242
RUN uv build --wheel
43-
RUN uv pip install dist/*.whl
44-
RUN find /usr/local/lib/python3.12/site-packages -name "*.pyc" -exec rm -f {} \;
43+
RUN uv pip install --system dist/*.whl
44+
RUN find /usr/local/lib/python3.13/site-packages -name "*.pyc" -exec rm -f {} \;
4545

4646
# Final application image
4747
FROM base AS application
4848

49-
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
49+
COPY --from=builder /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages

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

+10-8
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
# > OS
1818
- name: Free disk space (Ubuntu)
1919
if: inputs.free-disk-space == 'true' && runner.os == 'Linux'
20-
# https://github.com/jlumbroso/free-disk-space/releases/tag/v1.3.1
20+
# https://github.com/jlumbroso/free-disk-space
2121
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
2222
with:
2323
tool-cache: true
@@ -41,6 +41,7 @@ runs:
4141
run: |
4242
sudo apt-get update
4343
sudo apt-get install -y curl clang git libssl-dev make pkg-config
44+
sudo apt-get install -y python3-dev libpython3-dev
4445
4546
- name: Install mold
4647
# https://github.com/rui314/setup-mold
@@ -106,7 +107,7 @@ runs:
106107
107108
- name: Cached sccache
108109
id: cached-sccache
109-
# https://github.com/actions/cache/releases/tag/v4.2.3
110+
# https://github.com/actions/cache
110111
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
111112
with:
112113
path: ${{ env.SCCACHE_DIR }}
@@ -117,13 +118,13 @@ runs:
117118
sccache-${{ runner.os }}-
118119
119120
- name: Run sccache
120-
# https://github.com/Mozilla-Actions/sccache-action/releases/tag/v0.0.8
121+
# https://github.com/Mozilla-Actions/sccache-action
121122
uses: mozilla-actions/sccache-action@65101d47ea8028ed0c98a1cdea8dd9182e9b5133 # v0.0.8
122123

123124
# > --------------------------------------------------
124125
# > Python
125126
- name: Set up Python environment
126-
# https://github.com/actions/setup-python/releases/tag/v5.4.0
127+
# https://github.com/actions/setup-python
127128
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
128129
with:
129130
python-version: ${{ inputs.python-version }}
@@ -135,7 +136,7 @@ runs:
135136
136137
- name: Cache Python site-packages
137138
id: cached-site-packages
138-
# https://github.com/actions/cache/releases/tag/v4.2.3
139+
# https://github.com/actions/cache
139140
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
140141
with:
141142
path: ~/.local/lib/python${{ inputs.python-version }}/site-packages
@@ -155,7 +156,8 @@ runs:
155156
echo "UV_VERSION=$(cat uv-version)" >> $GITHUB_ENV
156157
157158
- name: Install uv
158-
uses: astral-sh/setup-uv@v5
159+
# https://github.com/astral-sh/setup-uv
160+
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # 5.4.1
159161
with:
160162
version: ${{ env.UV_VERSION }}
161163

@@ -166,7 +168,7 @@ runs:
166168
167169
- name: Cached uv
168170
id: cached-uv
169-
# https://github.com/actions/cache/releases/tag/v4.2.3
171+
# https://github.com/actions/cache
170172
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
171173
with:
172174
path: ${{ env.UV_CACHE_DIR }}
@@ -176,7 +178,7 @@ runs:
176178
# > pre-commit
177179
- name: Cached pre-commit
178180
id: cached-pre-commit
179-
# https://github.com/actions/cache/releases/tag/v4.2.3
181+
# https://github.com/actions/cache
180182
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
181183
with:
182184
path: ~/.cache/pre-commit

.github/actions/common-test-data/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
steps:
77
- name: Cached test data
88
id: cached-testdata-large
9-
# https://github.com/actions/cache/releases/tag/v4.2.3
9+
# https://github.com/actions/cache
1010
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
1111
with:
1212
path: tests/test_data/large

.github/actions/common-wheel-build/action.yml

+38-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ inputs:
1313
runs:
1414
using: "composite"
1515
steps:
16+
- name: Debug github_ref
17+
shell: bash
18+
run: echo "Received github_ref:" ${{ inputs.github_ref }}
19+
1620
- name: Update version in pyproject.toml
17-
if: inputs.github_ref != 'refs/heads/master'
21+
if: ${{ inputs.github_ref != 'refs/heads/master' }}
1822
shell: bash
1923
run: |
2024
bash ./scripts/ci/update-pyproject-version.sh
@@ -24,8 +28,39 @@ runs:
2428
shell: bash
2529
run: uv lock --no-upgrade
2630

27-
- name: Build Python wheel (Linux & Windows)
28-
if: runner.os != 'macOS'
31+
- name: Build Python wheel (Linux x86_64)
32+
if: runner.os == 'Linux' && runner.arch != 'ARM64' && runner.arch != 'aarch64'
33+
shell: bash
34+
run: |
35+
uv build --wheel
36+
ls -lh dist/
37+
38+
- name: Build Python wheel (Linux ARM64)
39+
if: runner.os == 'Linux' && (runner.arch == 'ARM64' || runner.arch == 'aarch64')
40+
shell: bash
41+
run: |
42+
echo "Building for Linux ARM64"
43+
PYTHON_LIB_DIR=$(python3 -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))')
44+
PYTHON_VERSION=$(python3 -c 'import platform; print(".".join(platform.python_version_tuple()[:2]))')
45+
46+
export CARGO_BUILD_JOBS=1
47+
export LD_LIBRARY_PATH="/usr/lib/aarch64-linux-gnu:$PYTHON_LIB_DIR:$LD_LIBRARY_PATH"
48+
export LIBRARY_PATH="/usr/lib/aarch64-linux-gnu:$PYTHON_LIB_DIR:$LIBRARY_PATH"
49+
export PYO3_PYTHON=$(which python${{ inputs.python-version }})
50+
export RUSTFLAGS="-C link-arg=-L${PYTHON_LIB_DIR} -C link-arg=-lpython${PYTHON_VERSION}"
51+
52+
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
53+
echo "LIBRARY_PATH: $LIBRARY_PATH"
54+
echo "PYO3_PYTHON: $PYO3_PYTHON"
55+
echo "PYTHON_LIB_DIR: $PYTHON_LIB_DIR"
56+
echo "PYTHON_VERSION: $PYTHON_VERSION"
57+
echo "RUSTFLAGS: $RUSTFLAGS"
58+
59+
uv build --wheel
60+
ls -lh dist/
61+
62+
- name: Build Python wheel (Windows)
63+
if: runner.os == 'Windows'
2964
shell: bash
3065
run: |
3166
uv build --wheel

.github/actions/publish-wheels/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ runs:
55
using: "composite"
66
steps:
77
- name: Checkout repository
8-
# https://github.com/actions/checkout/releases/tag/v4.2.2
8+
# https://github.com/actions/checkout
99
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1010

1111
- name: Download built wheels
12-
# https://github.com/actions/download-artifact/releases/tag/v4.2.1
12+
# https://github.com/actions/download-artifact
1313
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
1414
with:
1515
path: dist/

.github/actions/upload-artifact-wheel/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ runs:
2626
2727
- name: Upload wheel artifact
2828
if: github.event_name == 'push'
29-
# https://github.com/actions/upload-artifact/releases/tag/v4.6.2
29+
# https://github.com/actions/upload-artifact
3030
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3131
with:
3232
name: ${{ env.ASSET_NAME }}

.github/workflows/build-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
build-docs:
99
runs-on: ubuntu-latest
1010
steps:
11-
# https://github.com/step-security/harden-runner/releases/tag/v2.11.0
11+
# https://github.com/step-security/harden-runner
1212
- uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
1313
with:
1414
egress-policy: audit

0 commit comments

Comments
 (0)