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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.sh text eol=lf

# Measurements and source snapshots are immutable byte-for-byte evidence.
docs/evidence/** -text -diff
49 changes: 49 additions & 0 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Portable artifacts
on:
workflow_dispatch:
push:
tags: ["v*"]
jobs:
package:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: ubuntu-22.04
target: x86_64-unknown-linux-musl
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.97.1
with:
targets: ${{ matrix.target }}
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y musl-tools
- name: Build from a clean commit
run: python scripts/package_release.py --target ${{ matrix.target }}
- name: Offline wheel installation and black-box smoke
shell: bash
run: |
WHEEL=$(find dist -name '*.whl' | head -1)
ADMIN=$(find dist -type f \( -name fastk_admin -o -name fastk_admin.exe \) | head -1)
python scripts/smoke_install.py --wheel "$WHEEL" --admin "$ADMIN"
- name: Validate packaged contracts and checksums
shell: bash
run: |
WHEEL=$(find dist -name '*.whl' | head -1)
BRIDGE=$(find dist -type f \( -name fastk_bridge -o -name fastk_bridge.exe \) | head -1)
MANIFEST=$(find dist -name release_manifest.json | head -1)
python -m pip install --no-index --no-deps "$WHEEL"
python -m pip install jsonschema==4.26.0
export FASTK_BRIDGE_BIN="$PWD/$BRIDGE"
export FASTK_RELEASE_PACKAGE="$PWD/$(dirname "$MANIFEST")"
python -m unittest discover -s external-tests -p test_contracts.py
- uses: actions/upload-artifact@v4
with:
name: fastk-${{ matrix.target }}
path: dist/
85 changes: 82 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ on:
jobs:
rust:
name: Rust
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@1.97.1
with:
components: rustfmt

Expand All @@ -26,4 +30,79 @@ jobs:
run: cargo check --examples

- name: Test
run: cargo test
run: |
cargo test --locked --features fault-injection
cargo test --locked --example fastk_bridge

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Client transport tests
shell: bash
run: PYTHONPATH=clients/python/src python -m unittest discover -s external-tests -p test_client.py

- name: Python formatting and static checks
run: |
python -m pip install ruff==0.17.1
python -m ruff check clients/python/src scripts/build_python_wheel.py scripts/package_release.py scripts/smoke_install.py scripts/export_benchmark_evidence.py external-tests
python -m ruff format --check clients/python/src scripts/build_python_wheel.py scripts/package_release.py scripts/smoke_install.py scripts/export_benchmark_evidence.py external-tests

- name: Build standalone bridge
run: cargo build --locked --release --example fastk_bridge --example fastk_admin

- name: Client black-box integration
shell: bash
run: |
SUFFIX=""
if [ "$RUNNER_OS" = "Windows" ]; then SUFFIX=".exe"; fi
export FASTK_BRIDGE_BIN="$PWD/target/release/examples/fastk_bridge$SUFFIX"
export PYTHONPATH=clients/python/src
python -m unittest discover -s external-tests -p test_client.py
python -m unittest discover -s external-tests -p test_session.py

native:
name: Native Python ${{ matrix.python }} / ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest]
python: ["3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.97.1
with:
components: rustfmt, clippy
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install pinned test and build environment
run: python -m pip install -r external-tests/requirements-native.lock
- name: Build and install native module
shell: bash
run: |
python scripts/build_native_wheel.py --output target/native-wheels
python -m pip install --no-deps target/native-wheels/*.whl
- name: Native public contracts
run: |
python -m unittest discover -s external-tests -p test_native.py -v
python -m unittest discover -s external-tests -p test_month_consumer.py -v
python -m unittest discover -s external-tests -p test_engine.py -v
- name: All five adapters with common NumPy output
run: python external-tests/run_benchmarks.py --root target/numpy-smoke --profile smoke --rounds 1 --short-ops 35 --full-scans 1
- name: Offline native use outside the checkout
shell: bash
run: |
python -m pip download --only-binary=:all: --no-deps numpy==2.3.5 -d target/native-wheelhouse
WHEEL=$(find target/native-wheels -name '*.whl' | head -1)
python scripts/smoke_native_install.py --wheel "$WHEEL" --wheelhouse target/native-wheelhouse
- name: Native source checks
run: |
cargo fmt --check
python -m ruff check clients/python-native scripts/build_native_wheel.py scripts/smoke_native_install.py external-tests
python -m ruff format --check clients/python-native scripts/build_native_wheel.py scripts/smoke_native_install.py external-tests
- uses: actions/upload-artifact@v4
with:
name: native-${{ matrix.os }}-${{ matrix.python }}
path: target/native-wheels/*.whl
27 changes: 18 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
/target
/dist
/series
/data
/tmp
*.db
*.sqlite
*.7z
*.zip
/target
/external-tests/rust-read-bench/target/
/dist
/series
/data
/tmp
*.db
*.sqlite
*.7z
*.zip

__pycache__/
*.py[cod]
*.egg-info/
.venv/
.ruff_cache/
/clients/python/build/
/external-tests/results/
Loading
Loading