Skip to content

Commit 221ea10

Browse files
authored
Merge branch 'master' into xgboost-event-level
2 parents 2e3c264 + 47b85dd commit 221ea10

38 files changed

+1417
-308
lines changed

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

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1+
# NOTE: This workflow is overkill for most R packages
2+
# check-standard.yaml is likely a better choice
3+
# usethis::use_github_action("check-standard") will install it.
4+
#
5+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
6+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
17
on:
28
push:
39
branches:
10+
- main
411
- master
512
pull_request:
613
branches:
14+
- main
715
- master
816

917
name: R-CMD-check
@@ -21,58 +29,53 @@ jobs:
2129
- {os: macOS-latest, r: 'release'}
2230
- {os: windows-latest, r: 'release'}
2331
- {os: windows-latest, r: '3.6'}
24-
- {os: ubuntu-16.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", http-user-agent: "R/4.0.0 (ubuntu-16.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
25-
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
26-
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
27-
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/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" }
33+
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
2834

2935
env:
30-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3136
RSPM: ${{ matrix.config.rspm }}
3237
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3338

3439
steps:
3540
- uses: actions/checkout@v2
3641

37-
- uses: r-lib/actions/setup-r@master
42+
- uses: r-lib/actions/setup-r@v1
43+
id: install-r
3844
with:
3945
r-version: ${{ matrix.config.r }}
4046
http-user-agent: ${{ matrix.config.http-user-agent }}
4147

42-
- uses: r-lib/actions/setup-pandoc@master
48+
- uses: r-lib/actions/setup-pandoc@v1
4349

44-
- name: Query dependencies
50+
- name: Install pak and query dependencies
4551
run: |
46-
install.packages('remotes')
47-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
48-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
52+
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
53+
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
4954
shell: Rscript {0}
5055

51-
- name: Cache R packages
52-
if: runner.os != 'Windows'
53-
uses: actions/cache@v1
56+
- name: Restore R package cache
57+
uses: actions/cache@v2
5458
with:
5559
path: ${{ env.R_LIBS_USER }}
56-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
57-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
60+
key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
61+
restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-
5862

5963
- name: Install system dependencies
6064
if: runner.os == 'Linux'
6165
run: |
62-
while read -r cmd
63-
do
64-
eval sudo $cmd
65-
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "16.04"), sep = "\n")')
66+
pak::local_system_requirements(execute = TRUE)
67+
pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
68+
shell: Rscript {0}
6669

6770
- name: Install dependencies
6871
run: |
69-
remotes::install_deps(dependencies = TRUE)
70-
remotes::install_cran("rcmdcheck")
72+
pak::local_install_dev_deps(upgrade = TRUE)
73+
pak::pkg_install("rcmdcheck")
7174
shell: Rscript {0}
7275

7376
- name: Install Miniconda
7477
run: |
75-
Rscript -e "remotes::install_github('rstudio/reticulate')"
78+
Rscript -e "pak::pkg_install('rstudio/reticulate')"
7679
Rscript -e "reticulate::install_miniconda()"
7780
7881
- name: Find Miniconda on macOS
@@ -83,7 +86,7 @@ jobs:
8386
run: |
8487
reticulate::conda_create('r-reticulate', packages = c('python==3.6.9'))
8588
tensorflow::install_tensorflow(version='1.14.0')
86-
shell: Rscript {0}
89+
shell: Rscript {0}
8790

8891
- name: Session info
8992
run: |
@@ -95,7 +98,9 @@ jobs:
9598
- name: Check
9699
env:
97100
_R_CHECK_CRAN_INCOMING_: false
98-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
101+
run: |
102+
options(crayon.enabled = TRUE)
103+
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
99104
shell: Rscript {0}
100105

101106
- name: Show testthat output
@@ -107,5 +112,5 @@ jobs:
107112
if: failure()
108113
uses: actions/upload-artifact@main
109114
with:
110-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
115+
name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results
111116
path: check

.github/workflows/check-pak.yaml

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

.github/workflows/lock.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'Lock Threads'
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
jobs:
8+
lock:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: dessant/lock-threads@v2
12+
with:
13+
github-token: ${{ github.token }}
14+
issue-lock-inactive-days: '14'
15+
# issue-exclude-labels: ''
16+
# issue-lock-labels: 'outdated'
17+
issue-lock-comment: >
18+
This issue has been automatically locked. If you believe you have
19+
found a related problem, please file a new issue (with a reprex:
20+
<https://reprex.tidyverse.org>) and link to this issue.
21+
issue-lock-reason: ''
22+
pr-lock-inactive-days: '14'
23+
# pr-exclude-labels: 'wip'
24+
pr-lock-labels: ''
25+
pr-lock-comment: >
26+
This pull request has been automatically locked. If you believe you
27+
have found a related problem, please file a new issue (with a reprex:
28+
<https://reprex.tidyverse.org>) and link to this issue.
29+
pr-lock-reason: ''
30+
# process-only: 'issues'

.github/workflows/pkgdown.yaml

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,63 @@
11
on:
22
push:
33
branches:
4-
- master
54
- main
6-
pull_request:
7-
branches:
85
- master
9-
- main
106

117
name: pkgdown
128

139
jobs:
1410
pkgdown:
15-
runs-on: macOS-latest
11+
runs-on: ubuntu-18.04
1612
env:
13+
RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest
1714
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
15+
1816
steps:
1917
- uses: actions/checkout@v2
2018

2119
- uses: r-lib/actions/setup-r@v1
20+
id: install-r
2221

2322
- uses: r-lib/actions/setup-pandoc@v1
2423

2524
- name: System dependencies
2625
run: brew install harfbuzz fribidi
2726

28-
- name: Query dependencies
27+
- name: Install pak and query dependencies
2928
run: |
30-
install.packages('remotes')
31-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
32-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
29+
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
30+
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
3331
shell: Rscript {0}
3432

35-
- name: Cache R packages
33+
- name: Restore R package cache
3634
uses: actions/cache@v2
3735
with:
3836
path: ${{ env.R_LIBS_USER }}
39-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
40-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
37+
key: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
38+
restore-keys: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-
39+
40+
- name: Install system dependencies
41+
if: runner.os == 'Linux'
42+
run: |
43+
pak::local_system_requirements(execute = TRUE)
44+
pak::pkg_system_requirements("pkgdown", execute = TRUE)
45+
shell: Rscript {0}
4146

4247
- name: Install dependencies
4348
run: |
44-
remotes::install_deps(dependencies = TRUE)
45-
remotes::install_github("tidyverse/tidytemplate")
46-
remotes::install_cran("tidymodels")
47-
remotes::install_cran("C50")
48-
install.packages("pkgdown", type = "binary")
49+
pak::local_install_dev_deps(upgrade = TRUE)
50+
pak::pkg_install("pkgdown")
51+
pak::pkg_install("tidyverse/tidytemplate")
52+
pak::pkg_install("tidymodels")
53+
pak::pkg_install("C50")
4954
shell: Rscript {0}
5055

5156
- name: Install package
5257
run: R CMD INSTALL .
5358

54-
- name: Build site
55-
if: github.event_name == 'pull_request'
56-
run: |
57-
Rscript -e 'pkgdown::build_site()'
58-
59-
- name: Deploy package
60-
if: github.event_name == 'push'
59+
- name: Build and deploy pkgdown site
6160
run: |
62-
git config --local user.email "[email protected]"
63-
git config --local user.name "GitHub Actions"
61+
git config --local user.name "$GITHUB_ACTOR"
62+
git config --local user.email "[email protected]"
6463
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

0 commit comments

Comments
 (0)