-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 2.32 KB
/
R-CMD-check-asan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: sync-dev
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
container: ${{ matrix.config.container }}
name: ${{ matrix.config.name }}
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/gcc14:latest' }, name: 'gcc14'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
ASAN_OPTIONS: 'detect_leaks=0'
UBSAN_OPTIONS: 'print_stacktrace=1'
RJAVA_JVM_STACK_WORKAROUND: 0
RGL_USE_NULL: true
R_DONT_USE_TK: true
LD_PRELOAD: /usr/lib/gcc/x86_64-linux-gnu/14/libasan.so
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up R environment
run: |
mkdir -p ~/.R/
echo 'CC=gcc -std=gnu11 -fsanitize=address,undefined -fno-omit-frame-pointer' >> ~/.R/Makevars
echo 'FC=gfortran -fsanitize=address' >> ~/.R/Makevars
- name: Restore R package cache
uses: actions/cache@v4
with:
path: ~/.cache/R
key: ${{ runner.os }}-r-${{ matrix.config.r }}-cache
- name: Install dependencies
run: |
Rscript -e 'if (!requireNamespace("pak", quietly = TRUE)) { install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") }'
Rscript -e 'pak::pkg_install("decor", dependencies = TRUE)'
Rscript -e 'pak::pkg_install("rcmdcheck", dependencies = TRUE)'
Rscript -e 'pak::pkg_install("pkgbuild", dependencies = TRUE)'
Rscript -e 'pak::pkg_install(".", dependencies = TRUE)'
working-directory: ./rpkg
- name: Check
run: |
Rscript -e 'pkgbuild::check_build_tools(debug = TRUE)'
Rscript -e 'rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), build_args = "--no-manual", error_on = "error")'
working-directory: ./rpkg
- name: Save R package cache
uses: actions/cache@v4
with:
path: ~/.cache/R
key: ${{ runner.os }}-r-${{ matrix.config.r }}-cache