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
25 changes: 17 additions & 8 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Expand All @@ -42,6 +42,12 @@ jobs:
- run: cargo clippy --workspace --all-targets --all-features
env:
RUSTFLAGS: -Dwarnings
# `--all-features` above never builds the binary without its default
# `jemalloc` feature, which is the build `cargo install
# --no-default-features` produces and the one Windows MSVC gets anyway.
- run: cargo clippy -p triodion-cli --all-targets --no-default-features
env:
RUSTFLAGS: -Dwarnings

# `crates/python` is in the workspace `exclude` list, so every `--workspace`
# job above skips it entirely. Without this job the pyo3 extension crate is
Expand All @@ -51,13 +57,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
# Deliberately no `dtolnay/rust-toolchain` step. `crates/python` carries
# its own `rust-toolchain.toml` pinning the channel and the components it
# needs, and rustup honours that file for every cargo invocation made
# from that directory. Installing a second toolchain here would download
# it and then never use it.
- uses: actions/setup-python@v5
- uses: actions/setup-python@v7
with:
# `build.rs` runs `pyo3-build-config`, which needs a real interpreter
# to resolve the target Python version. pyo3 0.29 requires >= 3.8.
Expand All @@ -84,7 +90,8 @@ jobs:
# directory the two steps above just populated, so maturin compiles
# incrementally instead of from scratch.
- name: Install Python test dependencies
run: python -m pip install --upgrade pip maturin pytest polars
# Same floor as `dependencies` in crates/python/pyproject.toml.
run: python -m pip install --upgrade pip maturin pytest 'polars>=2'
- name: Build and install the triodion wheel
working-directory: crates/python
run: |
Expand All @@ -97,7 +104,9 @@ jobs:
# chain data and carries the `rpc` marker; conftest.py skips those
# when no endpoint is configured, so this job is green without one
# while still proving the wheel builds, the extension imports, and
# the missing-endpoint path reports itself properly. Add an
# the missing-endpoint path reports itself properly.
# test_offline_rpc.py replays recorded blocks from a local server,
# so the Rust-to-polars DataFrame hand-off runs here too. Add an
# ETH_RPC_URL repository secret and the marked tests start running
# here with no other change.
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}
Expand All @@ -117,7 +126,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: taiki-e/install-action@v2
with:
tool: cargo-deny
Expand All @@ -133,7 +142,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/python_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
target: [x86_64]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
ref: ${{ inputs.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
Expand All @@ -57,7 +57,7 @@ jobs:
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
# upload-artifact v4 rejects a second upload to a name that already
# exists, where v3 silently merged them. Every job here used the one
Expand All @@ -75,11 +75,11 @@ jobs:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
target: [x64]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
ref: ${{ inputs.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.target }}
Expand All @@ -90,7 +90,7 @@ jobs:
args: ${{ env.MATURIN_ARGS_COMMON }} --interpreter python${{ matrix.python-version }}
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: wheels-windows-${{ matrix.target }}-py${{ matrix.python-version }}
path: dist
Expand All @@ -112,17 +112,20 @@ jobs:
# such entries would leave only the last one standing and every job
# would build aarch64. Repeating the `target` key restricts each entry
# to the combinations it matches, and adds `runner` to just those.
#
# `macos-13` was the Intel image here until GitHub retired it, and a
# job on a retired label never starts. `macos-15-intel` replaces it.
include:
- target: x86_64
runner: macos-13
runner: macos-15-intel
- target: aarch64
runner: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
ref: ${{ inputs.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
Expand All @@ -132,15 +135,15 @@ jobs:
args: ${{ env.MATURIN_ARGS_COMMON }} --interpreter python${{ matrix.python-version }}
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: wheels-macos-${{ matrix.target }}-py${{ matrix.python-version }}
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
ref: ${{ inputs.sha }}
- name: Build sdist
Expand All @@ -149,7 +152,7 @@ jobs:
command: sdist
args: --out dist --manifest-path crates/python/Cargo.toml
- name: Upload sdist
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: wheels-sdist
path: dist
Expand All @@ -169,7 +172,7 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
# Collect every per-job artifact back into one directory. This pair
# of keys replaces what v3 did implicitly with a shared name.
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ target
*.parquet
*.parquet_tmp
*.json
# Recorded RPC responses that python_tests/test_offline_rpc.py replays.
!crates/python/python_tests/fixtures/*.json
*.json_tmp
*.env
*._tmp
Expand Down
Loading
Loading