Skip to content

Commit

Permalink
Merge pull request #21 from EA31337/dev
Browse files Browse the repository at this point in the history
Compilation and workflow fixes
  • Loading branch information
kenorb committed Apr 22, 2024
2 parents 7a146a8 + cf7b42b commit 93c91c4
Show file tree
Hide file tree
Showing 149 changed files with 317 additions and 332 deletions.
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
// Use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"name": "EA31337-indicators-common",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers-contrib/features/actionlint:1": {},
"ghcr.io/devcontainers-contrib/features/ansible:2": {},
"ghcr.io/guiyomh/features/vim:0": {},
"ghcr.io/jungaretti/features/make:1": {},
"ghcr.io/prulloac/devcontainer-features/pre-commit:1": {},
"ghcr.io/hspaans/devcontainer-features/ansible-lint:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"L-I-V.mql-tools",
"github.vscode-github-actions",
"ms-vscode.cpptools",
"vscodevim.vim"
]
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
172 changes: 105 additions & 67 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
name: Compile MQL
name: Compile

env:
ARTIFACT_PREFIX: ${{ inputs.artifact_prefix || 'mt' }}
INDI_COMMON_WORKDIR: ${{ vars.INDI_COMMON_WORKDIR || 'indicators-common' }}
REPOSITORY: EA31337/EA31337-indicators-common
SKIP_CLEANUP: ${{ inputs.skip_cleanup || false }}

# yamllint disable-line rule:truthy
on:
Expand All @@ -17,115 +23,147 @@ on:
paths-ignore:
- '*.md'
- '.git*'
workflow_call:
inputs:
artifact_prefix:
default: mt
description: Artifact prefix.
required: false
type: string
skip_cleanup:
default: false
description: Whether to skip a clean-up job.
required: false
type: boolean

jobs:
Compile-Indicators-Platform:
mt4:
name: Installs platform (4)
uses: EA31337/EA-Tester/.github/workflows/platform-linux.yml@dev
with:
artifact_name: ${{ inputs.artifact_prefix || 'mt' }}4
artifact_overwrite: true
version: 4
mt5:
name: Installs platform (5)
uses: EA31337/EA-Tester/.github/workflows/platform-linux.yml@dev
with:
artifact_name: ${{ inputs.artifact_prefix || 'mt' }}5
artifact_overwrite: true
version: 5

compile-platform-indicators:
defaults:
run:
shell: powershell
name: Compile platform indicators
needs: [mt4, mt5]
runs-on: windows-latest
strategy:
matrix:
version: [4, 5]
steps:
- name: Compile (build 1382)
uses: fx31337/mql-compile-action@master
with:
include: .
init-platform: true
mt-version: 4.0.0.1382.2
path: Indicators
verbose: true
- name: Upload MQL4 indicators
uses: actions/upload-artifact@v3
- uses: actions/download-artifact@v4
with:
name: Indicators-platform
path: ${{ env.MT4_PATH }}/MQL?/**/*.[me][qx][45h]
- name: Compile (build 2361)
uses: fx31337/mql-compile-action@master
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
path: .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
- name: Compile MQL
uses: fx31337/mql-compile-action@dev
with:
include: .
init-platform: true
mt-version: 5.0.0.2361
path: .platform/**/MQL?/Indicators
mt-path: .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
path: .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}/**/MQL?/Indicators
verbose: true
- name: Upload MQL5 indicators
uses: actions/upload-artifact@v3
with:
name: Indicators-platform
path: ${{ env.MT5_PATH }}/MQL?/**/*.[me][qx][45h]
- name: Compile (build 3815)
uses: fx31337/mql-compile-action@master
with:
include: .
init-platform: true
mt-version: 5.0.0.3815
path: .platform/**/MQL?/Indicators
verbose: true
- name: Upload MQL5 indicators
uses: actions/upload-artifact@v3
with:
name: Indicators-platform
path: ${{ env.MT5_PATH }}/MQL?/**/*.[me][qx][45h]
- name: Copy MQL to the current location
run: Copy-Item -Path ".${{ env.ARTIFACT_PREFIX }}*\*\*\MQL?" -Destination . -Recurse -Verbose
- name: List all source code files
run: '(Get-ChildItem -Recurse -Path . -Include *.mq[45]).fullname'
run: '(Get-ChildItem -Recurse -Path "MQL?" -Include *.mq[45]).fullname'
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
- run: Get-Location
timeout-minutes: 10
run: '(Get-ChildItem -Recurse -Path "MQL?" -Include *.ex[45]).fullname'
- name: Upload platform indicators
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: platform-indicators-mql${{ matrix.version }}
path: MQL?/**/*.[me][qx][45h]
- if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 20

Compile-Indicators:
compile-indicators:
defaults:
run:
shell: powershell
needs: [Compile-Indicators-Platform]
name: Compile indicators
needs: [compile-platform-indicators]
runs-on: windows-latest
strategy:
matrix:
version: [4, 5]
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.INDI_COMMON_WORKDIR }}
ref: ${{ github.head_ref || github.ref_name }}
repository: EA31337/EA31337-indicators-common
- uses: actions/checkout@v3
with:
path: MQL4/Include/EA31337-classes
ref: v3.000.1
repository: EA31337/EA31337-classes
- uses: actions/checkout@v3
with:
path: MQL5/Include/EA31337-classes
ref: v2.013.1
ref: v3.000.1
repository: EA31337/EA31337-classes
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
path: .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
- uses: actions/download-artifact@v4
with:
name: Indicators-platform
merge-multiple: true
pattern: platform-indicators-mql?
- name: List all source code files
run: '(Get-ChildItem -Recurse -Path . -Include *.mq[45]).fullname'
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
- name: Compile (build 2361)
- name: Compile
uses: fx31337/mql-compile-action@master
with:
include: MQL5
init-platform: true
mt-version: 5.0.0.2361
path: '**/*.mt5.mq4'
mt-path: .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
path: ${{ env.INDI_COMMON_WORKDIR }}/**/*.mt5.mq${{ matrix.version }}
# yamllint disable-line rule:line-length
path-ignore: '**/{AC,ADX,ADXW,Alligator,AO,Bears,Bulls,BB,BWMFI,CCI,CHO,CHV,DeMarker,DEMA,DPO,Envelopes,Force,FrAMA,Gator,MACD,MI,OsMA,RSI,StdDev,TEMA,TRIX,UOS}.{mt?.mq?,mq?}'
path-ignore: '**/{AC,AD,ADX,ADXW,Alligator,AO,Bears,Bulls,BB,BWMFI,CCI,CHO,CHV,DeMarker,DEMA,DPO,Envelopes,Force,FrAMA,Gator,MACD,MFI,MI,OsMA,RSI,StdDev,TEMA,TRIX,UOS}.{mt?.mq?,mq?}'
verbose: true
- name: Compile (build 2361)
- name: Compile
uses: fx31337/mql-compile-action@master
with:
include: MQL5
init-platform: true
mt-version: 5.0.0.2361
path: '**/*.mq[45]'
include: MQL${{ matrix.version }}
mt-path: .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
path: ${{ env.INDI_COMMON_WORKDIR }}/**/*.mq${{ matrix.version }}
# yamllint disable-line rule:line-length
path-ignore: '**/{AC,ADX,ADXW,Alligator,AO,Bears,Bulls,BB,BWMFI,CCI,CHO,CHV,DeMarker,DEMA,DPO,Envelopes,Force,FrAMA,Gator,MACD,MI,OsMA,RSI,StdDev,TEMA,TRIX,UOS,{tests,Examples,Experts,Scripts}/**/*}.{mt?.mq?,mq?}'
verbose: true
- name: Compile (build 2515)
uses: fx31337/mql-compile-action@master
with:
include: MQL5
init-platform: true
mt-version: 5.0.0.2515
path: '**/*.mq5'
path-ignore: '**/{Foo,{tests,Examples,Experts,Scripts}/**/*}.mq?'
path-ignore: '**/{AC,AD,ADX,ADXW,Alligator,AMA,AO,ASI,ATR,Bears,Bulls,BB,BWMFI,CCI,CHO,CHV,DeMarker,DEMA,DPO,Envelopes,Force,Fractals,FrAMA,Gator,HeikenAshi,Ichimoku,MACD,MA,MI,MFI,MOM,OBV,OsMA,PriceChannel,PVT,ROC,RSI,RVI,SAR,StdDev,Stochastic,TEMA,TRIX,UOS,VIDYA,VROC,Volumes,WAD,WPR,ZigZag}.{mt?.mq?,mq?}'
# path-ignore: '**/{Foo,{tests,Examples,Experts,Scripts}/**/*}.mq?'
verbose: true
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
- run: Get-Location
- name: Upload indicator artifacts
uses: actions/upload-artifact@v3
with:
name: Indicators-common
path: '**/*.ex[45]'
name: indicators-common
path: ${{ env.INDI_COMMON_WORKDIR }}/**/*.ex[45]
timeout-minutes: 30

