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

Set up a CI run with AddressSanitizer #802

Closed
szhorvat opened this issue May 19, 2023 · 6 comments
Closed

Set up a CI run with AddressSanitizer #802

szhorvat opened this issue May 19, 2023 · 6 comments
Assignees
Milestone

Comments

@szhorvat
Copy link
Member

szhorvat commented May 19, 2023

There should be an AddressSanitizer-enabled CI run. This will provide some extra confidence while migrating to igraph 0.10, and it will make it much easier to debug crash bugs.

This will require building R itself with AddressSanitizer first, and caching the R installation. After this, igraph can be installed as normal, as R itself will pass the correct flags.

This is how I do this now locally: https://github.com/igraph/igraph/wiki/Using-sanitizers-to-find-bugs#rigraph

@krlmlr Can you help with this?

@krlmlr
Copy link
Contributor

krlmlr commented May 20, 2023

@Antonov548: Can you please take this on?

We can use the Docker image at https://github.com/wch/r-debug to avoid building R from scratch. We still need to install igraph dependencies in the Docker image. I propose to set up a CI/CD workflow that builds a Docker image based on wch1/r-debug with igraph and all dependencies installed. We would need the following things:

  • A Dockerfile that runs RD -q -e 'pak::pak("igraph/rigraph", dependencies = TRUE)' for all versions of RD*` that the r-debug image provides
  • CI/CD that pushes the resulting image somewhere, e.g., to a GitHub Registry or to Dockerhub
  • An extension of our GitHub Actions workflow that runs on the image generated in the previous step, in a build matrix, one entry for each RD* version

This is a bit terse, can you work with that? Happy to clarify as needed.

@szhorvat
Copy link
Member Author

Thanks @krlmlr and @Antonov548 ! This will be very useful.

@krlmlr
Copy link
Contributor

krlmlr commented May 21, 2023

For the third step, we could use a Docker action: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action . If we do this, the first step modifies the entrypoint of the Docker image.

@krlmlr
Copy link
Contributor

krlmlr commented May 21, 2023

Everything can live in this repository.

See, e.g., https://github.com/tidyverse/tibble/tree/main/.github/workflows/check for an action that is embedded in the repo, and https://github.com/tidyverse/tibble/blob/main/.github/workflows/R-CMD-check.yaml#L72 for usage.

@krlmlr
Copy link
Contributor

krlmlr commented Jun 20, 2023

Done now, we'll improve as we go.

@krlmlr krlmlr closed this as completed Jun 20, 2023
Copy link
Contributor

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants