-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] introduce CI jobs that mimic CRAN gcc-ASAN and clang-ASAN tests (f…
…ixes #4674) (#4678) * add jobs mimicking CRAN gcc-ASAN and clang-ASAN * comment out CI * fix redirection * remove unnecessary echo * Revert "comment out CI" This reverts commit 899fbb4. * remove redundant env variables and update README * remove inaccurate comment * change test title * Revert "Fix ASAN issues with `std::function` usage (#4673)" This reverts commit 13ed38c. * Revert "Revert "Fix ASAN issues with `std::function` usage (#4673)"" This reverts commit 24c275b. * revert unnecessary change in config order * Apply suggestions from code review Co-authored-by: Nikita Titov <[email protected]> Co-authored-by: Nikita Titov <[email protected]>
- Loading branch information
1 parent
adef94f
commit f6c5574
Showing
2 changed files
with
52 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,16 +173,19 @@ jobs: | |
$env:TASK = "${{ matrix.task }}" | ||
& "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" | ||
test-r-sanitizers: | ||
name: r-package (ubuntu-latest, R-devel, GCC ASAN/UBSAN) | ||
name: r-sanitizers (ubuntu-latest, R-devel, ${{ matrix.compiler }} ASAN/UBSAN) | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
container: rhub/rocker-gcc-san | ||
container: wch1/r-debug | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- r_customization: san | ||
compiler: gcc | ||
- r_customization: csan | ||
compiler: clang | ||
steps: | ||
- name: Install Git before checkout | ||
shell: bash | ||
run: | | ||
apt-get update --allow-releaseinfo-change | ||
apt-get install --no-install-recommends -y git | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -191,16 +194,17 @@ jobs: | |
- name: Install packages | ||
shell: bash | ||
run: | | ||
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'Matrix', 'testthat'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores())" | ||
RDscript${{ matrix.r_customization }} -e "install.packages(c('R6', 'data.table', 'jsonlite', 'Matrix', 'testthat'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores())" | ||
sh build-cran-package.sh | ||
Rdevel CMD INSTALL lightgbm_*.tar.gz || exit -1 | ||
RD${{ matrix.r_customization }} CMD INSTALL lightgbm_*.tar.gz || exit -1 | ||
- name: Run tests with sanitizers | ||
shell: bash | ||
run: | | ||
cd R-package/tests | ||
Rscriptdevel testthat.R 2>&1 > ubsan-tests.log | ||
cat ubsan-tests.log | ||
exit $(cat ubsan-tests.log | grep --count "runtime error") | ||
exit_code=0 | ||
RDscript${{ matrix.r_customization }} testthat.R >> tests.log 2>&1 || exit_code=1 | ||
cat ./tests.log | ||
exit ${exit_code} | ||
test-r-debian-clang: | ||
name: r-package (debian, R-devel, clang) | ||
timeout-minutes: 60 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters