Skip to content

Commit

Permalink
CI: Enable the verbose mode in the mkmf.rb by env MAKEFLAGS.
Browse files Browse the repository at this point in the history
Enable the verbose option (variable `V`) in the `Makefile` generated by
`mkmf.rb` to print the compiling commands in the process of the `rake compile`
by setting the environment variable `MAKEFLAGS`[1] reserved by `make`. Because
it's helpful to see what compiler warnings are checked.

It seems that this implementation to enable the verbose mode only works in
Linux and macOS. Not Windows.

[1] https://www.gnu.org/software/make/manual/html_node/Variables_002fRecursion.html
  • Loading branch information
junaruga committed May 23, 2023
1 parent 121b3b2 commit 08e1981
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
- name: depends
run: bundle install

# Enable the verbose option in mkmf.rb to print the compiling commands.
- name: enable mkmf verbose
run: echo "MAKEFLAGS=V=1" >> $GITHUB_ENV
if: runner.os == 'Linux' || runner.os == 'macOS'

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

Expand Down Expand Up @@ -129,6 +134,10 @@ jobs:
- name: depends
run: bundle install

- name: enable mkmf verbose
run: echo "MAKEFLAGS=V=1" >> $GITHUB_ENV
if: runner.os == 'Linux' || runner.os == 'macOS'

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

Expand Down

0 comments on commit 08e1981

Please sign in to comment.