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-warn-checks` (default: `false`) 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-warn-checks: true` for the
cases.
  • Loading branch information
junaruga committed Jun 7, 2023
1 parent 6f1c061 commit 9f538bb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
# ubuntu-22.04 uses OpenSSL 3.0, ubuntu-20.04 uses OpenSSL 1.1.1
os: [ ubuntu-22.04, ubuntu-20.04, macos-latest, windows-latest ]
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
skip-warn-checks: [ false ]
exclude:
# uses non-standard MSYS2 OpenSSL 3 package
- { os: windows-latest, ruby: head }
Expand Down Expand Up @@ -47,6 +48,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-warn-checks }}

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

Expand Down Expand Up @@ -79,6 +84,7 @@ jobs:
- libressl-3.6.3
- libressl-3.7.3
- libressl-3.8.0 # Development release
skip-warn-checks: [ false ]
fips-enabled: [ false ]
include:
- { os: ubuntu-latest, ruby: "3.0", openssl: openssl-3.0.9, fips-enabled: true, append-configure: 'enable-fips', name-extra: 'fips' }
Expand Down Expand Up @@ -142,6 +148,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-warn-checks }}

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

Expand Down

0 comments on commit 9f538bb

Please sign in to comment.