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