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

[R-package] [ci] Add test on R package with sanitizers #3439

Merged
merged 21 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from 8 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
172 changes: 86 additions & 86 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,91 +25,91 @@ jobs:
compiler: gcc
r_version: 3.6
build_type: cmake
- os: ubuntu-latest
task: r-package
compiler: gcc
r_version: 4.0
build_type: cmake
- os: ubuntu-latest
task: r-package
compiler: clang
r_version: 3.6
build_type: cmake
- os: ubuntu-latest
task: r-package
compiler: clang
r_version: 4.0
build_type: cmake
- os: ubuntu-latest
task: r-package-check-docs
compiler: gcc
r_version: 4.0
build_type: cmake
- os: macOS-latest
task: r-package
compiler: gcc
r_version: 3.6
build_type: cmake
- os: macOS-latest
task: r-package
compiler: gcc
r_version: 4.0
build_type: cmake
- os: macOS-latest
task: r-package
compiler: clang
r_version: 3.6
build_type: cmake
- os: macOS-latest
task: r-package
compiler: clang
r_version: 4.0
build_type: cmake
- os: windows-latest
task: r-package
compiler: MINGW
toolchain: MINGW
r_version: 3.6
build_type: cmake
- os: windows-latest
task: r-package
compiler: MINGW
toolchain: MSYS
r_version: 4.0
build_type: cmake
# Visual Studio 2017
- os: windows-2016
task: r-package
compiler: MSVC
toolchain: MSVC
r_version: 3.6
build_type: cmake
# Visual Studio 2019
- os: windows-2019
task: r-package
compiler: MSVC
toolchain: MSVC
r_version: 4.0
build_type: cmake
###############
# CRAN builds #
###############
- os: windows-latest
task: r-package
compiler: MINGW
toolchain: MSYS
r_version: 4.0
build_type: cran
- os: ubuntu-latest
task: r-package
compiler: gcc
r_version: 4.0
build_type: cran
- os: macOS-latest
task: r-package
compiler: clang
r_version: 4.0
build_type: cran
# - os: ubuntu-latest
# task: r-package
# compiler: gcc
# r_version: 4.0
# build_type: cmake
# - os: ubuntu-latest
# task: r-package
# compiler: clang
# r_version: 3.6
# build_type: cmake
# - os: ubuntu-latest
# task: r-package
# compiler: clang
# r_version: 4.0
# build_type: cmake
# - os: ubuntu-latest
# task: r-package-check-docs
# compiler: gcc
# r_version: 4.0
# build_type: cmake
# - os: macOS-latest
# task: r-package
# compiler: gcc
# r_version: 3.6
# build_type: cmake
# - os: macOS-latest
# task: r-package
# compiler: gcc
# r_version: 4.0
# build_type: cmake
# - os: macOS-latest
# task: r-package
# compiler: clang
# r_version: 3.6
# build_type: cmake
# - os: macOS-latest
# task: r-package
# compiler: clang
# r_version: 4.0
# build_type: cmake
# - os: windows-latest
# task: r-package
# compiler: MINGW
# toolchain: MINGW
# r_version: 3.6
# build_type: cmake
# - os: windows-latest
# task: r-package
# compiler: MINGW
# toolchain: MSYS
# r_version: 4.0
# build_type: cmake
# # Visual Studio 2017
# - os: windows-2016
# task: r-package
# compiler: MSVC
# toolchain: MSVC
# r_version: 3.6
# build_type: cmake
# # Visual Studio 2019
# - os: windows-2019
# task: r-package
# compiler: MSVC
# toolchain: MSVC
# r_version: 4.0
# build_type: cmake
# ###############
# # CRAN builds #
# ###############
# - os: windows-latest
# task: r-package
# compiler: MINGW
# toolchain: MSYS
# r_version: 4.0
# build_type: cran
# - os: ubuntu-latest
# task: r-package
# compiler: gcc
# r_version: 4.0
# build_type: cran
# - os: macOS-latest
# task: r-package
# compiler: clang
# r_version: 4.0
# build_type: cran
steps:
- name: Prevent conversion of line endings on Windows
if: startsWith(matrix.os, 'windows')
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
all-successful:
# https://gh.neting.ccmunity/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
runs-on: ubuntu-latest
needs: [test]
needs: [test, test-ubsan]
steps:
- name: Note that all tests succeeded
run: echo "🎉"
32 changes: 32 additions & 0 deletions .github/workflows/r-package-ubsan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: R package (ASAN/UBSAN)

on:
pull_request_review_comment:
types: [created]

jobs:
test:
name: Debian Linux, R-devel, GCC ASAN/UBSAN
if: github.event.comment.body == '/gha run r-sanitizers-check' && contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association)
jameslamb marked this conversation as resolved.
Show resolved Hide resolved
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: rhub/rocker-gcc-san
steps:
- name: Checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 5
submodules: true
- name: install
shell: bash
run: |
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'testthat'), repos = 'http://cran.r-project.org')"
sh build-cran-package.sh
Rdevel CMD INSTALL lightgbm_*.tar.gz
- name: test
shell: bash
run: |
cd R-package/tests
Rscriptdevel testthat.R 2>&1 | tee ubsan-tests.log | cat
exit $(cat ubsan-tests.log | grep "runtime error" | wc -l)