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

ci: run build & unit tests in GH Actions #415

Merged
merged 4 commits into from
Jan 30, 2024
Merged

Conversation

mrc0mmand
Copy link
Member

Introduce a GH Actions job that builds & tests polkit in three
"categories":

  1. Build with various optimization levels & other build-time options
    (both clang & gcc)

  2. Build & run the unit tests (both clang & gcc)

  3. Build & run the unit tests with Address Sanitizer and
    Undefined Behavior Sanitizer (only gcc for now)

There's a couple of outstanding issues that should be taken care of in
the near future:

  • get rid of the gazillion of warnings during compilation so we can
    build with -Werror (--werror)
  • fix build with clang >= 17
  • make test-polkitbackendjsauthority work under ASan

Otherwise we'd get the output only when the test passed, which is not
very useful.
The test, in its current form, is incompatible with ASan, since it
overwrites $LD_PRELOAD and thus preventing ASan to work properly. This
can be worked around using `verify_asan_link_order=0`, but this only
shifts the problem down the road, as with that ASan is able to run but
produces false positive reports since it can't properly incercept calls
made to libduktape.
Introduce a GH Actions job that builds & tests polkit in three
"categories"

1) Build with various optimization levels & other build-time options
   (both clang & gcc)

2) Build & run the unit tests (both clang & gcc)

3) Build & run the unit tests with Address Sanitizer and
   Undefined Behavior Sanitizer (only gcc for now)

There's a couple of outstanding issues that should be taken care of in
the near future:

 - get rid of the gazillion of warnings during compilation so we can
   build with -Werror (--werror)
 - fix build with clang >= 17
 - make test-polkitbackendjsauthority work under ASan
@mrc0mmand
Copy link
Member Author

An example of such CI run can be seen in mrc0mmand#1.

@vmihalko
Copy link
Collaborator

fix build with clang >= 17

Soon, we plan to remove/replace mocklibc.

@vmihalko
Copy link
Collaborator

Thank you for this PR!

@vmihalko vmihalko merged commit 282132b into polkit-org:main Jan 30, 2024
5 checks passed
@mrc0mmand mrc0mmand deleted the ci branch February 9, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants