@@ -21,16 +21,18 @@ jobs:
21
21
GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
22
22
steps :
23
23
- name : Checkout repo
24
+ uses : actions/checkout@v2
24
25
with :
25
- fetch-depth : 0
26
- uses : actions/checkout@master
26
+ fetch-depth : 0
27
27
- name : Set up git user
28
28
run : |
29
29
git config --local user.name "GitHub Actions"
30
30
git config --local user.email "[email protected] "
31
31
- name : Ensure base branch is fetched
32
32
if : ${{ github.event_name == 'pull_request' }}
33
- run : git branch $GITHUB_BASE_REF remotes/origin/$GITHUB_BASE_REF; git branch
33
+ run : |
34
+ git checkout -b $GITHUB_HEAD_REF
35
+ git branch $GITHUB_BASE_REF remotes/origin/$GITHUB_BASE_REF
34
36
- name : Setup R
35
37
uses : r-lib/actions/setup-r@master
36
38
- name : Query dependencies
@@ -57,39 +59,33 @@ jobs:
57
59
sudo apt-get install libcurl4-openssl-dev libgit2-dev
58
60
- name : Install dependencies
59
61
run : |
60
- Rscript -e "install.packages(c('gert', ' ggplot2', 'purrr'))" -e "remotes::install_deps(dependencies = TRUE); remotes::install_github('r-lib/bench') "
62
+ Rscript -e "install.packages(c('ggplot2', 'purrr'))" -e "remotes::install_deps(dependencies = TRUE); remotes::install_github(c( 'r-lib/bench', 'lorenzwalthert/touchstone')); "
61
63
R CMD INSTALL .
62
64
- name : Checkout benchmarking repo
63
65
uses : actions/checkout@v2
64
66
with :
65
67
repository : lorenzwalthert/here
66
68
ref : ca9c8e69c727def88d8ba1c8b85b0e0bcea87b3f
67
- path : bench/sources/here
68
- - name : Fetch existing benchmarks
69
- run : Rscript -e 'rlang::with_handlers(bench::cb_fetch(), error = function(e) paste("Could not fetch benchmarks, skipping. The error was", conditionMessage(e)))'
69
+ path : touchstone/sources/here
70
70
- name : Prepare PR comment
71
71
run : |
72
- mkdir -p bench/pr-comment
73
- echo "Here is how the current PR would change benchmark results when merged into $GITHUB_BASE_REF:" > bench/pr-comment/info.txt
74
- echo "$GITHUB_EVENT_PULL_REQUEST_HEAD_SHA" >> bench/pr-comment/info.txt
72
+ mkdir -p touchstone/sources
73
+ mkdir -p touchstone/pr-comment
74
+ mkdir -p touchstone/plots
75
+ echo "Here is how the current PR would change benchmark results when merged into $GITHUB_BASE_REF:" > touchstone/pr-comment/info.txt
76
+ echo "$GITHUB_EVENT_PULL_REQUEST_HEAD_SHA" >> touchstone/pr-comment/info.txt
75
77
- name : Run benchmarks
76
- run : Rscript -e 'bench::cb_run()'
77
- - name : Show benchmarks
78
- run : git notes --ref benchmarks show
78
+ run : Rscript 'touchstone/script.R'
79
79
- uses : actions/upload-artifact@v2
80
80
with :
81
81
name : visual-benchmarks
82
- path : bench/plots/
83
- - name : Push benchmarks
84
- if : ${{ github.event_name == 'push' }}
85
- run : Rscript -e "bench::cb_push()"
82
+ path : touchstone/plots/
86
83
- uses : actions/upload-artifact@v1
87
84
with :
88
85
name : results
89
- path : bench /pr-comment
86
+ path : touchstone /pr-comment
90
87
- uses : actions/download-artifact@v1
91
88
with :
92
89
name : results
93
90
- name : comment PR
94
- # uses: machine-learning-apps/pr-comment@master
95
- run : cat bench/pr-comment/info.txt
91
+ run : cat touchstone/pr-comment/info.txt
0 commit comments