1
1
---
2
2
name : Compile
3
3
4
- # Setting an environment variable with the value of a configuration variable.
5
- env :
6
- ARTIFACT_PREFIX : ${{ inputs.artifact_prefix || 'mt' }}
7
- # yamllint disable-line rule:line-length
8
- CHECKOUT_BRANCH : ${{ inputs.checkout_branch || github.head_ref || github.ref_name }}
9
- INDI_OTHER_WORKDIR : ${{ vars.INDI_OTHER_WORKDIR || 'indicators-other' }}
10
- REPOSITORY : EA31337/EA31337-indicators-other
11
- SKIP_CLEANUP : ${{ inputs.skip_cleanup || false }}
12
-
13
4
# yamllint disable-line rule:truthy
14
5
on :
15
6
pull_request :
27
18
- ' *.md'
28
19
- ' .git*'
29
20
workflow_call :
30
- inputs :
31
- artifact_prefix :
32
- default : mt
33
- description : Artifact prefix.
34
- required : false
35
- type : string
36
- checkout_branch :
37
- default : ${{ github.head_ref || github.ref_name }}
38
- description : Checkout branch
39
- required : false
40
- type : string
41
- skip_cleanup :
42
- default : false
43
- description : Whether to skip a clean-up job.
44
- required : false
45
- type : boolean
46
21
47
22
jobs :
23
+ checkout-classes :
24
+ name : Checkout Classes repo
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - uses : actions/checkout@v4
28
+ with :
29
+ ref : v3.000.2
30
+ repository : EA31337/EA31337-classes
31
+ - name : Uploads source code
32
+ uses : actions/upload-artifact@v4
33
+ with :
34
+ name : src-classes
35
+ path : .
36
+
48
37
mt4 :
49
38
name : Installs platform (4)
50
39
uses : EA31337/EA-Tester/.github/workflows/platform-linux.yml@dev
51
40
with :
52
- artifact_name : ${{ inputs.artifact_prefix || 'mt' }}4
41
+ artifact_name : .mt4
53
42
artifact_overwrite : true
54
43
skip_cleanup : true
55
44
version : 4
@@ -58,113 +47,68 @@ jobs:
58
47
name : Installs platform (5)
59
48
uses : EA31337/EA-Tester/.github/workflows/platform-linux.yml@dev
60
49
with :
61
- artifact_name : ${{ inputs.artifact_prefix || 'mt' }}5
50
+ artifact_name : .mt5
62
51
artifact_overwrite : true
63
52
skip_cleanup : true
64
53
version : 5
65
54
66
- compile-platform-indicators :
55
+ compile :
67
56
defaults :
68
57
run :
69
58
shell : powershell
70
- name : Compile platform indicators
71
- needs : [mt4, mt5]
59
+ name : Compile
60
+ needs : [checkout-classes, mt4, mt5]
72
61
runs-on : windows-latest
73
- strategy :
74
- matrix :
75
- version : [4, 5]
76
- steps :
77
- - uses : actions/download-artifact@v4
78
- with :
79
- name : ${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
80
- path : .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
81
- - name : Compile MQL
82
- uses : fx31337/mql-compile-action@dev
83
- with :
84
- include : .
85
- init-platform : true
86
- mt-path : .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
87
- # yamllint disable-line rule:line-length
88
- path : .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}/**/MQL?/Indicators
89
- verbose : true
90
- - name : Copy MQL to the current location
91
- run : >-
92
- Copy-Item
93
- -Path ".${{ env.ARTIFACT_PREFIX }}*\*\*\MQL?"
94
- -Destination .
95
- -Recurse
96
- -Verbose
97
- - name : List all source code files
98
- run : ' (Get-ChildItem -Recurse -Path "MQL?" -Include *.mq[45]).fullname'
99
- - name : List compiled files
100
- run : ' (Get-ChildItem -Recurse -Path "MQL?" -Include *.ex[45]).fullname'
101
- - name : Upload platform indicators
102
- uses : actions/upload-artifact@v4
103
- with :
104
- if-no-files-found : error
105
- name : ${{ env.ARTIFACT_PREFIX }}-indicators-ex${{ matrix.version }}
106
- path : MQL?/**/*.[me][qx][45h]
107
- - if : ${{ failure() }}
108
- uses : mxschmitt/action-tmate@v3
109
- timeout-minutes : 20
110
-
111
- compile-indicators :
112
- defaults :
113
- run :
114
- shell : powershell
115
- name : Compile Indicators
116
- needs : [compile-platform-indicators]
117
- runs-on : windows-latest
118
- strategy :
119
- matrix :
120
- version : [4, 5]
121
62
steps :
122
63
- uses : actions/checkout@v4
123
64
with :
124
- path : ${{ env.INDI_OTHER_WORKDIR }}
125
- ref : ${{ env.CHECKOUT_BRANCH }}
126
- repository : EA31337/EA31337-indicators-other
127
- - uses : actions/checkout@v4
128
- with :
129
- path : MQL${{ matrix.version}}/Include/EA31337-classes
130
- ref : v3.000.1
131
- repository : EA31337/EA31337-classes
65
+ submodules : recursive
132
66
- uses : actions/download-artifact@v4
133
67
with :
134
- name : ${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
135
- path : .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
68
+ name : src-classes
69
+ path : Include/EA31337-classes
136
70
- uses : actions/download-artifact@v4
137
71
with :
138
- merge-multiple : true
139
- pattern : ${{ env.ARTIFACT_PREFIX }}-indicators-ex?
140
- - name : List all source code files
141
- run : ' (Get-ChildItem -Recurse -Path . -Include *.mq[45]).fullname'
142
- - name : List compiled files
143
- run : ' (Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
72
+ pattern : .mt?
73
+ - name : Enables input mode
74
+ run : echo '#define __input__' >> config/define.h
75
+ - name : Compile indicators
76
+ uses : fx31337/mql-compile-action@master
77
+ with :
78
+ include : .
79
+ mt-path : .mt${{ matrix.version }}
80
+ path : indicators-other/**/*.[me][qx][45h]
81
+ verbose : true
144
82
- name : Compile
145
83
uses : fx31337/mql-compile-action@master
146
84
with :
147
- include : MQL${{ matrix.version }}
148
- mt-path : .${{ env.ARTIFACT_PREFIX }} ${{ matrix.version }}
149
- path : ${{ env.INDI_OTHER_WORKDIR }}/ **/*.mq${{ matrix.version }}
85
+ include : .
86
+ mt-path : .mt ${{ matrix.version }}
87
+ path : " **/Stg_ *.mq${{ matrix.version }}"
150
88
verbose : true
151
89
- name : List compiled files
152
90
run : ' (Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
153
91
- run : Get-Location
154
- - name : Upload indicator artifacts
92
+ - name : Upload artifacts
155
93
uses : actions/upload-artifact@v4
156
94
with :
157
- # yamllint disable-line rule:line-length
158
- name : ${{ env.ARTIFACT_PREFIX }}-indicators-other-ex${{ matrix.version }}
159
- path : ${{ env.INDI_OTHER_WORKDIR }}/**/*.ex[45]
160
- timeout-minutes : 30
95
+ if-no-files-found : error
96
+ name : Strategy
97
+ path : ' **/Stg_*.ex[45]'
98
+ strategy :
99
+ matrix :
100
+ version :
101
+ - 4
102
+ - 5
103
+ max-parallel : 2
104
+ timeout-minutes : 10
161
105
162
106
cleanup :
163
107
if : inputs.skip_cleanup != true
164
108
name : Clean-up
165
- needs : [compile-indicators ]
109
+ needs : [compile]
166
110
runs-on : ubuntu-latest
167
111
steps :
168
112
- uses : geekyeggo/delete-artifact@v5
169
113
with :
170
- name : ${{ env.ARTIFACT_PREFIX }}*
114
+ name : .mt?
0 commit comments