@@ -246,7 +246,7 @@ jobs:
246
246
- name : Install packages
247
247
shell : bash
248
248
run : |
249
- RDscript${{ matrix.r_customization }} -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix ', 'RhpcBLASctl ', 'rmarkdown ', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
249
+ RDscript${{ matrix.r_customization }} -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown ', 'Matrix ', 'RhpcBLASctl ', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
250
250
sh build-cran-package.sh --r-executable=RD${{ matrix.r_customization }}
251
251
RD${{ matrix.r_customization }} CMD INSTALL lightgbm_*.tar.gz || exit -1
252
252
- name : Run tests with sanitizers
@@ -258,10 +258,21 @@ jobs:
258
258
cat ./tests.log
259
259
exit ${exit_code}
260
260
test-r-debian-clang :
261
- name : r-package (debian, R-devel, clang)
261
+ name : r-package (debian, R-devel, clang-${{ matrix.clang-version }} )
262
262
timeout-minutes : 60
263
+ strategy :
264
+ fail-fast : false
265
+ matrix :
266
+ # list of versions tested in CRAN "Additional Checks":
267
+ # https://cran.r-project.org/web/checks/check_issue_kinds.html
268
+ clang-version :
269
+ - 16
270
+ - 17
271
+ - 18
263
272
runs-on : ubuntu-latest
264
273
container : rhub/debian-clang-devel
274
+ env :
275
+ DEBIAN_FRONTEND : noninteractive
265
276
steps :
266
277
- name : Install Git before checkout
267
278
shell : bash
@@ -276,53 +287,21 @@ jobs:
276
287
with :
277
288
fetch-depth : 5
278
289
submodules : true
279
- - name : update to clang 15
280
- shell : bash
290
+ - name : install clang
281
291
run : |
282
- # remove clang stuff that comes installed in the image
283
- apt-get autoremove -y --purge \
284
- clang-* \
285
- libclang-* \
286
- libunwind-* \
287
- llvm-*
288
- #
289
- # replace it all with clang-15
290
- apt-get update -y
291
- apt-get install --no-install-recommends -y \
292
- gnupg \
293
- lsb-release \
294
- software-properties-common \
295
- wget
296
- #
297
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
298
- #
299
- add-apt-repository "deb http://apt.llvm.org/unstable/ llvm-toolchain main"
300
- apt-get install -y --no-install-recommends \
301
- clang-15 \
302
- clangd-15 \
303
- clang-format-15 \
304
- clang-tidy-15 \
305
- clang-tools-15 \
306
- lldb-15 \
307
- lld-15 \
308
- llvm-15-dev \
309
- llvm-15-tools \
310
- libomp-15-dev \
311
- libc++-15-dev \
312
- libc++abi-15-dev \
313
- libclang-common-15-dev \
314
- libclang-15-dev \
315
- libclang-cpp15-dev \
316
- libunwind-15-dev
317
- # overwrite everything in /usr/bin with the new v15 versions
318
- cp --remove-destination /usr/lib/llvm-15/bin/* /usr/bin/
292
+ ./.ci/install-clang-devel.sh ${{ matrix.clang-version }}
319
293
- name : Install packages and run tests
320
294
shell : bash
321
295
run : |
322
296
export PATH=/opt/R-devel/bin/:${PATH}
323
- Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix ', 'RhpcBLASctl ', 'rmarkdown ', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
297
+ Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown ', 'Matrix ', 'RhpcBLASctl ', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
324
298
sh build-cran-package.sh
325
299
R CMD check --as-cran --run-donttest lightgbm_*.tar.gz || exit -1
300
+ echo ""
301
+ echo "install logs:"
302
+ echo ""
303
+ cat lightgbm.Rcheck/00install.out
304
+ echo ""
326
305
if grep -q -E "NOTE|WARNING|ERROR" lightgbm.Rcheck/00check.log; then
327
306
echo "NOTEs, WARNINGs, or ERRORs have been found by R CMD check"
328
307
exit -1
0 commit comments