diff --git a/.github/workflows/linux-master.yml b/.github/workflows/linux-master.yml index 24fc3b9b..6718bec4 100644 --- a/.github/workflows/linux-master.yml +++ b/.github/workflows/linux-master.yml @@ -143,6 +143,11 @@ jobs: run: | bundle exec rake build + - name: Run wxRuby3 post-build checks + if: matrix.wxr_type != 'gem' + run: | + ruby tools/check_swig_types.rb + - name: Build wxRuby3 gem if: matrix.wxr_type == 'gem' || matrix.wxr_type == 'bingem' run: | diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 54703871..67309765 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -224,6 +224,11 @@ jobs: run: | bundle exec rake build + - name: Run wxRuby3 post-build checks + if: matrix.wxr_type != 'gem' + run: | + ruby tools/check_swig_types.rb + - name: Build wxRuby3 gem if: matrix.wxr_type == 'gem' || matrix.wxr_type == 'bingem' run: | diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 00a0043c..acf04df9 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -274,6 +274,11 @@ jobs: run: | bundle exec rake build + - name: Run wxRuby3 post-build checks + if: matrix.wxr_type != 'gem' + run: | + ruby tools/check_swig_types.rb + - name: Build wxRuby3 gem if: matrix.wxr_type == 'gem' || matrix.wxr_type == 'bingem' run: | diff --git a/.github/workflows/msw-master.yml b/.github/workflows/msw-master.yml index 01ed1c1c..778e102a 100644 --- a/.github/workflows/msw-master.yml +++ b/.github/workflows/msw-master.yml @@ -115,6 +115,11 @@ jobs: run: | bundle exec rake build + - name: Run wxRuby3 post-build checks + if: matrix.wxr_type != 'gem' + run: | + ruby tools/check_swig_types.rb + - name: Build wxRuby3 gem if: matrix.wxr_type != 'develop' run: | diff --git a/.github/workflows/msw.yml b/.github/workflows/msw.yml index b2d5718f..895392ae 100644 --- a/.github/workflows/msw.yml +++ b/.github/workflows/msw.yml @@ -170,6 +170,11 @@ jobs: run: | bundle exec rake build + - name: Run wxRuby3 post-build checks + if: matrix.wxr_type != 'gem' + run: | + ruby tools/check_swig_types.rb + - name: Build wxRuby3 gem if: matrix.wxr_type != 'develop' run: | diff --git a/tools/check_swig_types.rb b/tools/check_swig_types.rb index 3cff0425..112879ad2 100644 --- a/tools/check_swig_types.rb +++ b/tools/check_swig_types.rb @@ -55,7 +55,7 @@ def scan_sources end end - def check_types(quiet) + def check_types(verbose) un_wrapped = SWIG_TYPES_USED - SWIG_TYPES_WRAPPED un_used = SWIG_TYPES_WRAPPED - SWIG_TYPES_USED @@ -66,7 +66,7 @@ def check_types(quiet) STDERR.puts end - unless un_used.empty? || quiet + unless un_used.empty? || !verbose STDOUT.puts "INFO: The following types have wrapper classes defined not used in wrapper code:" un_used.each { |s| STDOUT.puts "\t#{s}" } STDOUT.puts @@ -75,14 +75,14 @@ def check_types(quiet) end - def self.run(quiet) + def self.run(verbose) scan_sources - check_types(quiet) + check_types(verbose) end end -Tool.run(ARGV.size==1 && ARGV[0]=='-q') +Tool.run(ARGV.size==1 && ARGV[0]=='-v') exit(1) if Tool.errors?