forked from EA31337/EA31337-indicators-other
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (78 loc) · 2.06 KB
/
compile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
name: Compile
# yamllint disable-line rule:truthy
on:
pull_request:
branches:
- 'master'
- 'dev*'
paths-ignore:
- '*.md'
- '.git*'
push:
branches:
- 'master'
- 'dev*'
paths-ignore:
- '*.md'
- '.git*'
jobs:
GetList:
outputs:
filelist: ${{ steps.get-files.outputs.filelist }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set output with list of files
id: get-files
run: |
import glob, json, os
fghout = os.environ["GITHUB_OUTPUT"]
files = glob.glob("**/*.mq?", recursive=True)
filelist = "filelist={}".format(json.dumps(files))
with open(fghout, "a") as fd:
fd.write(filelist)
shell: python
- name: Display outputs
run: echo "${{ toJson(steps.get-files.outputs) }}"
Compile:
defaults:
run:
shell: powershell
needs: [GetList]
runs-on: windows-latest
strategy:
matrix:
file: ${{ fromJson(needs.GetList.outputs.filelist) }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
path: Include/EA31337-classes
ref: v3.000-dev
repository: EA31337/EA31337-classes
- name: Compile (build 2361)
uses: fx31337/mql-compile-action@master
with:
include: .
init-platform: true
mt-version: 5.0.0.2361
path: ${{ matrix.file }}
verbose: true
- name: Compile (build 2515)
if: endsWith(matrix.file, '.mq5')
uses: fx31337/mql-compile-action@master
with:
include: .
init-platform: true
mt-version: 5.0.0.2515
path: ${{ matrix.file }}
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-other
path: '**/*.ex?'