Skip to content

Commit 2d6eeb1

Browse files
committed
CI: Check compiler warnings.
Add checks to make CI fail by compiler warnings in the `rake compile`. If the `skip-warnings` (default: `false`, as an undefined variable is evaluated as `false` in the `if` syntax) is `true` in specific matrix cases, the cases skip the checks. If you want to skip new compiler warnings coming from external changes such as upgraded compiler or OpenSSL versions in the specific matrix cases, you can set the `skip-warnings true` for the cases.
1 parent 6f1c061 commit 2d6eeb1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
run: echo "MAKEFLAGS=V=1" >> $GITHUB_ENV
4848
if: runner.os == 'Linux' || runner.os == 'macOS'
4949

50+
- name: set flags to check compiler warnings.
51+
run: echo "RUBY_OPENSSL_EXTCFLAGS=-Werror" >> $GITHUB_ENV
52+
if: ${{ !matrix.skip-warnings }}
53+
5054
- name: compile
5155
run: rake compile -- --enable-debug
5256

@@ -142,6 +146,10 @@ jobs:
142146
run: echo "MAKEFLAGS=V=1" >> $GITHUB_ENV
143147
if: runner.os == 'Linux' || runner.os == 'macOS'
144148

149+
- name: set flags to check compiler warnings.
150+
run: echo "RUBY_OPENSSL_EXTCFLAGS=-Werror" >> $GITHUB_ENV
151+
if: ${{ !matrix.skip-warnings }}
152+
145153
- name: compile
146154
run: rake compile -- --enable-debug --with-openssl-dir=$HOME/.openssl/${{ matrix.openssl }}
147155

0 commit comments

Comments
 (0)