Skip to content

Commit bde65de

Browse files
authored
Merge pull request opencontainers#3192 from kinvolk/rata/cgo-warnings
CI: Mark CGO warnings as errors
2 parents 5fb9b2a + 347c371 commit bde65de

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- release-*
1212
pull_request:
1313

14+
env:
15+
# Don't ignore C warnings. Note that the output of "go env CGO_CFLAGS" by default is "-g -O2", so we keep them.
16+
CGO_CFLAGS: -g -O2 -Werror
17+
1418
jobs:
1519
test:
1620
runs-on: ubuntu-20.04

.github/workflows/validate.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525

2626
compile-buildtags:
2727
runs-on: ubuntu-20.04
28+
env:
29+
# Don't ignore C warnings. Note that the output of "go env CGO_CFLAGS" by default is "-g -O2", so we keep them.
30+
CGO_CFLAGS: -g -O2 -Werror
2831
steps:
2932
- uses: actions/checkout@v2
3033
- name: compile with no build tags

0 commit comments

Comments
 (0)