-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
185 lines (164 loc) · 8.28 KB
/
Copy pathbundler.yml
File metadata and controls
185 lines (164 loc) · 8.28 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
name: bundler
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
defaults:
run:
shell: bash
jobs:
bundler:
name: Bundler on ${{ matrix.os.name }} (${{ matrix.ruby.name }})
runs-on: ${{ matrix.os.value }}
strategy:
fail-fast: false
matrix:
os:
- { name: Ubuntu, value: ubuntu-24.04 }
ruby:
- { name: ruby-3.2, value: 3.2.11 }
- { name: ruby-3.3, value: 3.3.11 }
- { name: ruby-3.4, value: 3.4.9 }
- { name: ruby-4.0, value: 4.0.5 }
include:
- { os: { name: macOS, value: macos-26 }, ruby: { name: ruby-3.2, value: 3.2.11 }, timeout: 90 }
- { os: { name: macOS, value: macos-26 }, ruby: { name: ruby-3.3, value: 3.3.11 }, timeout: 90 }
- { os: { name: macOS, value: macos-26 }, ruby: { name: ruby-3.4, value: 3.4.9 }, timeout: 90 }
- { os: { name: macOS, value: macos-26 }, ruby: { name: ruby-4.0, value: 4.0.5 }, timeout: 90 }
# Regression coverage for the Intel architecture with the latest Ruby only.
# Split across runners using the test shards to keep each run reasonable.
- { os: { name: macOS-intel, value: macos-15-intel }, ruby: { name: ruby-4.0, value: 4.0.5 }, timeout: 90, shard: a }
- { os: { name: macOS-intel, value: macos-15-intel }, ruby: { name: ruby-4.0, value: 4.0.5 }, timeout: 90, shard: b }
- { os: { name: macOS-intel, value: macos-15-intel }, ruby: { name: ruby-4.0, value: 4.0.5 }, timeout: 90, shard: c }
- { os: { name: macOS-intel, value: macos-15-intel }, ruby: { name: ruby-4.0, value: 4.0.5 }, timeout: 90, shard: d }
# Ruby 3.2 is about 20 minutes slower than 3.3/3.4, so it will be excluded from testing.
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-3.3, value: 3.3.11 }, timeout: 150, shard: a }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-3.3, value: 3.3.11 }, timeout: 150, shard: b }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-3.3, value: 3.3.11 }, timeout: 150, shard: c }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-3.3, value: 3.3.11 }, timeout: 150, shard: d }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-3.4, value: 3.4.9 }, timeout: 150, shard: a }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-3.4, value: 3.4.9 }, timeout: 150, shard: b }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-3.4, value: 3.4.9 }, timeout: 150, shard: c }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-3.4, value: 3.4.9 }, timeout: 150, shard: d }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-4.0, value: 4.0.5 }, timeout: 150, shard: a }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-4.0, value: 4.0.5 }, timeout: 150, shard: b }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-4.0, value: 4.0.5 }, timeout: 150, shard: c }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: ruby-4.0, value: 4.0.5 }, timeout: 150, shard: d }
- { os: { name: Ubuntu, value: ubuntu-24.04 }, ruby: { name: jruby, value: jruby-10.1.0.0 } }
- { os: { name: macOS, value: macos-26 }, ruby: { name: jruby, value: jruby-10.1.0.0 } }
- { os: { name: Windows, value: windows-2025 }, ruby: { name: jruby, value: jruby-10.1.0.0 } }
- { os: { name: Ubuntu, value: ubuntu-24.04 }, ruby: { name: truffleruby, value: truffleruby-34.0.1 }, timeout: 20 }
- { os: { name: Ubuntu, value: ubuntu-24.04 }, ruby: { name: ruby-4.0 (psych), value: 4.0.5 }, use_psych: true }
# Regression coverage for release branches, where the version constants
# do not have a .dev suffix and behave differently.
- { os: { name: Ubuntu, value: ubuntu-24.04 }, ruby: { name: ruby-4.0 (release version), value: 4.0.5 }, strip_dev: true }
env:
RGV: .
RUBYOPT: --disable-gems
RUBYGEMS_USE_PSYCH: ${{ matrix.use_psych || 'false' }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup ruby
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
ruby-version: ${{ matrix.ruby.value }}
bundler: none
- name: Simulate a release version by stripping .dev
run: ruby -i -pe 'sub(/^(\s*VERSION = ")(\d+\.\d+\.\d+)\.dev/, "\\1\\2")' lib/rubygems.rb lib/bundler/version.rb
if: matrix.strip_dev
- name: Restore gem caches
uses: actions/cache/restore@v6
id: restore-cache
with:
path: |
tmp/gems/base
tmp/gems/standard
tmp/gems/rubocop
key: gem-cache-${{ hashFiles('tool/bundler/test_gems.rb.lock', 'tool/bundler/standard_gems.rb.lock', 'tool/bundler/rubocop_gems.rb.lock') }}-${{ matrix.ruby.value }}-${{ matrix.os.name }}
- name: Install test dependencies
if: steps.restore-cache.outputs.cache-hit != 'true'
run: bundle install
env:
BUNDLE_PATH: ../../tmp/gems/base
BUNDLE_GEMFILE: tool/bundler/test_gems.rb
BUNDLE_CLEAN: 1
- name: Install standard dependencies
if: steps.restore-cache.outputs.cache-hit != 'true'
run: bundle install
env:
BUNDLE_PATH: ../../tmp/gems/standard
BUNDLE_GEMFILE: tool/bundler/standard_gems.rb
BUNDLE_CLEAN: 1
- name: Install rubocop dependencies
if: steps.restore-cache.outputs.cache-hit != 'true'
run: bundle install
env:
BUNDLE_PATH: ../../tmp/gems/rubocop
BUNDLE_GEMFILE: tool/bundler/rubocop_gems.rb
BUNDLE_CLEAN: 1
- name: Save gems cache
if: steps.restore-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v6
with:
path: |
tmp/gems/base
tmp/gems/standard
tmp/gems/rubocop
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
- name: Setup java
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: 21.0.7
if: matrix.ruby.name == 'jruby'
- name: Prepare dependencies
run: |
bin/rake dev:deps
- name: Run Test (CRuby)
run: |
bin/parallel_rspec
if: matrix.ruby.name != 'jruby' && matrix.ruby.name != 'truffleruby' && matrix.os.name != 'Windows' && matrix.os.name != 'macOS-intel'
- name: Run Test (CRuby on Windows - Shard ${{ matrix.shard }})
run: |
bin/parallel_rspec --tag shard_${{ matrix.shard }}
if: matrix.ruby.name != 'jruby' && matrix.ruby.name != 'truffleruby' && matrix.os.name == 'Windows'
- name: Run Test (CRuby on macOS Intel - Shard ${{ matrix.shard }})
run: |
bin/parallel_rspec --tag shard_${{ matrix.shard }}
if: matrix.ruby.name != 'jruby' && matrix.ruby.name != 'truffleruby' && matrix.os.name == 'macOS-intel'
- name: Run Test (JRuby)
run: |
bin/parallel_rspec --tag jruby_only --tag jruby
if: matrix.ruby.name == 'jruby' && matrix.os.name != 'Windows'
- name: Run Test (TruffleRuby)
run: |
bin/rspec --tag truffleruby_only --tag truffleruby
if: matrix.ruby.name == 'truffleruby'
- name: Run a warbler project
run: |
bin/rake bundler:install:local
cd spec/realworld/fixtures/warbler
bundle install
bundle exec warble
java -jar warbler.jar
if: matrix.ruby.name == 'jruby' && matrix.os.name == 'Ubuntu'
timeout-minutes: ${{ matrix.timeout || 60 }}
all-pass:
name: All bundler jobs pass
if: always()
needs:
- bundler
runs-on: ubuntu-latest
steps:
- name: check dependent jobs
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}