File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 4242 - name : depends
4343 run : bundle install
4444
45+ # Enable the verbose option in mkmf.rb to print the compiling commands.
46+ - name : enable mkmf verbose
47+ run : tool/enable-mkmf-verbose
48+ if : runner.os == 'Linux' || runner.os == 'macOS'
49+
4550 - name : compile
4651 run : rake compile -- --enable-debug
4752
@@ -129,6 +134,10 @@ jobs:
129134 - name : depends
130135 run : bundle install
131136
137+ - name : enable mkmf verbose
138+ run : tool/enable-mkmf-verbose
139+ if : runner.os == 'Linux' || runner.os == 'macOS'
140+
132141 - name : compile
133142 run : rake compile -- --enable-debug --with-openssl-dir=$HOME/.openssl/${{ matrix.openssl }}
134143
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -eux
4+
5+ gem_home=" $( gem environment home) "
6+ mkmf_rb_path=" $( find " ${gem_home} " /../.. -name mkmf.rb) "
7+
8+ # Backup the original file.
9+ cp -p " ${mkmf_rb_path} " " ${mkmf_rb_path} .orig"
10+
11+ # Replace the target line to set the verbose option.
12+ sed -i -e ' s/^V = .*/V = 1/' " ${mkmf_rb_path} "
13+
14+ # Print the difference between the original and modified file. This is useful
15+ # to debug when the `mkmf.rb` may change in the future. And check if the
16+ # `mkmf.rb` was modified. Because the `sed` command returns the exit status 0 no
17+ # matter it replaces successfully or not.
18+ if diff " ${mkmf_rb_path} .orig" " ${mkmf_rb_path} " ; then
19+ echo " error: ${mkmf_rb_path} was not modified." 1>&2
20+ exit 1
21+ elif [ " ${?} " != 1 ]; then
22+ echo " error: diff was failed." 1>&2
23+ exit 1
24+ fi
You can’t perform that action at this time.
0 commit comments