Skip to content

Commit

Permalink
Pull request #15: Add ASAN/UBSAN pipeline
Browse files Browse the repository at this point in the history
Merge in STAT/prestogp from build-workflow to to-git

Squashed commit of the following:

commit 2c9c2ed
Merge: 6af43f4 56cdbf2
Author: sciome-bot <software.tools@sciome.com>
Date:   Thu Dec 28 13:11:14 2023 -0500

    Merge branch 'to-git' of ssh://sciome-bot/stat/prestogp into build-workflow

commit 6af43f4
Merge: e530819 17f5284
Author: sciome-bot <software.tools@sciome.com>
Date:   Thu Dec 28 13:07:50 2023 -0500

    Merge branch 'master' of ssh://sciome-bot/stat/prestogp into build-workflow

commit e530819
Author: sciome-bot <software.tools@sciome.com>
Date:   Thu Dec 28 13:06:21 2023 -0500

    Add USAN/ASAN pipeline

commit 17f5284
Merge: ea78ffa 895100d
Author: Eric Bair <eric.bair@sciome.com>
Date:   Fri Dec 1 10:49:09 2023 -0500

    Pull request #12: Testing

    Merge in STAT/prestogp from testing to master

    * commit '895100db78d89c5082ddfcf1411dad69bdf1b6c5':
      Fixed another sparseNN bug and updated tests
      Fixed a bug in SparseNN
      Added more likelihood and maxmin ordering tests

commit 895100d
Merge: 7f3ca3c fb060ff
Author: Eric Bair <eric.bair@sciome.com>
Date:   Wed Nov 29 17:02:10 2023 -0500

    Merge branch 'to-git' of http://192.168.167.103:7990/bitbucket/scm/stat/prestogp into testing

    Conflicts:
    	DESCRIPTION
    	man/prestogp_fit-PrestoGPModel-method.Rd
    	tests/testthat/test-Log_Likelihood.R

    Fixed merge conflicts.

commit 7f3ca3c
Author: Eric Bair <eric.bair@sciome.com>
Date:   Wed Nov 29 16:43:40 2023 -0500

    Fixed another sparseNN bug and updated tests

commit 1ca9586
Author: Eric Bair <eric.bair@sciome.com>
Date:   Tue Nov 28 18:40:36 2023 -0500

    Fixed a bug in SparseNN

commit 80a9818
Author: Eric Bair <eric.bair@sciome.com>
Date:   Tue Nov 21 17:49:19 2023 -0500

    Added more likelihood and maxmin ordering tests

commit 4822fbc
Author: sciome-bot <software.tools@sciome.com>
Date:   Mon Nov 20 15:01:37 2023 -0500

    Add UBSAN/ASAN sanitizers

commit ea78ffa
Merge: 286ba5d 53e2b0d
Author: sciome-bot <software.tools@sciome.com>
Date:   Mon Nov 20 12:41:08 2023 -0500

    Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP

commit 286ba5d
Merge: f52ebbb 84fd72f
Author: sciome-bot <software.tools@sciome.com>
Date:   Tue Nov 14 13:11:48 2023 -0500

    Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP

commit f52ebbb
Merge: 4e0e1ec 2dd74a2
Author: Eric Bair <eric.bair@sciome.com>
Date:   Tue Nov 14 13:10:51 2023 -0500

    Pull request #9: Testing

    * commit '2dd74a21380be960918b6067abec8ec163721853':
      Added a simulation file for testing
      Fixed likelihood function and added additional tests
      Fixed likelihood function and added additional test

commit 2dd74a2
Author: Eric Bair <eric.bair@sciome.com>
Date:   Mon Nov 13 19:17:43 2023 -0500

    Added a simulation file for testing

commit 6c17318
Author: Eric Bair <eric.bair@sciome.com>
Date:   Mon Nov 13 19:16:32 2023 -0500

    Fixed likelihood function and added additional tests

commit f90ce5e
Author: Eric Bair <eric.bair@sciome.com>
Date:   Mon Nov 13 19:10:57 2023 -0500

    Fixed likelihood function and added additional test

commit 4e0e1ec
Merge: 0d13ba9 a6d1d1b
Author: Eric Bair <eric.bair@sciome.com>
Date:   Tue Nov 7 15:38:43 2023 -0500

    Pull request #7: Testing

    Merge in STAT/prestogp from testing to master

    * commit 'a6d1d1b06e9f640140bad7f03746d14ef0629af4':
      Added new testing files
      Added new testthat tests
  • Loading branch information
shail-choksi committed Dec 28, 2023
1 parent ae3d17b commit 1e4361d
Showing 1 changed file with 170 additions and 0 deletions.
170 changes: 170 additions & 0 deletions .github/workflows/sanitizers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
name: UBSAN/ASAN Checks

on:
pull_request:
branches: [ "main" ]
push:
branches: [ "build-workflow" ]
workflow_dispatch:


permissions:
contents: read

jobs:
sanitizer-check-asan:
runs-on: ubuntu-latest
env:
CC: clang
CXX: clang++
CXXFLAGS: "-fsanitize=address"
LINK: clang++
ASAN: true
UBSAN: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
## R CMD check
_R_CHECK_CRAN_INCOMING_: false
_R_CHECK_LENGTH_1_CONDITION_: true
_R_CHECK_LENGTH_1_LOGIC2_: true
_R_CHECK_MATRIX_DATA_: true
## Specific to package
_R_CHECK_USE_VALGRIND_: true
UBSAN_OPTIONS: "print_stacktrace=1"
steps:
- uses: actions/checkout@v2
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: latest
platform: x64
- uses: r-lib/actions/setup-pandoc@v2

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

- 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@v3
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
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check with ASAN
run: rcmdcheck::rcmdcheck(build_args = "--no-build-vignettes", args = c("--no-codoc", "--no-examples", "--no-manual", "--ignore-vignettes"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-asan-rrelease-results
path: check
sanitizer-check-usan:
runs-on: ubuntu-latest
env:
CC: clang
CXX: clang++
CXXFLAGS: "-fsanitize=undefined"
LINK: clang++
ASAN: true
UBSAN: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
## R CMD check
_R_CHECK_CRAN_INCOMING_: false
_R_CHECK_LENGTH_1_CONDITION_: true
_R_CHECK_LENGTH_1_LOGIC2_: true
_R_CHECK_MATRIX_DATA_: true
## Specific to package
_R_CHECK_USE_VALGRIND_: true
UBSAN_OPTIONS: "print_stacktrace=1"
steps:
- uses: actions/checkout@v2
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: latest
platform: x64
- uses: r-lib/actions/setup-pandoc@v2

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

- 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@v3
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
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check with UBSAN
run: rcmdcheck::rcmdcheck(build_args = "--no-build-vignettes", args = c("--no-codoc", "--no-examples", "--no-manual", "--ignore-vignettes"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-ubsan-rrelease-results
path: check

0 comments on commit 1e4361d

Please sign in to comment.