Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub workflow with sanitizers #6746

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/LSan.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
leak:libfontconfig.so
37 changes: 37 additions & 0 deletions .github/workflows/sanitizers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: R-CMD-check-sanitized
concurrency:
group: ${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

on:
push:
branches:
- master
- GHA-sanitizers # during development
workflow_dispatch:
pull_request:

jobs:
linux-containers:
runs-on: ubuntu-latest
name: "Check with sanitizers enabled"
strategy:
fail-fast: false
container:
image: docker://ghcr.io/r-hub/containers/clang-asan

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/platform-info@v1
- uses: r-hub/actions/setup-deps@v1
- name: "Additional setup"
run: |
# this should at least help with the build step
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
# fontconfig is known to leak; add more suppressions as discovered
echo "LSAN_OPTIONS=suppressions=$(realpath .github/workflows/LSan.supp)" >> $GITHUB_ENV
# disabled by default, so reenable (needs suppressions above)
echo "ASAN_OPTIONS=detect_leaks=1" >> $GITHUB_ENV
# see r-hub/containers#84
sed -i 's/-fsanitize-trap\S*//g' /opt/R/devel-asan/lib/R/etc/Makeconf
- uses: r-hub/actions/run-check@v1
Loading