3434 run : |
3535 ruby -e "puts 'build compiler: ' + RbConfig::CONFIG.fetch('CC_VERSION_MESSAGE', 'unknown').lines.first"
3636 - name : ridk version (mingw)
37- if : matrix.os == 'windows-latest'
37+ if : startsWith( matrix.os, 'windows')
3838 run : |
3939 $abi, $plat = $(ruby -e "STDOUT.write RbConfig::CONFIG['ruby_version'] + ' ' + RUBY_PLATFORM").split(' ')
4040 if (($abi -ge '2.4') -and $plat.Contains('mingw')) {
5353 - run : bundle --version
5454 - run : bundle install
5555 - run : bundle exec rake --version
56+ - name : which ruby, rake
57+ if : startsWith(matrix.os, 'windows') == false
58+ run : |
59+ # which -a ruby, rake
60+ which -a ruby rake
61+ - name : where ruby, rake
62+ if : startsWith(matrix.os, 'windows')
63+ run : |
64+ # where ruby, rake
65+ $ErrorActionPreference = 'Continue'
66+ $where = 'ruby', 'rake'
67+ foreach ($e in $where) {
68+ $rslt = where.exe $e 2>&1 | Out-String
69+ if ($rslt.contains($e)) { echo $rslt.Trim() }
70+ else { echo "Can't find $e" }
71+ echo ''
72+ }
5673
5774 specials :
5875 strategy :
7491 run : |
7592 ruby -e "puts 'build compiler: ' + RbConfig::CONFIG.fetch('CC_VERSION_MESSAGE', 'unknown').lines.first"
7693 - name : ridk version (mingw)
77- if : matrix.cfg.os == 'windows-latest'
94+ if : startsWith( matrix.cfg.os, 'windows')
7895 run : |
7996 $abi, $plat = $(ruby -e "STDOUT.write RbConfig::CONFIG['ruby_version'] + ' ' + RUBY_PLATFORM").split(' ')
8097 if (($abi -ge '2.4') -and $plat.Contains('mingw')) {
@@ -89,25 +106,22 @@ jobs:
89106 - name : OpenSSL test
90107 run : ruby -ropen-uri -e 'puts open(%{https://rubygems.org/}) { |f| f.read(1024) }'
91108 - name : C extension test
92- if : endsWith(matrix.cfg.ruby, 'mswin') == false
93109 run : gem install json:2.2.0 --no-document
94- - name : C extension test (mswin cmd)
95- if : endsWith(matrix.cfg.ruby, 'mswin')
96- shell : cmd
97- run : |
98- call %VCVARS%
99- gem install json:2.2.0 --no-document
100- - name : C extension test (mswin ps1)
101- if : endsWith(matrix.cfg.ruby, 'mswin')
102- run : |
103- cmd.exe /c "$env:VCVARS && set" | Foreach-Object {
104- $p, $v = $_.split('=')
105- Set-Item -path env:$p -value $v
106- }
107- gem install json:2.2.0 --no-document
108110 - run : bundle --version
109111 - run : bundle install
110112 - run : bundle exec rake --version
113+ - name : where ruby, rake
114+ if : startsWith(matrix.cfg.os, 'windows')
115+ run : |
116+ # where
117+ $ErrorActionPreference = 'Continue'
118+ $where = 'ruby', 'rake'
119+ foreach ($e in $where) {
120+ $rslt = where.exe $e 2>&1 | Out-String
121+ if ($rslt.contains($e)) { echo $rslt.Trim() }
122+ else { echo "Can't find $e" }
123+ echo ''
124+ }
111125
112126 lint :
113127 runs-on : ubuntu-latest
0 commit comments