Skip to content

Commit

Permalink
CI: Check compiler warnings.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
junaruga committed Jun 7, 2023
1 parent 6f1c061 commit 52402f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
run: echo "MAKEFLAGS=V=1" >> $GITHUB_ENV
if: runner.os == 'Linux' || runner.os == 'macOS'

- name: set flags to check compiler warnings.
run: echo "RUBY_OPENSSL_EXTCFLAGS=-Werror" >> $GITHUB_ENV
if: ${{ !matrix.skip-warnings }}

- name: compile
run: rake compile -- --enable-debug

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

- name: set flags to check compiler warnings.
run: echo "RUBY_OPENSSL_EXTCFLAGS=-Werror" >> $GITHUB_ENV
if: ${{ !matrix.skip-warnings }}

- name: compile
run: rake compile -- --enable-debug --with-openssl-dir=$HOME/.openssl/${{ matrix.openssl }}

Expand Down

0 comments on commit 52402f6

Please sign in to comment.