11name : User-requested benchmarks
2+
23on :
34 issue_comment :
45 types : [created]
89 pr_number :
910 required : true
1011 type : number
12+
13+ permissions :
14+ contents : write
15+ pull-requests : write
16+
1117jobs :
1218 run_benchmarks :
1319 runs-on : ubuntu-latest
@@ -17,10 +23,21 @@ jobs:
1723 uses : actions/checkout@v2
1824 with :
1925 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
2138
2239 - 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
2441
2542 - name : Run C Benchmarks
2643 # run: |
@@ -38,43 +55,36 @@ jobs:
3855 ./runner/collect_results.py latest latest-benchmark-results.csv
3956 shell : bash
4057
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-
4958 - name : Make figure
5059 run : |
51- OUTPUT_DIR=runner/ images/$(date -I)
60+ OUTPUT_DIR=images/$(date -I)
5261 SHA=${{ github.sha }}
5362 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
5665 echo "::set-output name=output_file::$OUTPUT_FILE"
5766 shell : bash
5867 id : figure
5968
6069 - name : Commit figure
6170 run : |
62- cd graphics-repo
71+ cd reactor-c
6372 git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
6473 git config --global user.name "github-actions[bot]"
74+ git fetch
75+ git switch graphics
6576 git add ${{ steps.figure.outputs.OUTPUT_FILE }}
6677 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
7383
7484 - name : Comment PR
7585 uses : thollander/actions-comment-pull-request@v1
7686 with :
7787 message : |
78- 
79- pr_number : 51 # ${{ inputs.pr_number }}
88+ 
89+ pr_number : 91 # ${{ inputs.pr_number }}
8090 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments