Skip to content

Adjust CI to ignore non-rust warnings #3796

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

Merged
merged 1 commit into from
Jun 27, 2025
Merged
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
150 changes: 0 additions & 150 deletions .github/alpine_32bit_log_warnings

Large diffs are not rendered by default.

204 changes: 0 additions & 204 deletions .github/glibcxx_ubuntu64b_log_expected_warnings

Large diffs are not rendered by default.

229 changes: 0 additions & 229 deletions .github/log_expected_warnings

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions .github/safe-grep
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
# grep exits with 1 if it doesn't match any lines
# this script wraps grep, mapping exits codes 1->0, x->x

grep "$@"
EXIT_CODE="$?"
if [ x$EXIT_CODE = x1 ]; then
exit 0
else
exit $EXIT_CODE
fi
6 changes: 3 additions & 3 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Check for new warnings
run: |
cd gccrs-build
< log grep 'warning: ' | sort > log_warnings
< log grep 'warning: ' | grep rust | sort > log_warnings
if diff -U0 ../.github/log_expected_warnings log_warnings; then
:
else
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
- name: Check for new warnings
run: |
cd gccrs-build
< log grep 'warning: ' | sort > log_warnings
< log grep 'warning: ' | grep rust | sort > log_warnings
if diff -U0 ../.github/glibcxx_ubuntu64b_log_expected_warnings log_warnings; then
:
else
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
- name: Check for new warnings
run: |
cd gccrs-build
< log grep 'warning: ' | sort > log_warnings
< log grep 'warning: ' | grep rust | sort > log_warnings
if diff -U0 ../.github/log_expected_warnings log_warnings; then
:
else
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ccpp32alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ jobs:
- name: Produce warning logs
run: |
cd gccrs-build
< log grep 'warning: ' | sort > log_warnings
# grep exits with 1 if it doesn't find at least one match
< log grep 'warning: ' | ../.github/safe-grep rust | sort > log_warnings
cat log_warnings
shell: alpine.sh {0}
- name: Archive warnings logs
Expand All @@ -92,7 +93,6 @@ jobs:
- name: Check for new warnings
run: |
cd gccrs-build
< log grep 'warning: ' | sort > log_warnings
if diff -U0 ../.github/alpine_32bit_log_warnings log_warnings; then
:
else
Expand Down
Loading