-
-
Notifications
You must be signed in to change notification settings - Fork 7
105 lines (91 loc) · 3.69 KB
/
rubygems.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: rubygems
on:
pull_request:
push:
branches:
- master
concurrency:
group: ci-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
rubygems:
name: RubyGems on ${{ matrix.os.name }} (${{ matrix.ruby.name }})
runs-on: ${{ matrix.os.value }}
strategy:
fail-fast: false
matrix:
os:
- { name: Ubuntu, value: ubuntu-22.04 }
- { name: macOS, value: macos-12 }
- { name: Windows, value: windows-2022 }
ruby:
- { name: "3.0", value: 3.0.6 }
- { name: "3.1", value: 3.1.4 }
- { name: "3.2", value: 3.2.2 }
include:
- ruby: { name: "3.2", value: 3.2.2 }
os: { name: macOS, value: macos-12 }
- ruby: { name: jruby-9.4, value: jruby-9.4.2.0 }
os: { name: Ubuntu, value: ubuntu-22.04 }
- ruby: { name: truffleruby-24, value: truffleruby-24.1.0 }
os: { name: Ubuntu, value: ubuntu-22.04 }
- os: { name: Windows, value: windows-2022 }
ruby: { name: mswin, value: mswin }
- os: { name: Ubuntu, value: ubuntu-22.04 }
ruby: { name: ruby-head, value: ruby-head }
- os: { name: Ubuntu, value: ubuntu-22.04 }
ruby: { name: truffleruby-head, value: truffleruby-head }
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup ruby (Ubuntu/macOS)
uses: ruby/setup-ruby@f321cf5a4d1533575411f8752cf25b86478b0442 # v1.193.0
with:
ruby-version: ${{ matrix.ruby.value }}
bundler-cache: true
if: matrix.os.name != 'Windows'
- name: Setup ruby (Windows)
uses: ruby/setup-ruby-pkgs@1493c009477b19efcb54cfaf72b5f9d1fd6ba86c # v1.33.2
with:
ruby-version: ${{ matrix.ruby.value }}
bundler-cache: true
mingw: clang
if: matrix.os.name == 'Windows' && matrix.ruby.name != 'mswin'
- name: Setup ruby (Windows mswin)
uses: ruby/setup-ruby-pkgs@1493c009477b19efcb54cfaf72b5f9d1fd6ba86c # v1.33.2
with:
ruby-version: ${{ matrix.ruby.value }}
mingw: clang
if: matrix.os.name == 'Windows' && matrix.ruby.name == 'mswin'
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: rubygems/rubygems
ref: deivid-rodriguez/no-ruby-prepend
path: rubygems
if: matrix.ruby.name == 'mswin'
- run: ruby setup.rb
working-directory: rubygems
if: matrix.ruby.name == 'mswin'
- run: rm -rf rubygems
shell: bash
if: matrix.ruby.name == 'mswin'
- name: Bundle install
run: 'D:\ruby-mswin\bin\bundle.bat install --jobs 4'
if: matrix.os.name == 'Windows' && matrix.ruby.name == 'mswin'
- name: Configure bindgen
shell: pwsh
run: |
echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=$((gcm clang).source -replace "bin\clang.exe","include")" >> $env:GITHUB_ENV
if: matrix.ruby.name == 'mswin'
- name: Run Test
run: bin/rake spec
if: "!startsWith(matrix.ruby.name, 'truffleruby') && !startsWith(matrix.ruby.name, 'jruby')"
- name: Run Test (JRuby)
run: JRUBY_OPTS=--debug bin/rake spec
if: startsWith(matrix.ruby.name, 'jruby')
- name: Run Test (Truffleruby)
run: TRUFFLERUBYOPT="--experimental-options --testing-rubygems" bin/rake spec
if: startsWith(matrix.ruby.name, 'truffleruby')
timeout-minutes: 20