From 7920ce0e61f5be53a37d5794c9e21e40b1235b63 Mon Sep 17 00:00:00 2001 From: Lud Date: Wed, 2 Aug 2023 12:31:01 +0200 Subject: [PATCH 1/8] CI: update Rubies, add caching --- .github/workflows/ci.yml | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e34616a..0a24675 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,34 +2,51 @@ name: CI on: [push, pull_request] jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest continue-on-error: ${{ matrix.flaky }} + name: "Tests: Ruby ${{ matrix.ruby-version }}" + if: "!contains(github.event.head_commit.message, '[skip ci]')" strategy: matrix: - ruby-version: ["2.5", "2.6", "2.7", "3.0", "3.1", "truffleruby-22", "truffleruby-21"] + ruby-version: + - 2.7 + - 3.0 + - 3.1 + - 3.2 + - truffleruby-22 + - truffleruby-23 flaky: [false] include: - - ruby-version: "ruby-head" + - ruby-version: "head" flaky: true - - ruby-version: "jruby-9.2" + - ruby-version: "jruby-9.3" # Ruby 2.6.x support flaky: true - - ruby-version: "jruby-9.3" + - ruby-version: "jruby-9.4" # Ruby 3.1.x support flaky: true - ruby-version: "jruby-head" flaky: true - ruby-version: "truffleruby-head" flaky: true steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} + - uses: actions/cache@v3 + with: + path: vendor/bundle + key: ${{ runner.os }}-${{ matrix.ruby-version }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + - name: Bundle install run: | gem install bundler - bundle install + bundle config path vendor/bundle + bundle install -j $(getconf _NPROCESSORS_ONLN) --retry 3 + - name: Run Tests run: bundle exec rake test From 5506cbf5cf20dda1175d6a0fbe86d37efee1b2a7 Mon Sep 17 00:00:00 2001 From: Lud Date: Wed, 2 Aug 2023 13:04:05 +0200 Subject: [PATCH 2/8] fix? path to gemfile in CI script --- .github/workflows/ci.yml | 2 +- .gitignore | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a24675..f669bb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/cache@v3 with: path: vendor/bundle - key: ${{ runner.os }}-${{ matrix.ruby-version }}-gems-${{ hashFiles('**/Gemfile.lock') }} + key: ${{ runner.os }}-${{ matrix.ruby-version }}-gems-${{ hashFiles('../../Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- diff --git a/.gitignore b/.gitignore index aec7a4b..bea8f16 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ coverage ri *.swp Gemfile.lock +vendor +.bundle From 95925a1b66fa6c199734903ccf33e665248de9a5 Mon Sep 17 00:00:00 2001 From: Lud Date: Wed, 2 Aug 2023 13:07:27 +0200 Subject: [PATCH 3/8] revert previous commit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f669bb2..0a24675 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/cache@v3 with: path: vendor/bundle - key: ${{ runner.os }}-${{ matrix.ruby-version }}-gems-${{ hashFiles('../../Gemfile.lock') }} + key: ${{ runner.os }}-${{ matrix.ruby-version }}-gems-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- From b9479e9e278ecb1c3cba8fe769d2c38b58929c22 Mon Sep 17 00:00:00 2001 From: Lud Date: Sun, 15 Oct 2023 17:33:25 +0700 Subject: [PATCH 4/8] Update .github/workflows/ci.yml Co-authored-by: Olle Jonsson --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a24675..143a252 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: matrix: ruby-version: - 2.7 - - 3.0 + - "3.0" - 3.1 - 3.2 - truffleruby-22 From 78e48e680fc92f7ca79f92fb43d935d83684acb8 Mon Sep 17 00:00:00 2001 From: Lud Date: Sun, 15 Oct 2023 17:40:49 +0700 Subject: [PATCH 5/8] [suggestion] use setup-ruby bundler cache --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 143a252..a60ce99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,13 +34,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - - - uses: actions/cache@v3 - with: - path: vendor/bundle - key: ${{ runner.os }}-${{ matrix.ruby-version }}-gems-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ${{ runner.os }}-gems- + bundler-cache: true - name: Bundle install run: | From e34c8bc813128410aaa183f4bc8b9f93058904e6 Mon Sep 17 00:00:00 2001 From: Lud Date: Wed, 18 Oct 2023 16:05:16 +0700 Subject: [PATCH 6/8] [suggestion pt2] we can also strip out 'bundle install' --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a60ce99..b362cc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,11 +36,5 @@ jobs: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - - name: Bundle install - run: | - gem install bundler - bundle config path vendor/bundle - bundle install -j $(getconf _NPROCESSORS_ONLN) --retry 3 - - name: Run Tests run: bundle exec rake test From ee3cfc63785514d7ceef1ebe14af9702baee46bf Mon Sep 17 00:00:00 2001 From: Lud Date: Wed, 18 Oct 2023 16:12:36 +0700 Subject: [PATCH 7/8] time flies --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b362cc1..338c7d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - ruby-version: "truffleruby-head" flaky: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1 From c1a984ab8a8ca6b13d50a30971ea79142958553e Mon Sep 17 00:00:00 2001 From: Lud Date: Wed, 14 Aug 2024 15:56:28 +0200 Subject: [PATCH 8/8] adds Ruby 3.3., 3.4, TRuby 24 --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 338c7d5..2e278e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,10 @@ jobs: - "3.0" - 3.1 - 3.2 - - truffleruby-22 + - 3.3 + - 3.4 - truffleruby-23 + - truffleruby-24 flaky: [false] include: - ruby-version: "head"