Skip to content

Updates for CRAN and CUDA #226

Updates for CRAN and CUDA

Updates for CRAN and CUDA #226

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main]
pull_request:
branches: [main]
name: R-CMD-check
jobs:
R-CMD-check:
strategy:
fail-fast: false
matrix:
cuda: ['11.2.1']
cuml: ['21.08', '21.10', '21.12']
r: ['release', 'devel']
asan: ['false', 'true']
runs-on: ['self-hosted', 'gpu']
container:
image: nvidia/cuda:${{ matrix.cuda }}-devel-ubuntu18.04
options: --gpus all
name: 'R: ${{ matrix.r }}, CUDA: ${{ matrix.cuda }}, CUML: ${{ matrix.cuml }}, ASAN: ${{ matrix.asan }}'
env:
NOT_CRAN: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
CUML_VERSION: ${{ matrix.cuml }}
CUML4R_ENABLE_ASAN: ${{ matrix.asan }}
DEBIAN_FRONTEND: 'noninteractive'
steps:
- run: |
apt-get update -y
apt-get install -y sudo software-properties-common dialog apt-utils tzdata
if [[ $CUML4R_ENABLE_ASAN == 'true' ]]; then
apt-get install -y libasan5
fi
shell: bash
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-pandoc@v1
- uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: 'x64'
- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: rcmdcheck
- name: Build {cuda.ml}
id: build-pkg
run: |
cd ..
ls -a
rm -v cuda.ml_*.tar.gz
R CMD build cuda.ml
ls -a
echo "::set-output name=pkg-dir::$(pwd)"
- run: cp -v cuda.ml/.lsan-suppressions.txt /tmp
working-directory: ${{ steps.build-pkg.outputs.pkg-dir }}
- name: Check {cuda.ml} package
run: |
print(list.files("."))
pkg <- list.files(".", pattern = "cuda\\.ml_.*\\.tar\\.gz")
stopifnot(length(pkg) == 1)
reticulate::install_miniconda(force = TRUE)
rcmdcheck_env <- (
if (identical(Sys.getenv("CUML4R_ENABLE_ASAN"), "true")) {
c(
LD_PRELOAD = "/usr/lib/x86_64-linux-gnu/libasan.so.5",
ASAN_OPTIONS = "halt_on_error=0,new_delete_type_mismatch=0,alloc_dealloc_mismatch=0,protect_shadow_gap=0",
LSAN_OPTIONS = "suppressions=/tmp/.lsan-suppressions.txt"
)
} else {
character()
}
)
rcmdcheck::rcmdcheck(
path = pkg[[1]],
args = c("--no-manual", "--as-cran"),
check_dir="check",
env = rcmdcheck_env
)
shell: Rscript {0}
working-directory: ${{ steps.build-pkg.outputs.pkg-dir }}
- name: Show testthat output
if: ${{ always() }}
run: |
find check -name 'testthat.Rout*' -type f -exec cat '{}' \; || :
shell: bash
working-directory: ${{ steps.build-pkg.outputs.pkg-dir }}
- name: Check for sanitizer error(s)
if: ${{ always() }}
run: |
! find check -name 'testthat.Rout*' -type f -exec egrep -C 50 'ERROR: .*Sanitizer:' '{}' +
shell: bash
working-directory: ${{ steps.build-pkg.outputs.pkg-dir }}
- name: Upload check results
if: ${{ failure() }}
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.r }}-results
path: ${{ steps.build-pkg.outputs.pkg-dir }}/check