cleanup:
if: inputs.skip_cleanup != true
name: Clean-up
needs: [compile-indicators]
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: ${{ env.ARTIFACT_PREFIX }}*
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
name: Run (Oscillator/Volume)
name: Run (Oscillators/Volume)

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'Oscillator/Volume/*'
- .github/workflows/run-oscillator-volume.yml
- 'Oscillators/Volume/*'
- .github/workflows/run-oscillators-volume.yml
push:
paths:
- 'Oscillator/Volume/*'
- .github/workflows/run-oscillator-volume.yml
- 'Oscillators/Volume/*'
- .github/workflows/run-oscillators-volume.yml

jobs:
Compile-Indicators-Platform:
Expand Down Expand Up @@ -71,20 +71,20 @@ jobs:
shell: powershell
working-directory: ${{ env.working-directory }}
env:
working-directory: Oscillator/Volume
working-directory: Oscillators/Volume
needs: [Compile-Indicators-Platform]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
path: ${{ env.working-directory }}/MQL4/Include/EA31337-classes
ref: v2.013.1
ref: v3.000.1
repository: EA31337/EA31337-classes
- uses: actions/checkout@v3
with:
path: ${{ env.working-directory }}/MQL5/Include/EA31337-classes
ref: v2.013.1
ref: v3.000.1
repository: EA31337/EA31337-classes
- uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
with:
name: Indicators-common
path: '**/*.ex[45]'
timeout-minutes: 10
timeout-minutes: 20

Compile-Strategy:
defaults:
Expand All @@ -145,12 +145,12 @@ jobs:
- uses: actions/checkout@v3
with:
path: Strategy-Indicator
ref: v1.012
ref: v2.000-dev
repository: EA31337/Strategy-Indicator
- uses: actions/checkout@v3
with:
path: Include/EA31337-classes
ref: v2.013.1
ref: v3.000.1
repository: EA31337/EA31337-classes
- name: Compile (build 2361)
uses: fx31337/mql-compile-action@master
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
filepath: Stg_Indicator/Stg_Indicator.set
content: |
Indicator_Indi_Indicator_DataExportMethod=1
Indicator_Indi_Indicator_Path=Oscillator/Volume/${{ matrix.test }}
Indicator_Indi_Indicator_Path=Oscillators/Volume/${{ matrix.test }}
Indicator_Indi_Indicator_Type=25
mode: 0644
- name: List files
Expand All @@ -228,6 +228,6 @@ jobs:
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: Results-Oscillator-Volume-${{ matrix.test }}
name: Results-Oscillators-Volume-${{ matrix.test }}
path: '**.csv'
timeout-minutes: 20
Loading

0 comments on commit 93c91c4

Please sign in to comment.