Files
mt5-quant/.github/workflows/release.yml
T
Devid HW a3b046c68f feat: complete Rust migration with modular architecture
Major changes:
- Migrate Python/shell scripts to Rust modules:
  - analytics/extract.py → src/analytics/extract.rs (ReportExtractor)
  - analytics/analyze.py → src/analytics/analyze.rs (DealAnalyzer)
  - scripts/mqlcompile.sh → src/compile/mql_compiler.rs (MqlCompiler)
  - scripts/backtest_pipeline.sh → src/pipeline/backtest.rs (BacktestPipeline)

- New modular structure:
  - src/models/ - Config, Deal, Metrics, Report structs
  - src/analytics/ - Report parsing and deal analysis
  - src/compile/ - MQL5 compilation via Wine
  - src/pipeline/ - 5-stage backtest orchestration
  - src/tools/ - 27 MCP tool definitions and handlers

- Remove PyInstaller setup (now pure Rust)
- Remove migrated shell scripts (backtest_pipeline.sh, mqlcompile.sh)
- Add GitHub Actions CI/CD for macOS & Linux releases
- Update all documentation for Rust architecture

Binary size: 4.3MB (no Python dependencies)
Tools: 27 MCP tools fully functional
2026-04-18 15:07:08 +07:00

96 lines
2.4 KiB
YAML

name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build release binary
run: cargo build --release
- name: Package binary
run: |
mkdir -p dist/mt5-quant-macos
cp target/release/mt5-quant dist/mt5-quant-macos/
cp -r config dist/mt5-quant-macos/
cp README.md dist/mt5-quant-macos/
cp WINDSURF_SETUP.md dist/mt5-quant-macos/
cd dist
tar -czf mt5-quant-macos-arm64.tar.gz mt5-quant-macos
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: macos-binary
path: dist/mt5-quant-macos-arm64.tar.gz
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build release binary
run: cargo build --release
- name: Package binary
run: |
mkdir -p dist/mt5-quant-linux
cp target/release/mt5-quant dist/mt5-quant-linux/
cp -r config dist/mt5-quant-linux/
cp README.md dist/mt5-quant-linux/
cp WINDSURF_SETUP.md dist/mt5-quant-linux/
cd dist
tar -czf mt5-quant-linux-x64.tar.gz mt5-quant-linux
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: linux-binary
path: dist/mt5-quant-linux-x64.tar.gz
release:
needs: [build-macos, build-linux]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download macOS artifact
uses: actions/download-artifact@v4
with:
name: macos-binary
path: dist
- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: linux-binary
path: dist
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/mt5-quant-macos-arm64.tar.gz
dist/mt5-quant-linux-x64.tar.gz
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}