Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mem-check from template #101

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
^Meta$
^doc$
^data-raw$
^memcheck$
^CRAN-RELEASE$
^src\-
CONTRIBUTING
Expand Down
54 changes: 5 additions & 49 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
mem-check:
runs-on: ubuntu-20.04

name: valgrind ${{ matrix.config.test }}, ubuntu, R release
name: valgrind ${{ matrix.config.test }}

strategy:
fail-fast: false
Expand All @@ -45,59 +45,15 @@ jobs:
- {test: 'tests'}
- {test: 'examples'}
- {test: 'vignettes'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_FORCE_SUGGESTS_: false
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v2
- uses: ms609/actions/memcheck@main
with:
r-version: release

- uses: r-lib/actions/setup-pandoc@master

- name: Install valgrind
run: sudo apt-get install valgrind texlive-latex-base

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("devtools")
shell: Rscript {0}

- name: Install TreeDist
run: |
cd ..
R CMD build --no-manual --no-resave-data TreeDist
R CMD INSTALL TreeDist*.tar.gz
cd TreeDist

- name: valgrind - memcheck ${{ matrix.config.test }}
run: |
R -d "valgrind --tool=memcheck --leak-check=full --error-exitcode=1" --vanilla < memcheck/${{ matrix.config.test }}.R
extra-repositories: "https://ms609.github.io/packages/"
test: ${{ matrix.config.test}}
4 changes: 0 additions & 4 deletions memcheck/all.R

This file was deleted.

5 changes: 0 additions & 5 deletions memcheck/examples.R

This file was deleted.

5 changes: 0 additions & 5 deletions memcheck/tests.R

This file was deleted.

5 changes: 0 additions & 5 deletions memcheck/vignettes.R

This file was deleted.