Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 178d621

Browse files
authoredJan 12, 2024
Release 1.183.0
See release notes.
2 parents f1b643d + 038e93f commit 178d621

File tree

1,325 files changed

+13336
-8743
lines changed

Some content is hidden

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

1,325 files changed

+13336
-8743
lines changed
 

‎.github/workflows/build-wheels.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: build-wheels
22

3-
# Build wheels on every push to `develop` branch
4-
53
on:
64
push:
7-
branches: [develop]
5+
branches: [nightly]
86

97
jobs:
108
build-wheels:

‎.github/workflows/build.yml

+101-25
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: build
22

3-
# Build and test NautilusTrader
4-
53
on:
64
push:
7-
branches: [master, develop]
5+
branches: [master, nightly, develop]
86
pull_request:
97
branches: [develop]
108

@@ -14,7 +12,7 @@ jobs:
1412
fail-fast: false
1513
matrix:
1614
arch: [x64]
17-
os: [ubuntu-latest, macos-latest, windows-latest]
15+
os: [ubuntu-latest, windows-latest]
1816
python-version: ["3.10", "3.11", "3.12"]
1917
defaults:
2018
run:
@@ -38,21 +36,11 @@ jobs:
3836
working-directory: ${{ github.workspace }}
3937

4038
- name: Set up Rust tool-chain (Linux, Windows) stable
41-
if: (runner.os == 'Linux') || (runner.os == 'Windows')
4239
uses: actions-rust-lang/setup-rust-toolchain@v1.5
4340
with:
4441
toolchain: ${{ env.RUST_VERSION }}
4542
components: rustfmt, clippy
4643

47-
# Work around as actions-rust-lang does not seem to work on macOS yet
48-
- name: Set up Rust tool-chain (macOS) stable
49-
if: runner.os == 'macOS'
50-
uses: actions-rs/toolchain@v1
51-
with:
52-
toolchain: ${{ env.RUST_VERSION }}
53-
override: true
54-
components: rustfmt, clippy
55-
5644
- name: Set up Python environment
5745
uses: actions/setup-python@v4
5846
with:
@@ -99,24 +87,20 @@ jobs:
9987
# pre-commit run --hook-stage manual gitlint-ci
10088
pre-commit run --all-files
10189
102-
- name: Install Redis (macOS)
103-
if: runner.os == 'macOS'
104-
run: |
105-
brew install redis
106-
redis-server --daemonize yes
107-
10890
- name: Install Redis (Linux)
10991
if: runner.os == 'Linux'
11092
run: |
11193
sudo apt-get install redis-server
11294
redis-server --daemonize yes
11395
114-
- name: Run nautilus_core cargo tests (Linux, macOS)
115-
if: (runner.os == 'Linux') || (runner.os == 'macOS')
116-
run: make cargo-test
96+
- name: Run nautilus_core cargo tests (Linux)
97+
if: runner.os == 'Linux'
98+
run: |
99+
cargo install cargo-nextest
100+
make cargo-test
117101
118-
- name: Run tests (Linux, macOS)
119-
if: (runner.os == 'Linux') || (runner.os == 'macOS')
102+
- name: Run tests (Linux)
103+
if: runner.os == 'Linux'
120104
run: |
121105
make pytest
122106
make test-examples
@@ -129,3 +113,95 @@ jobs:
129113
poetry run pytest --ignore=tests/performance_tests --new-first --failed-first
130114
env:
131115
PARALLEL_BUILD: false
116+
117+
build-macos:
118+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/nightly'
119+
strategy:
120+
fail-fast: false
121+
matrix:
122+
arch: [x64]
123+
os: [macos-latest]
124+
python-version: ["3.10", "3.11", "3.12"]
125+
defaults:
126+
run:
127+
shell: bash
128+
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
129+
runs-on: ${{ matrix.os }}
130+
env:
131+
BUILD_MODE: debug
132+
RUST_BACKTRACE: 1
133+
134+
steps:
135+
- name: Checkout repository
136+
uses: actions/checkout@v4
137+
138+
- name: Get Rust version from rust-toolchain.toml
139+
id: rust-version
140+
run: |
141+
version=$(awk -F\" '/version/ {print $2}' nautilus_core/rust-toolchain.toml)
142+
echo "Rust toolchain version $version"
143+
echo "RUST_VERSION=$version" >> $GITHUB_ENV
144+
working-directory: ${{ github.workspace }}
145+
146+
# Work around as actions-rust-lang does not seem to work on macOS yet
147+
- name: Set up Rust tool-chain (macOS) stable
148+
uses: actions-rs/toolchain@v1
149+
with:
150+
toolchain: ${{ env.RUST_VERSION }}
151+
override: true
152+
components: rustfmt, clippy
153+
154+
- name: Set up Python environment
155+
uses: actions/setup-python@v4
156+
with:
157+
python-version: ${{ matrix.python-version }}
158+
159+
- name: Get Poetry version from poetry-version
160+
run: |
161+
version=$(cat poetry-version)
162+
echo "POETRY_VERSION=$version" >> $GITHUB_ENV
163+
164+
- name: Install Poetry
165+
uses: snok/install-poetry@v1
166+
with:
167+
version: ${{ env.POETRY_VERSION }}
168+
169+
- name: Install build dependencies
170+
run: python -m pip install --upgrade pip setuptools wheel pre-commit msgspec
171+
172+
- name: Setup cached pre-commit
173+
id: cached-pre-commit
174+
uses: actions/cache@v3
175+
with:
176+
path: ~/.cache/pre-commit
177+
key: ${{ runner.os }}-${{ matrix.python-version }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
178+
179+
- name: Set poetry cache-dir
180+
run: echo "POETRY_CACHE_DIR=$(poetry config cache-dir)" >> $GITHUB_ENV
181+
182+
- name: Poetry cache
183+
id: cached-poetry
184+
uses: actions/cache@v3
185+
with:
186+
path: ${{ env.POETRY_CACHE_DIR }}
187+
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}
188+
189+
- name: Run pre-commit
190+
run: |
191+
# pre-commit run --hook-stage manual gitlint-ci
192+
pre-commit run --all-files
193+
194+
- name: Install Redis (macOS)
195+
run: |
196+
brew install redis
197+
redis-server --daemonize yes
198+
199+
- name: Run nautilus_core cargo tests (macOS)
200+
run: |
201+
cargo install cargo-nextest
202+
make cargo-test
203+
204+
- name: Run tests (macOS)
205+
run: |
206+
make pytest
207+
make test-examples

0 commit comments

Comments
 (0)
Please sign in to comment.