Skip to content

Commit 8f76e8f

Browse files
Merge 809c6ab into 9305b62
2 parents 9305b62 + 809c6ab commit 8f76e8f

File tree

128 files changed

+2233
-406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+2233
-406
lines changed

.Rbuildignore

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
^Meta$
2-
^doc$
1+
^.*-in_tree$
32
^.*\.Rproj$
4-
^\.Rproj\.user$
53
^API$
6-
^README\.Rmd$
4+
^CONTRIBUTING\.md$
5+
^LICENSE\.md$
6+
^Meta$
77
^README-.*\.png$
8-
^appveyor\.yml$
9-
^tic\.R$
10-
^docs$
11-
^_pkgdown\.yml$
12-
CONTRIBUTING.md
8+
^README\.Rmd$
9+
^\.Rproj\.user$
10+
^\.github$
1311
^\.gitsum$
14-
^gitsum$
15-
revdep
12+
^\.pre-commit-config\.yaml$
13+
^_pkgdown\.yml$
1614
^cran-comments\.md$
15+
^doc$
16+
^docs$
17+
^gitsum$
18+
^inst/WORDLIST$
19+
^inst/hooks/.*$
20+
^revdep$
1721
^tests/testmanual$
18-
^\.pre-commit-config\.yaml$
19-
^brew\-log$
20-
^\.github/$
22+
^tic\.R$
2123
^touchstone$
22-
^\.github$
23-
^LICENSE\.md$
24-
^inst/hooks/$
25-
^inst/WORDLIST$
24+
^vignettes/gsoc_proposal$

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tests/testthat/**/*_tree linguist-generated=true
1+
tests/testthat/**/*_tree linguist-generated=true

.github/workflows/R-CMD-check.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ on:
1616

1717
name: R-CMD-check
1818

19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.head_ref }}
21+
cancel-in-progress: true
22+
23+
1924
jobs:
2025
R-CMD-check:
2126
runs-on: ${{ matrix.config.os }}
@@ -27,9 +32,10 @@ jobs:
2732
matrix:
2833
config:
2934
- {os: macOS-latest, r: 'release'}
35+
- {os: windows-latest, r: 'devel'}
3036
- {os: windows-latest, r: 'release'}
31-
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
32-
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
37+
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
38+
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
3339
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
3440
- {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
3541
- {os: ubuntu-18.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}

.github/workflows/cancel.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/check-full.yaml

Whitespace-only changes.

.github/workflows/pkgdown.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
push:
3-
branches: master
3+
branches: main
44

55
name: pkgdown
66

.github/workflows/pre-commit.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: pre-commit
2+
on:
3+
push:
4+
branches-ignore:
5+
- 'master'
6+
- 'main'
7+
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
10+
jobs:
11+
pre-commit:
12+
runs-on: ubuntu-18.04
13+
if: >-
14+
!contains(github.event.head_commit.message, 'ci skip') &&
15+
(
16+
startsWith(github.ref, 'refs/heads') ||
17+
github.event.pull_request.draft == false
18+
)
19+
steps:
20+
- name: Cancel Previous Runs
21+
uses: styfle/cancel-workflow-action@0.6.0
22+
with:
23+
access_token: ${{ github.token }}
24+
- uses: actions/checkout@v2
25+
with:
26+
fetch-depth: 0
27+
- name: Install system dependencies
28+
if: runner.os == 'Linux'
29+
run: |
30+
# your system installation code here
31+
# sudo apt-get install -y libcurl4-openssl-dev
32+
- name: Set up Python
33+
uses: actions/setup-python@v2
34+
with:
35+
python-version: "3.9"
36+
architecture: "x64"
37+
- name: Run pre-commit
38+
uses: pre-commit/action@v2.0.3
39+
- name: Commit files
40+
if: failure() && startsWith(github.ref, 'refs/heads')
41+
run: |
42+
if [[ `git status --porcelain --untracked-files=no` ]]; then
43+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
44+
git config --local user.name "github-actions[bot]"
45+
git checkout -- .github/workflows
46+
git commit -m "pre-commit" -a
47+
fi
48+
- name: Push changes
49+
if: failure() && startsWith(github.ref, 'refs/heads')
50+
uses: ad-m/github-push-action@master
51+
with:
52+
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
branch: ${{ github.ref }}
54+
env:
55+
RENV_CONFIG_CACHE_ENABLED: FALSE

.github/workflows/test-coverage.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
on:
22
push:
33
branches:
4-
- master
4+
- main
55
pull_request:
66
branches:
7-
- master
7+
- main
88

99
name: test-coverage
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref }}
13+
cancel-in-progress: true
14+
15+
1116
jobs:
1217
test-coverage:
1318
runs-on: macOS-latest
Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Continuous Benchmarks (Comment)
22

3-
# read-write repo token
4-
# access to secrets
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref }}
5+
cancel-in-progress: true
6+
57
on:
68
workflow_run:
79
workflows: ["Continuous Benchmarks (Receive)"]
@@ -15,38 +17,6 @@ jobs:
1517
${{ github.event.workflow_run.event == 'pull_request' &&
1618
github.event.workflow_run.conclusion == 'success' }}
1719
steps:
18-
- name: 'Download artifact'
19-
uses: actions/github-script@v3.1.0
20-
with:
21-
script: |
22-
var artifacts = await github.actions.listWorkflowRunArtifacts({
23-
owner: context.repo.owner,
24-
repo: context.repo.repo,
25-
run_id: ${{github.event.workflow_run.id }},
26-
});
27-
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
28-
return artifact.name == "pr"
29-
})[0];
30-
var download = await github.actions.downloadArtifact({
31-
owner: context.repo.owner,
32-
repo: context.repo.repo,
33-
artifact_id: matchArtifact.id,
34-
archive_format: 'zip',
35-
});
36-
var fs = require('fs');
37-
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
38-
- run: unzip pr.zip
39-
- name: 'Comment on PR'
40-
uses: actions/github-script@v3
20+
- uses: lorenzwalthert/touchstone/actions/comment@main
4121
with:
42-
github-token: ${{ secrets.GITHUB_TOKEN }}
43-
script: |
44-
var fs = require('fs');
45-
var issue_number = Number(fs.readFileSync('./NR'));
46-
var body = fs.readFileSync('./info.txt').toString();
47-
await github.issues.createComment({
48-
owner: context.repo.owner,
49-
repo: context.repo.repo,
50-
issue_number: issue_number,
51-
body: body
52-
});
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 12 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Continuous Benchmarks (Receive)
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref }}
5+
cancel-in-progress: true
6+
27
on: pull_request
8+
39
jobs:
410
prepare:
511
runs-on: ubuntu-latest
@@ -9,7 +15,7 @@ jobs:
915
- name: Checkout repo
1016
uses: actions/checkout@v2
1117
with:
12-
fetch-depth: 0
18+
fetch-depth: 0
1319

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

0 commit comments

Comments
 (0)