-
Notifications
You must be signed in to change notification settings - Fork 4k
[R-package] [ci] Add test on R package with sanitizers #3439
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
Changes from 20 commits
03b9032
c2b264b
4d1ffb9
231ca27
44aabab
29d121d
d8ffbbe
c61fab0
bc4df98
b462ea9
0ffb520
9a4b11e
0d22def
7b71fd2
ea24d06
c6503bc
6018aa2
55ec1ee
bc1b107
4e098a0
e5cf2c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -159,10 +159,35 @@ jobs: | |
| $env:TASK = "${{ matrix.task }}" | ||
| conda init powershell | ||
| & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" | ||
| test-r-sanitizers: | ||
| name: r-package (ubuntu-latest, R-devel, GCC ASAN/UBSAN) | ||
| 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')" | ||
jameslamb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sh build-cran-package.sh | ||
| Rdevel CMD INSTALL lightgbm_*.tar.gz | ||
jameslamb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - name: test | ||
jameslamb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| shell: bash | ||
| run: | | ||
| cd R-package/tests | ||
| Rscriptdevel testthat.R 2>&1 > ubsan-tests.log | ||
| cat ubsan-tests.log | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was it left intentionally or it was for debugging purposes?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I left it in intentionally, so that if the job fails you have enough logs to be able to tell what went wrong
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK. |
||
| exit $(cat ubsan-tests.log | grep "runtime error" | wc -l) | ||
| all-successful: | ||
| # https://github.bileizhen.workers.devmunity/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-r-sanitizers] | ||
| steps: | ||
| - name: Note that all tests succeeded | ||
| run: echo "🎉" | ||
Uh oh!
There was an error while loading. Please reload this page.