|
| 1 | +name: R-CMD-check-sanitized |
| 2 | +concurrency: |
| 3 | + group: ${{ github.event.pull_request.number || github.run_id }} |
| 4 | + cancel-in-progress: true |
| 5 | + |
1 | 6 | on: |
2 | 7 | push: |
3 | 8 | branches: |
|
6 | 11 | workflow_dispatch: |
7 | 12 | pull_request: |
8 | 13 |
|
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 | | - |
15 | 14 | jobs: |
16 | | - R-CMD-check-sanitized: |
| 15 | + linux-containers: |
17 | 16 | runs-on: ubuntu-latest |
| 17 | + name: "Check with sanitizers enabled" |
| 18 | + strategy: |
| 19 | + fail-fast: false |
18 | 20 | container: |
19 | 21 | image: docker://ghcr.io/r-hub/containers/clang-asan |
20 | 22 |
|
21 | | - strategy: |
22 | | - fail-fast: true |
23 | | - |
24 | 23 | 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" |
28 | 28 | run: | |
29 | | - # setting aside the other.Rraw dependencies for now (will need cache) |
30 | | - Rscript -e 'pak::pak()' |
31 | 29 | # this should at least help with the build step |
32 | 30 | echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV |
33 | 31 | # fontconfig is known to leak; add more suppressions as discovered |
34 | 32 | echo "LSAN_OPTIONS=suppressions=$(realpath .github/workflows/LSan.supp)" >> $GITHUB_ENV |
35 | 33 | # disabled by default, so reenable (needs suppressions above) |
36 | 34 | 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 |
38 | 36 | 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