Skip to content

Commit fdbb9b6

Browse files
committed
Merge branch 'main' into large-lists
2 parents 403fef4 + fc719b8 commit fdbb9b6

68 files changed

Lines changed: 4261 additions & 1782 deletions

Some content is hidden

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

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
CONTRIBUTING
1010
README.md
1111
^\.github
12+
^\.lintr
1213
cran-comments.md
1314
man-roxygen
1415
data-raw
@@ -30,5 +31,6 @@ revdep
3031
^\.travis\.yml$
3132
^\.zenodo\.json$
3233
^\.covrignore$
34+
^\.vs.*$
3335
^\.vscode.*$
3436
^CRAN-SUBMISSION$

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

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
on:
44
schedule:
55
- cron: "24 06 * * 1"
6+
workflow_dispatch:
67
push:
78
branches:
89
- main
@@ -48,15 +49,16 @@ jobs:
4849
config:
4950
- {os: windows-latest, r: 'release'}
5051
- {os: macOS-latest, r: 'release'}
52+
- {os: macos-15-intel, r: 'release'} # Until Intel architecture retired 2027-11
5153
- {os: ubuntu-22.04, r: '4.1',
5254
rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
53-
- {os: ubuntu-latest, r: 'release',
55+
- {os: ubuntu-24.04, r: 'release',
5456
rspm: "https://packagemanager.rstudio.com/cran/__linux__/noble/latest"}
5557
- {os: ubuntu-latest, r: 'devel',
5658
rspm: "https://packagemanager.rstudio.com/cran/__linux__/noble/latest"}
5759

5860
env:
59-
_R_CHECK_CRAN_INCOMING_: true # Seemingly not set by --as-cran
61+
_R_CHECK_CRAN_INCOMING_: ${{ github.event_name == 'pull_request' }}
6062
_R_CHECK_FORCE_SUGGESTS_: false # CRAN settings
6163
R_COMPILE_AND_INSTALL_PACKAGES: 'never'
6264
_R_CHECK_THINGS_IN_CHECK_DIR_: false
@@ -70,18 +72,25 @@ jobs:
7072
- name: Checkout git repo
7173
uses: actions/checkout@v5
7274

75+
- name: Temporarily bump package version
76+
run: |
77+
old_version=$(grep "Version:" DESCRIPTION | awk '{print $2}')
78+
if [[ $(echo "$old_version" | tr -cd '.' | wc -c) -eq 2 ]]; then
79+
new_version="${old_version}.8888"
80+
if [[ "$RUNNER_OS" == "macOS" ]]; then
81+
sed -i "" "s/Version: .*/Version: ${new_version}/" DESCRIPTION
82+
else
83+
sed -i "s/Version: .*/Version: ${new_version}/" DESCRIPTION
84+
fi
85+
fi
86+
shell: bash
87+
7388
- name: Set up R
7489
uses: r-lib/actions/setup-r@v2
7590
with:
7691
r-version: ${{ matrix.config.r }}
7792
extra-repositories: https://ms609.github.io/packages/
7893

79-
- name: Install apt packages (Linux)
80-
if: runner.os == 'Linux'
81-
run: |
82-
sudo apt-get update
83-
sudo apt-get install -y texlive-latex-base libglpk-dev texlive-fonts-recommended
84-
8594
- name: Set up R dependencies (Windows)
8695
if: runner.os == 'Windows'
8796
uses: r-lib/actions/setup-r-dependencies@v2
@@ -112,17 +121,30 @@ jobs:
112121
- name: Set up pandoc
113122
uses: r-lib/actions/setup-pandoc@v2
114123

115-
- name: Check with incoming checks (PR)
116-
if: github.event_name == 'pull_request'
124+
- name: Check package
117125
uses: r-lib/actions/check-r-package@v2
118126

119-
- name: Check without incoming checks (push/schedule)
120-
if: github.event_name == 'push' || github.event_name == 'schedule'
121-
uses: r-lib/actions/check-r-package@v2
122-
with:
123-
args: "--no-incoming-check"
124-
125127
- name: Code coverage
126128
if: runner.os == 'Windows'
127129
run: covr::codecov()
128130
shell: Rscript {0}
131+
132+
- name: Notify on failure
133+
if: failure() && github.event_name == 'schedule'
134+
uses: actions/github-script@v7
135+
with:
136+
github-token: ${{ secrets.GITHUB_TOKEN }}
137+
script: |
138+
await github.rest.issues.createComment({
139+
owner: context.repo.owner,
140+
repo: context.repo.repo,
141+
issue_number: 164,
142+
body: 'Scheduled workflow has failed: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
143+
});
144+
145+
await github.rest.issues.update({
146+
owner: context.repo.owner,
147+
repo: context.repo.repo,
148+
issue_number: 164,
149+
state: 'open'
150+
});

.github/workflows/benchmark.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,29 @@ name: Benchmark
22

33
on:
44
workflow_dispatch:
5-
pull_request:
6-
paths-ignore:
7-
- "Meta**"
8-
- "memcheck**"
9-
- "docs**"
10-
- "**.git"
11-
- "**.json"
12-
- "**.md"
13-
- "**.yaml"
14-
- "**.yml"
15-
- "!**benchmark.yml"
16-
- "**.R[dD]ata"
17-
- "**.Rpro*"
5+
workflow_run:
6+
workflows: ["R-CMD-check"]
7+
types:
8+
- completed
9+
paths:
10+
- "src/**"
11+
- "R/**"
12+
- "**.R"
13+
- "**.cpp"
14+
- "**.c"
15+
- "**.h"
16+
- "**.hpp"
17+
- "configure*"
18+
- "Makevars*"
19+
- "**benchmark.yml"
20+
- "!memcheck**"
21+
- "!docs**"
22+
- "!inst**"
23+
- "!man**"
24+
- "!man-roxygen**"
25+
- "!memcheck**"
26+
- "!tests**"
27+
- "!vignettes**"
1828

1929
jobs:
2030
benchmark:

.github/workflows/copilot-setup-steps.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ jobs:
4040
sudo apt-get update
4141
sudo apt-get install -y texlive-latex-base libglpk-dev texlive-fonts-recommended
4242
43-
- name: Set up R dependencies
43+
- name: Set up essential R dependencies
4444
uses: r-lib/actions/setup-r-dependencies@v2
4545
with:
46+
dependencies: '"hard"'
47+
cache: "always"
4648
extra-packages: |
4749
ms609/TreeDistData
4850
devtools
@@ -58,4 +60,4 @@ jobs:
5860
repository: ms609/TreeTools
5961
path: TreeTools-source
6062
# This provides access to TreeTools source code for agents to inspect
61-
# when debugging issues in TreeDist that may relate to TreeTools
63+
# when debugging issues in TreeDist that may relate to TreeTools

.github/workflows/memcheck.yml

Lines changed: 18 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,30 @@ on:
66
branches:
77
- main
88
- master
9-
paths-ignore:
10-
- "Meta**"
11-
- "docs**"
12-
- "**.git"
13-
- "**.json"
14-
- "**.md"
15-
- "**.yml"
16-
- "!**memcheck.yml"
17-
- "**.R[dD]ata"
18-
- "**.Rpro*"
9+
paths:
10+
- '.github/workflows/memcheck.yml'
11+
- 'src/**'
12+
- 'inst/include/**'
13+
- 'memcheck/**'
14+
- 'tests/testthat/**.R'
15+
- 'vignettes/**.Rmd'
1916
pull_request:
2017
branches:
2118
- main
2219
- master
23-
paths-ignore:
24-
- "Meta**"
25-
- "docs**"
26-
- "**.git"
27-
- "**.json"
28-
- "**.md"
29-
- "**.yml"
30-
- "!**memcheck.yml"
31-
- "**.R[dD]ata"
32-
- "**.Rpro*"
20+
paths:
21+
- '.github/workflows/memcheck.yml'
22+
- 'src/**'
23+
- 'inst/include/**'
24+
- 'memcheck/**'
25+
- 'tests/testthat/**.R'
26+
- 'vignettes/**.Rmd'
3327

3428
name: mem-check
3529

3630
jobs:
3731
mem-check:
38-
runs-on: ubuntu-20.04
39-
# stringi requires libicui18n - apt get libicu-dev too recent,
40-
# libicu66 deprecated in ubuntu 22.04
41-
# Reinstalling stringi seems not to help
42-
32+
runs-on: ubuntu-24.04
4333
name: valgrind ${{ matrix.config.test }}, ubuntu, R release
4434

4535
strategy:
@@ -53,61 +43,10 @@ jobs:
5343
env:
5444
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
5545
_R_CHECK_FORCE_SUGGESTS_: false
56-
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
46+
RSPM: https://packagemanager.rstudio.com/cran/__linux__/noble/latest
5747
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
5848

5949
steps:
60-
- uses: actions/checkout@v5
61-
62-
- uses: r-lib/actions/setup-r@v2
50+
- uses: ms609/actions/memcheck@main
6351
with:
64-
r-version: release
65-
66-
- uses: r-lib/actions/setup-pandoc@v2
67-
68-
- name: Query dependencies
69-
run: |
70-
install.packages('remotes')
71-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
72-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
73-
shell: Rscript {0}
74-
75-
- name: Install additional dependencies
76-
run: |
77-
sudo apt-get update
78-
sudo apt-get install -y texlive-latex-base texlive-fonts-recommended libglpk40 wget valgrind
79-
sudo apt-get install -y valgrind texlive-latex-base
80-
81-
- name: Install system dependencies
82-
run: |
83-
while read -r cmd
84-
do
85-
eval sudo $cmd
86-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", gsub("#\\d+~(\\d{2}\\.\\d{2}).*", "\\1", Sys.info()[["version"]]))')
87-
88-
- name: Cache R packages
89-
uses: actions/cache@v4
90-
with:
91-
path: ${{ env.R_LIBS_USER }}
92-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
93-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
94-
95-
- name: Install dependencies
96-
run: |
97-
remotes::install_github('RcppCore/Rcpp')
98-
remotes::install_github('ms609/TreeTools')
99-
remotes::install_github('ms609/TreeDistData')
100-
remotes::install_deps(dependencies = TRUE)
101-
remotes::install_cran("devtools")
102-
shell: Rscript {0}
103-
104-
- name: Install TreeDist
105-
run: |
106-
cd ..
107-
R CMD build --no-manual --no-resave-data TreeDist
108-
R CMD INSTALL TreeDist*.tar.gz
109-
cd TreeDist
110-
111-
- name: valgrind - memcheck ${{ matrix.config.test }}
112-
run: |
113-
R -d "valgrind --tool=memcheck --leak-check=full --errors-for-leak-kinds=definite --error-exitcode=1" --vanilla < memcheck/${{ matrix.config.test }}.R
52+
test: ${{ matrix.config.test}}

.github/workflows/rhub.yaml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# R-hub's generic GitHub Actions workflow file. Its canonical location is at
2-
# https://github.com/r-hub/rhub2/blob/v1/inst/workflow/rhub.yaml
1+
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
2+
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
33
# You can update this file to a newer version using the rhub2 package:
44
#
5-
# rhub2::rhub_setup()
5+
# rhub::rhub_setup()
66
#
77
# It is unlikely that you need to modify this file manually.
88

@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
# NO NEED TO CHECKOUT HERE
36-
- uses: r-hub/rhub2/actions/rhub-setup@v1
36+
- uses: r-hub/actions/setup@v1
3737
with:
3838
config: ${{ github.event.inputs.config }}
3939
id: rhub-setup
@@ -51,27 +51,17 @@ jobs:
5151
image: ${{ matrix.config.container }}
5252

5353
steps:
54-
- name: Check distribution
55-
run: |
56-
echo "distribution=$(awk -F= '/^ID=/{print $2}' /etc/os-release)" \
57-
>> $GITHUB_OUTPUT;
58-
id: check_distribution
59-
- name: apt-get install sudo (Ubuntu, for clang-asan)
60-
run: apt-get install sudo
61-
if: ${{ steps.check_distribution.outputs.distribution == 'ubuntu' }}
62-
- uses: r-lib/actions/setup-pandoc@v2
63-
if: ${{ steps.check_distribution.outputs.distribution != 'fedora' }}
64-
- uses: r-hub/rhub2/actions/rhub-checkout@v1
65-
- uses: r-hub/rhub2/actions/rhub-platform-info@v1
54+
- uses: r-hub/actions/checkout@v1
55+
- uses: r-hub/actions/platform-info@v1
6656
with:
6757
token: ${{ secrets.RHUB_TOKEN }}
6858
job-config: ${{ matrix.config.job-config }}
69-
- uses: r-hub/rhub2/actions/rhub-setup-deps@v1
59+
- uses: r-hub/actions/setup-deps@v1
7060
with:
7161
token: ${{ secrets.RHUB_TOKEN }}
7262
job-config: ${{ matrix.config.job-config }}
7363
extra-packages: TreeDistData=?ignore-before-r=99.0.0
74-
- uses: r-hub/rhub2/actions/rhub-run-check@v1
64+
- uses: r-hub/actions/run-check@v1
7565
with:
7666
token: ${{ secrets.RHUB_TOKEN }}
7767
job-config: ${{ matrix.config.job-config }}
@@ -87,25 +77,21 @@ jobs:
8777
config: ${{ fromJson(needs.setup.outputs.platforms) }}
8878

8979
steps:
90-
- uses: teatimeguest/setup-texlive-action@v3
91-
with:
92-
packages: scheme-basic
93-
- uses: r-lib/actions/setup-pandoc@v2
94-
- uses: r-hub/rhub2/actions/rhub-checkout@v1
95-
- uses: r-hub/rhub2/actions/rhub-setup-r@v1
80+
- uses: r-hub/actions/checkout@v1
81+
- uses: r-hub/actions/setup-r@v1
9682
with:
9783
job-config: ${{ matrix.config.job-config }}
9884
token: ${{ secrets.RHUB_TOKEN }}
99-
- uses: r-hub/rhub2/actions/rhub-platform-info@v1
85+
- uses: r-hub/actions/platform-info@v1
10086
with:
10187
token: ${{ secrets.RHUB_TOKEN }}
10288
job-config: ${{ matrix.config.job-config }}
103-
- uses: r-hub/rhub2/actions/rhub-setup-deps@v1
89+
- uses: r-hub/actions/setup-deps@v1
10490
with:
10591
job-config: ${{ matrix.config.job-config }}
10692
token: ${{ secrets.RHUB_TOKEN }}
10793
extra-packages: TreeDistData=?ignore-before-r=99.0.0
108-
- uses: r-hub/rhub2/actions/rhub-run-check@v1
94+
- uses: r-hub/actions/run-check@v1
10995
with:
11096
job-config: ${{ matrix.config.job-config }}
11197
token: ${{ secrets.RHUB_TOKEN }}

0 commit comments

Comments
 (0)