|
1 | 1 | name: Continuous Benchmarks (Receive)
|
2 |
| -concurrency: |
3 |
| - group: ${{ github.workflow }}-${{ github.head_ref }} |
4 |
| - cancel-in-progress: true |
5 |
| - |
6 | 2 | on: pull_request
|
7 | 3 | jobs:
|
8 | 4 | prepare:
|
|
37 | 33 | RSPM: ${{ matrix.config.rspm }}
|
38 | 34 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
39 | 35 | steps:
|
40 |
| - - name: Checkout repo |
41 |
| - uses: actions/checkout@v2 |
42 |
| - with: |
43 |
| - fetch-depth: 0 |
44 |
| - - name: Set up git user |
45 |
| - run: | |
46 |
| - git config --local user.name "GitHub Actions" |
47 |
| - git config --local user.email "[email protected]" |
48 |
| - - name: Ensure base branch is fetched |
49 |
| - run: | |
50 |
| - git checkout -b $GITHUB_HEAD_REF # this is current ref. This is required for naming. |
51 |
| - git branch $GITHUB_BASE_REF remotes/origin/$GITHUB_BASE_REF |
52 |
| - - name: Setup R |
53 |
| - uses: r-lib/actions/setup-r@master |
54 |
| - - name: Query dependencies |
55 |
| - run: | |
56 |
| - install.packages('remotes') |
57 |
| - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) |
58 |
| - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") |
59 |
| - shell: Rscript {0} |
60 |
| - - name: Cache R packages |
61 |
| - if: runner.os != 'Windows' |
62 |
| - uses: actions/cache@v1 |
63 |
| - with: |
64 |
| - path: ${{ env.R_LIBS_USER }} |
65 |
| - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-3-${{ hashFiles('.github/depends.Rds') }} |
66 |
| - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-3- |
67 |
| - - name: Install system dependencies |
68 |
| - if: runner.os == 'Linux' |
69 |
| - env: |
70 |
| - RHUB_PLATFORM: linux-x86_64-ubuntu-gcc |
71 |
| - run: | |
72 |
| - Rscript -e "remotes::install_github('r-hub/sysreqs')" |
73 |
| - sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") |
74 |
| - sudo -s eval "$sysreqs" |
75 |
| - sudo apt-get install libcurl4-openssl-dev libgit2-dev |
76 |
| - - name: Install dependencies |
77 |
| - run: | |
78 |
| - remotes::install_deps(dependencies = TRUE) |
79 |
| - remotes::install_github("lorenzwalthert/touchstone") |
80 |
| - remotes::install_cran(c('ggplot2', 'dplyr')) |
81 |
| - pkg <- basename(getwd()) |
82 |
| - if (pkg %in% rownames(installed.packages())) { |
83 |
| - remove.packages(pkg) |
84 |
| - cat('removed package ', pkg, '.', sep = "") |
85 |
| - } |
86 |
| - shell: Rscript {0} |
87 |
| - - name: Checkout benchmarking repo |
88 |
| - uses: actions/checkout@v2 |
89 |
| - with: |
90 |
| - repository: ${{ matrix.config.benchmarking_repo }} |
91 |
| - ref: ${{ matrix.config.benchmarking_ref }} |
92 |
| - path: ${{ matrix.config.benchmarking_path }} |
93 |
| - - name: Run benchmarks |
94 |
| - run: Rscript -e 'touchstone::run_script("touchstone/script.R")' |
95 |
| - - name: Save PR number |
96 |
| - run: | |
97 |
| - echo ${{ github.event.number }} > ./touchstone/pr-comment/NR |
98 |
| - - uses: actions/upload-artifact@v2 |
99 |
| - with: |
100 |
| - name: visual-benchmarks |
101 |
| - path: touchstone/plots/ |
102 |
| - - uses: actions/upload-artifact@v1 |
103 |
| - with: |
104 |
| - name: results |
105 |
| - path: touchstone/pr-comment |
106 |
| - - uses: actions/download-artifact@v1 |
107 |
| - with: |
108 |
| - name: results |
109 |
| - - name: comment PR |
110 |
| - run: cat touchstone/pr-comment/info.txt |
111 |
| - - uses: actions/upload-artifact@v2 |
| 36 | + - uses: lorenzwalthert/touchstone/actions/receive@standalone-action |
112 | 37 | with:
|
113 |
| - name: pr |
114 |
| - path: touchstone/pr-comment/ |
| 38 | + cache-version: 1 |
| 39 | + benchmarking_repo: ${{matrix.config.benchmarking_repo}} |
| 40 | + benchmarking_ref: ${{matrix.config.benchmarking_ref}} |
| 41 | + benchmarking_path: ${{matrix.config.benchmarking_path}} |
0 commit comments