|
9 | 9 | paths-ignore:
|
10 | 10 | - README.md
|
11 | 11 | jobs:
|
12 |
| - test: |
| 12 | + common: |
13 | 13 | strategy:
|
14 | 14 | fail-fast: false
|
15 | 15 | matrix:
|
16 | 16 | os: [ ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest ]
|
17 | 17 | # Use various version syntaxes here for testing
|
18 |
| - ruby: [ .ruby-version, .tool-versions, 2.2, 2.3, ruby-head, jruby, jruby-head, truffleruby, truffleruby-head, rubinius ] |
| 18 | + ruby: [ .ruby-version, .tool-versions, 2.2, 2.3, ruby-head, jruby, jruby-head, truffleruby, truffleruby-head ] |
19 | 19 | exclude:
|
20 | 20 | - os: windows-latest
|
21 | 21 | ruby: truffleruby
|
22 | 22 | - os: windows-latest
|
23 | 23 | ruby: truffleruby-head
|
24 |
| - - os: ubuntu-16.04 |
25 |
| - ruby: rubinius |
26 |
| - - os: macos-latest |
27 |
| - ruby: rubinius |
28 |
| - - os: windows-latest |
29 |
| - ruby: rubinius |
30 | 24 | name: ${{ matrix.os }} ${{ matrix.ruby }}
|
31 | 25 | runs-on: ${{ matrix.os }}
|
32 | 26 | steps:
|
33 | 27 | - uses: actions/checkout@v2
|
34 | 28 | - uses: ./
|
35 | 29 | with:
|
36 | 30 | ruby-version: ${{ matrix.ruby }}
|
37 |
| - - run: ruby --version |
38 |
| - - run: ridk version |
39 |
| - if: matrix.os == 'windows-latest' && !startsWith(matrix.ruby, 'jruby') && !startsWith(matrix.ruby, '2.3') && !startsWith(matrix.ruby, '2.2') |
| 31 | + - name: ruby version and gcc |
| 32 | + run: | |
| 33 | + ruby --version |
| 34 | + ruby -e "puts 'build gcc: ' + RbConfig::CONFIG.fetch('CC_VERSION_MESSAGE', 'unknown')[/[^\n]+/]" |
| 35 | + - name: ridk version (mingw) |
| 36 | + if: matrix.os == 'windows-latest' |
| 37 | + run: | |
| 38 | + # run 'ridk version' |
| 39 | + $abi, $plat = $(ruby -e "STDOUT.write RbConfig::CONFIG['ruby_version'] + ' ' + RUBY_PLATFORM").split(' ') |
| 40 | + if (($abi -ge '2.4') -and $plat.Contains('mingw')) { |
| 41 | + ridk version |
| 42 | + } else { |
| 43 | + echo 'ridk is unavailable' |
| 44 | + } |
| 45 | + - name: Subprocess test |
| 46 | + run: ruby test_subprocess.rb |
| 47 | + - name: OpenSSL version |
| 48 | + run: ruby -ropenssl -e 'puts OpenSSL::OPENSSL_LIBRARY_VERSION' |
| 49 | + - name: OpenSSL test |
| 50 | + run: ruby -ropen-uri -e 'puts open(%{https://rubygems.org/}) { |f| f.read(1024) }' |
| 51 | + - name: C extension test |
| 52 | + run: gem install json:2.2.0 --no-document |
| 53 | + - run: bundle --version |
| 54 | + - run: bundle install |
| 55 | + - run: bundle exec rake --version |
| 56 | + |
| 57 | + specials: |
| 58 | + strategy: |
| 59 | + fail-fast: false |
| 60 | + matrix: |
| 61 | + cfg: |
| 62 | + - { ruby: rubinius, os: ubuntu-18.04 } |
| 63 | + - { ruby: mingw , os: windows-latest } |
| 64 | + - { ruby: mswin , os: windows-latest } |
| 65 | + name: ${{ matrix.cfg.os }} ${{ matrix.cfg.ruby }} |
| 66 | + runs-on: ${{ matrix.cfg.os }} |
| 67 | + steps: |
| 68 | + - uses: actions/checkout@v2 |
| 69 | + - uses: ./ |
| 70 | + with: |
| 71 | + ruby-version: ${{ matrix.cfg.ruby }} |
| 72 | + - name: ruby version and gcc |
| 73 | + run: | |
| 74 | + ruby --version |
| 75 | + ruby -e "puts 'build gcc: ' + RbConfig::CONFIG.fetch('CC_VERSION_MESSAGE', 'unknown')[/[^\n]+/]" |
| 76 | + - name: ridk version (mingw) |
| 77 | + if: matrix.cfg.os == 'windows-latest' |
| 78 | + run: | |
| 79 | + # run 'ridk version' |
| 80 | + $abi, $plat = $(ruby -e "STDOUT.write RbConfig::CONFIG['ruby_version'] + ' ' + RUBY_PLATFORM").split(' ') |
| 81 | + if (($abi -ge '2.4') -and $plat.Contains('mingw')) { |
| 82 | + ridk version |
| 83 | + } else { |
| 84 | + echo 'ridk is unavailable' |
| 85 | + } |
40 | 86 | - name: Subprocess test
|
41 | 87 | run: ruby test_subprocess.rb
|
42 | 88 | - name: OpenSSL version
|
43 | 89 | run: ruby -ropenssl -e 'puts OpenSSL::OPENSSL_LIBRARY_VERSION'
|
44 | 90 | - name: OpenSSL test
|
45 | 91 | run: ruby -ropen-uri -e 'puts open(%{https://rubygems.org/}) { |f| f.read(1024) }'
|
46 | 92 | - name: C extension test
|
| 93 | + if: endsWith(matrix.cfg.ruby, 'mswin') == false |
47 | 94 | run: gem install json:2.2.0 --no-document
|
| 95 | + - name: C extension test (mswin cmd) |
| 96 | + if: endsWith(matrix.cfg.ruby, 'mswin') |
| 97 | + shell: cmd |
| 98 | + run: | |
| 99 | + call %VCVARS% |
| 100 | + gem install json:2.2.0 --no-document |
| 101 | + - name: C extension test (mswin ps1) |
| 102 | + if: endsWith(matrix.cfg.ruby, 'mswin') |
| 103 | + run: | |
| 104 | + cmd.exe /c "$env:VCVARS && set" | Foreach-Object { |
| 105 | + $p, $v = $_.split('=') |
| 106 | + Set-Item -path env:$p -value $v |
| 107 | + } |
| 108 | + gem install json:2.2.0 --no-document |
48 | 109 | - run: bundle --version
|
49 | 110 | - run: bundle install
|
50 | 111 | - run: bundle exec rake --version
|
|
0 commit comments