Skip to content

Commit faeaab1

Browse files
committed
Try a more R-hub-v2-like approach
1 parent ad3a831 commit faeaab1

File tree

1 file changed

+15
-29
lines changed

1 file changed

+15
-29
lines changed

.github/workflows/sanitizers.yaml

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
name: R-CMD-check-sanitized
2+
concurrency:
3+
group: ${{ github.event.pull_request.number || github.run_id }}
4+
cancel-in-progress: true
5+
16
on:
27
push:
38
branches:
@@ -6,46 +11,27 @@ on:
611
workflow_dispatch:
712
pull_request:
813

9-
name: R-CMD-check-sanitized
10-
11-
concurrency:
12-
group: ${{ github.event.pull_request.number || github.run_id }}
13-
cancel-in-progress: true
14-
1514
jobs:
16-
R-CMD-check-sanitized:
15+
linux-containers:
1716
runs-on: ubuntu-latest
17+
name: "Check with sanitizers enabled"
18+
strategy:
19+
fail-fast: false
1820
container:
1921
image: docker://ghcr.io/r-hub/containers/clang-asan
2022

21-
strategy:
22-
fail-fast: true
23-
2423
steps:
25-
- uses: actions/checkout@v4
26-
27-
- name: "Set things up"
24+
- uses: r-hub/actions/checkout@v1
25+
- uses: r-hub/actions/platform-info@v1
26+
- uses: r-hub/actions/setup-deps@v1
27+
- name: "Additional setup"
2828
run: |
29-
# setting aside the other.Rraw dependencies for now (will need cache)
30-
Rscript -e 'pak::pak()'
3129
# this should at least help with the build step
3230
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
3331
# fontconfig is known to leak; add more suppressions as discovered
3432
echo "LSAN_OPTIONS=suppressions=$(realpath .github/workflows/LSan.supp)" >> $GITHUB_ENV
3533
# disabled by default, so reenable (needs suppressions above)
3634
echo "ASAN_OPTIONS=detect_leaks=1" >> $GITHUB_ENV
37-
# otherwise there are literal jumps to ud1 in the code with no diagnostics
35+
# see r-hub/containers#84
3836
sed -i 's/-fsanitize-trap\S*//g' /opt/R/devel-asan/lib/R/etc/Makeconf
39-
40-
- name: "Build"
41-
run: R CMD build .
42-
43-
- name: "Check"
44-
run: |
45-
set +e # expect some things to fail and keep going
46-
echo "::group::full R CMD check output"
47-
R CMD check --no-manual data.table_*.tar.gz; res1=$?
48-
echo "::endgroup::"
49-
perl -nle '(print, $a=1) if /: runtime error: |ERROR: LeakSanitizer/../SUMMARY.*Sanitizer/ }{ exit $a' data.table.Rcheck/**/*.Rout*; res2=$?
50-
# fail if R CMD check had failed or if sanitizer output found
51-
[ $res1 -eq 0 ] && [ $res2 -eq 0 ]
37+
- uses: r-hub/actions/run-check@v1

0 commit comments

Comments
 (0)