-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from EA31337/dev-v3000
New V2 release (code refactor)
- Loading branch information
Showing
16 changed files
with
1,531 additions
and
1,069 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,116 @@ | ||
--- | ||
name: Compile | ||
|
||
env: | ||
ARTIFACT_PREFIX: ${{ inputs.artifact_prefix || 'mt' }} | ||
REPOSITORY: EA31337/EA31337-Libre | ||
SKIP_CLEANUP: ${{ inputs.skip_cleanup || false }} | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
branches: | ||
- 'master' | ||
- '*dev*' | ||
paths-ignore: | ||
- '**.md' | ||
- '*.md' | ||
- '.git*' | ||
push: | ||
branches: | ||
- 'master' | ||
- '*dev*' | ||
paths-ignore: | ||
- '**.md' | ||
- '*.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: | ||
checkout: | ||
name: Checkout | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Uploads source code | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: src | ||
path: src | ||
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 | ||
skip_cleanup: 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 | ||
skip_cleanup: true | ||
version: 5 | ||
|
||
compile-ea: | ||
defaults: | ||
run: | ||
shell: powershell | ||
working-directory: src | ||
name: Compile EA | ||
needs: [checkout, mt4, mt5] | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
submodules: recursive | ||
- name: List MQL files | ||
run: '(Get-ChildItem -Recurse -Path . -Include *.mq[45]).fullname' | ||
shell: powershell | ||
- name: Compiles EA (MQL4) | ||
uses: fx31337/mql-compile-action@master | ||
name: src | ||
path: src | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: src\EA31337-Libre.mq4 | ||
verbose: true | ||
|
||
- name: Compiles EA (MQL5) | ||
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.version }} | ||
path: .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }} | ||
- 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: Compiles EA | ||
uses: fx31337/mql-compile-action@master | ||
with: | ||
path: src\EA31337-Libre.mq5 | ||
mt-path: .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }} | ||
path: src\EA31337-Libre.mq${{ matrix.version }} | ||
verbose: true | ||
- name: List compiled files | ||
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname' | ||
|
||
- run: Get-Location | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: EA-Libre.ex${{ matrix.version }} | ||
path: src/*.ex? | ||
strategy: | ||
matrix: | ||
version: [4, 5] | ||
timeout-minutes: 30 | ||
|
||
cleanup: | ||
if: inputs.skip_cleanup != true | ||
name: Clean-up | ||
needs: [compile-ea] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: geekyeggo/delete-artifact@v5 | ||
with: | ||
name: EA | ||
path: 'src/*.ex?' | ||
name: ${{ env.ARTIFACT_PREFIX }}* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.