Skip to content

Commit d944f35

Browse files
committed
🧪 Fix head and old TruffleRuby CI retries
1 parent 9960439 commit d944f35

8 files changed

Lines changed: 26 additions & 30 deletions

File tree

.github/workflows/dep-heads.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
- ruby: "jruby"
5858
appraisal: "dep-heads"
5959
exec_cmd: "kettle-test"
60+
kettle_test_runner: "rspec"
6061
rubygems: default
6162
bundler: default
6263
experimental: true
@@ -93,4 +94,6 @@ jobs:
9394

9495
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
9596
if: ${{ !env.ACT || (! startsWith(matrix.ruby, 'jruby') && !startsWith(matrix.ruby, 'truffleruby')) }}
97+
env:
98+
KETTLE_TEST_RUNNER: ${{ matrix.kettle_test_runner || 'turbo_tests2' }}
9699
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}

.github/workflows/heads.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
- ruby: "jruby-head"
5757
appraisal: "head"
5858
exec_cmd: "kettle-test"
59+
kettle_test_runner: "rspec"
5960
rubygems: default
6061
bundler: default
6162

@@ -91,4 +92,6 @@ jobs:
9192

9293
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
9394
if: ${{ !env.ACT || (! startsWith(matrix.ruby, 'jruby') && !startsWith(matrix.ruby, 'truffleruby')) }}
95+
env:
96+
KETTLE_TEST_RUNNER: ${{ matrix.kettle_test_runner || 'turbo_tests2' }}
9497
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}

.github/workflows/truffleruby-22.3.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,6 @@ jobs:
6161
bundler: ${{ matrix.bundler }}
6262
bundler-cache: true
6363

64-
- name: "[Attempt 1] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
65-
id: bundleAppraisalAttempt1
66-
if: ${{ !env.ACT }}
67-
run: bundle exec appraisal ${{ matrix.appraisal }} install
68-
# Continue to the next step on failure
69-
continue-on-error: true
70-
71-
# Effectively an automatic retry of the previous step.
72-
- name: "[Attempt 2] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
73-
id: bundleAppraisalAttempt2
74-
# If bundleAppraisalAttempt1 failed, try again here; Otherwise skip.
75-
if: ${{ steps.bundleAppraisalAttempt1.outcome == 'failure' && !env.ACT }}
76-
run: bundle exec appraisal ${{ matrix.appraisal }} install
77-
7864
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
7965
if: ${{ !env.ACT }}
80-
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
66+
run: bundle exec ${{ matrix.exec_cmd }}

.github/workflows/truffleruby-23.0.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,6 @@ jobs:
6161
bundler: ${{ matrix.bundler }}
6262
bundler-cache: true
6363

64-
- name: "[Attempt 1] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
65-
id: bundleAppraisalAttempt1
66-
if: ${{ !env.ACT }}
67-
run: bundle exec appraisal ${{ matrix.appraisal }} install
68-
# Continue to the next step on failure
69-
continue-on-error: true
70-
71-
# Effectively an automatic retry of the previous step.
72-
- name: "[Attempt 2] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
73-
id: bundleAppraisalAttempt2
74-
# If bundleAppraisalAttempt1 failed, try again here; Otherwise skip.
75-
if: ${{ steps.bundleAppraisalAttempt1.outcome == 'failure' && !env.ACT }}
76-
run: bundle exec appraisal ${{ matrix.appraisal }} install
77-
7864
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
7965
if: ${{ !env.ACT }}
80-
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
66+
run: bundle exec ${{ matrix.exec_cmd }}

Appraisals

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ end
106106
appraise "ruby-3-0" do
107107
eval_gemfile "modular/json/truffleruby_22_3.gemfile"
108108
eval_gemfile "modular/json/truffleruby_23_0.gemfile"
109+
eval_gemfile "modular/uri/truffleruby_22_3.gemfile"
110+
eval_gemfile "modular/uri/truffleruby_23_0.gemfile"
109111
eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile"
110112
eval_gemfile "modular/faraday_v2.gemfile"
111113
eval_gemfile "modular/hashie_v5.gemfile"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
if RUBY_ENGINE == "truffleruby" && RUBY_ENGINE_VERSION.start_with?("22.3")
4+
# uri 1.1.1 can crash old TruffleRuby's regexp engine during Bundler gemspec validation.
5+
gem "uri", "~> 1.0", ">= 1.0.4"
6+
end
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
if RUBY_ENGINE == "truffleruby" && RUBY_ENGINE_VERSION.start_with?("23.0")
4+
# uri 1.1.1 can crash old TruffleRuby's regexp engine during Bundler gemspec validation.
5+
gem "uri", "~> 1.0", ">= 1.0.4"
6+
end

gemfiles/ruby_3_0.gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ eval_gemfile("modular/json/truffleruby_22_3.gemfile")
88

99
eval_gemfile("modular/json/truffleruby_23_0.gemfile")
1010

11+
eval_gemfile("modular/uri/truffleruby_22_3.gemfile")
12+
13+
eval_gemfile("modular/uri/truffleruby_23_0.gemfile")
14+
1115
eval_gemfile("modular/x_std_libs/r3.1/libs.gemfile")
1216

1317
eval_gemfile("modular/faraday_v2.gemfile")

0 commit comments

Comments
 (0)