-
Notifications
You must be signed in to change notification settings - Fork 2
88 lines (79 loc) · 2.69 KB
/
history.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
81
82
83
84
85
86
87
88
name: History
on:
workflow_call:
inputs:
start_date:
type: string
description: Start date for results analysis
required: true
default: 'yyyy-mm-dd'
end_date:
type: string
description: End date for results analysis
required: true
default: 'yyyy-mm-dd'
history_repo:
type: string
description: Repository for history
required: true
benchmark_utils_repo:
type: string
description: Repository where benchmark utils are stored
required: true
organization:
type: string
description: Organization based on which location of files will be different
required: true
secrets:
gh_token:
description: 'Github Access Token'
required: true
mail_user:
description: 'Email username'
required: true
mail_pass:
description: 'Email password'
required: true
env:
TEST_RESULTS_PATH: /usr/share/migraphx/${{ inputs.organization }}/test-results
UTILS_DIR: benchmark-utils
REPORTS_DIR: migraphx-reports
REPORTS_PATH: /usr/share/migraphx/${{ inputs.organization }}/reports
jobs:
performance_test:
name: MIGraphX results between dates
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout utils
uses: actions/checkout@v3
with:
repository: ${{ inputs.benchmark_utils_repo }}
path: ${{ env.UTILS_DIR }}
token: ${{ secrets.gh_token }}
- name: Checkout report's repo
uses: actions/checkout@v3
with:
repository: ${{ inputs.history_repo }}
path: ${{ env.REPORTS_DIR }}
token: ${{ secrets.gh_token }}
- name: Run history script
run: |
python3 $GITHUB_WORKSPACE/${{ env.UTILS_DIR }}/scripts/history.py \
-s '${{ inputs.start_date }}' \
-e '${{ inputs.end_date }}' \
-t '${{ env.TEST_RESULTS_PATH }}' \
-r '${{ env.REPORTS_PATH }}'
- name: Upload history results
run: |
cp ${{ env.REPORTS_PATH }}/history.xlsx $GITHUB_WORKSPACE/${{ env.REPORTS_DIR }}/
cd $GITHUB_WORKSPACE/${{ env.REPORTS_DIR }}/
git add ./history.xlsx
git config --local user.email github-actions
git config --local user.name github-actions@github.com
git commit -m "Push report between target dates" -a
git push
- name: Get link to results repository
run: |
echo https://github.com/${{ inputs.history_repo }}