1
1
name : User-requested benchmarks
2
+
2
3
on :
3
4
issue_comment :
4
5
types : [created]
8
9
pr_number :
9
10
required : true
10
11
type : number
12
+
13
+ permissions :
14
+ contents : write
15
+ pull-requests : write
16
+
11
17
jobs :
12
18
run_benchmarks :
13
19
runs-on : ubuntu-latest
@@ -17,10 +23,21 @@ jobs:
17
23
uses : actions/checkout@v2
18
24
with :
19
25
repository : lf-lang/benchmarks-lingua-franca
20
- ref : cb # FIXME: delete this line after merge
26
+ token : ${{ secrets.GITHUB_TOKEN }}
27
+ fetch-depth : 1
28
+ ref : automated-full-benchmark # FIXME: delete this line after merge
29
+
30
+ - name : Checkout reactor-c
31
+ uses : actions/checkout@v2
32
+ with :
33
+ repository : lf-lang/reactor-c
34
+ token : ${{ secrets.GITHUB_TOKEN }}
35
+ fetch-depth : 0 # It will be necessary to push to this repo
36
+ ref : automated-full-benchmark # FIXME: delete this line after merge
37
+ path : reactor-c
21
38
22
39
- name : Set up workspace
23
- uses : lf-lang/reactor-c/.github/actions/set-up-workspace@continuous-benchmarking
40
+ uses : lf-lang/reactor-c/.github/actions/set-up-workspace@automated-full-benchmark
24
41
25
42
- name : Run C Benchmarks
26
43
# run: |
@@ -38,43 +55,36 @@ jobs:
38
55
./runner/collect_results.py latest latest-benchmark-results.csv
39
56
shell : bash
40
57
41
- - name : Checkout repository for saving graphics
42
- uses : actions/checkout@v2
43
- with :
44
- repository : lf-lang/benchmarks-lingua-franca
45
- ref : graphics
46
- path : graphics-repo
47
- fetch-depth : 0 # History is required for push
48
-
49
58
- name : Make figure
50
59
run : |
51
- OUTPUT_DIR=runner/ images/$(date -I)
60
+ OUTPUT_DIR=images/$(date -I)
52
61
SHA=${{ github.sha }}
53
62
OUTPUT_FILE=$OUTPUT_DIR/${SHA:0:7}.png
54
- mkdir -p graphics-repo /$OUTPUT_DIR
55
- ./runner/make-graphics.py latest-benchmark-results.csv graphics-repo /$OUTPUT_FILE
63
+ mkdir -p reactor-c /$OUTPUT_DIR
64
+ ./runner/make-graphics.py latest-benchmark-results.csv reactor-c /$OUTPUT_FILE
56
65
echo "::set-output name=output_file::$OUTPUT_FILE"
57
66
shell : bash
58
67
id : figure
59
68
60
69
- name : Commit figure
61
70
run : |
62
- cd graphics-repo
71
+ cd reactor-c
63
72
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
64
73
git config --global user.name "github-actions[bot]"
74
+ git fetch
75
+ git switch graphics
65
76
git add ${{ steps.figure.outputs.OUTPUT_FILE }}
66
77
git commit -m "benchmark ${{ github.sha }}"
67
-
68
- - name : Push figure
69
- uses : ad-m/github-push-action@master
70
- with :
71
- github_token : ${{ secrets.GITHUB_TOKEN }}
72
- branch : graphics
78
+ git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | \
79
+ xargs -L1 git config --unset-all
80
+ git push https://token:${{ secrets.GITHUB_TOKEN }}@github.com/lf-lang/reactor-c.git
81
+ cd ..
82
+ shell : bash
73
83
74
84
- name : Comment PR
75
85
uses : thollander/actions-comment-pull-request@v1
76
86
with :
77
87
message : |
78
- 
79
- pr_number : 51 # ${{ inputs.pr_number }}
88
+ 
89
+ pr_number : 91 # ${{ inputs.pr_number }}
80
90
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments