-
Notifications
You must be signed in to change notification settings - Fork 29
79 lines (67 loc) · 2.13 KB
/
check-sanitizers.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
on: push
name: R-CMD-check-with-sanitizers
jobs:
pre-condition:
name: Check hash of src files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: cache_hit
uses: actions/cache@v4
with:
path: |
src
key: san-${{ hashFiles('src/**') }}
outputs:
run_check: ${{ steps.cache_hit.outputs.cache-hit }}
R-CMD-check:
needs: pre-condition
if: needs.pre-condition.outputs.run_check != 'true'
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, img: 'r-devel-san'}
- {os: ubuntu-latest, img: 'r-devel-ubsan-clang'}
runs-on: ${{ matrix.config.os }}
container: rocker/${{ matrix.config.img }}:latest
name: ${{ matrix.config.os }} (${{ matrix.config.img }})
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
/usr/local/lib/R/site-library
key: ${{ matrix.config.img }}
- name: Install dependencies
env:
ASAN_OPTIONS: "detect_odr_violation=0"
shell: Rscriptdevel {0}
run: |
install.packages("remotes")
library("remotes")
install_cran(c("bigmemory"))
install_cran(c("Matrix", "codetools", "cluster", "lattice", "class"), force = TRUE)
update(dev_package_deps(dependencies = TRUE))
- name: Check with sanitizers
env:
NOT_CRAN: false
ASAN_OPTIONS: "detect_leaks=0:detect_odr_violation=0"
run: |
Rdevel CMD build --no-build-vignettes --no-manual .
Rdevel --vanilla CMD check *.tar.gz --as-cran --no-manual
continue-on-error: true
- name: Show testthat output
if: always()
run: find *.Rcheck -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload check results
uses: actions/upload-artifact@main
with:
name: ${{ matrix.config.img }}-results
path: |
*.Rcheck/*.out
*.Rcheck/*.log