forked from LengKundee/MQL5-Google-Onedrive
MQL5 Optimizations: - Consolidate trade counting and profit calculation into a single history scan in `UpdateDailyStatistics()`. - Optimize `IsTradingAllowed()` with fast math for hour extraction, replacing expensive `TimeToStruct()`. - Reduce terminal API calls in `CheckDailyLimits()` by caching account balance. - Reuse `TimeCurrent()` value in `OnTick()` and pass to sub-functions. CI Fixes: - Transition all workflows from `ubuntu-latest` to `self-hosted` runners. - This resolves the "Runner of type hosted not acquired" failure by utilizing the repository's configured self-hosted infrastructure. Impact: Measurably faster execution in MT5 'hot paths' and restored CI/CD functionality. Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
35 lines
706 B
YAML
35 lines
706 B
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate-and-package:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Validate repository
|
|
run: python3 scripts/ci_validate_repo.py
|
|
|
|
- name: Validate shell scripts (bash -n)
|
|
run: |
|
|
bash -n scripts/package_mt5.sh
|
|
bash -n scripts/deploy_mt5.sh
|
|
|
|
- name: Package MT5 sources
|
|
run: bash scripts/package_mt5.sh
|
|
|
|
- name: Upload package artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Exness_MT5_MQL5
|
|
path: dist/Exness_MT5_MQL5.zip
|