From 7a125c5f990d84f1c03a20f2a599ea2f26650b74 Mon Sep 17 00:00:00 2001 From: sue445 Date: Wed, 27 Dec 2023 00:25:33 +0900 Subject: [PATCH 1/3] CI againt for Ruby 3.3 --- .github/workflows/test.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 12bf82b5..0ea872ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,10 +27,12 @@ jobs: - "3.0" - "3.1" - "3.2" + - "3.3" rubyopt: - "" - "--jit" - "--yjit" + - "--rjit" exclude: # --jit is available since MRI 2.6 - ruby: "2.3" @@ -52,6 +54,23 @@ jobs: rubyopt: "--yjit" - ruby: "3.0" rubyopt: "--yjit" + # --rjit is available since MRI 3.3 + - ruby: "2.3" + rubyopt: "--rjit" + - ruby: "2.4" + rubyopt: "--rjit" + - ruby: "2.5" + rubyopt: "--rjit" + - ruby: "2.6" + rubyopt: "--rjit" + - ruby: "2.7" + rubyopt: "--rjit" + - ruby: "3.0" + rubyopt: "--rjit" + - ruby: "3.1" + rubyopt: "--rjit" + - ruby: "3.2" + rubyopt: "--rjit" uses: ./.github/workflows/test_main.yml with: From 0ec658f41dcc11b6cf9caddcb2d96186eb2b49d0 Mon Sep 17 00:00:00 2001 From: sue445 Date: Wed, 27 Dec 2023 13:43:49 +0900 Subject: [PATCH 2/3] Now, RJIT doesn't work on GitHub Actions... https://github.com/itamae-kitchen/itamae/actions/runs/7330711854/job/19972558099 k0kubun says "This is probably an omission in the assembler implementation." ref. https://ruby-jp.slack.com/archives/CLTRGLV4Z/p1703663608541879 --- .github/workflows/test.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ea872ec..a8d5a551 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,6 @@ jobs: - "" - "--jit" - "--yjit" - - "--rjit" exclude: # --jit is available since MRI 2.6 - ruby: "2.3" @@ -54,23 +53,6 @@ jobs: rubyopt: "--yjit" - ruby: "3.0" rubyopt: "--yjit" - # --rjit is available since MRI 3.3 - - ruby: "2.3" - rubyopt: "--rjit" - - ruby: "2.4" - rubyopt: "--rjit" - - ruby: "2.5" - rubyopt: "--rjit" - - ruby: "2.6" - rubyopt: "--rjit" - - ruby: "2.7" - rubyopt: "--rjit" - - ruby: "3.0" - rubyopt: "--rjit" - - ruby: "3.1" - rubyopt: "--rjit" - - ruby: "3.2" - rubyopt: "--rjit" uses: ./.github/workflows/test_main.yml with: From a6002777f15357c54f4dd58b88fdc9720e190854 Mon Sep 17 00:00:00 2001 From: sue445 Date: Thu, 28 Dec 2023 19:31:21 +0900 Subject: [PATCH 3/3] Fixed bundler installing at ruby 2.7 details ``` Installing Bundler Using latest Bundler for ruby-2.7.8 because the default Bundler gem is too old for that Ruby version Ruby 2.6-2.7 only works with Bundler 2.4 /opt/hostedtoolcache/Ruby/2.7.8/x64/bin/gem install bundler -v ~> 2.4.0 ERROR: While executing gem ... (Zlib::BufError) buffer error Took 0.78 seconds ``` c.f. https://github.com/itamae-kitchen/itamae/actions/runs/7343647181/job/19997130475 Perhaps this is following issue https://bugs.ruby-lang.org/issues/18058 Therefore, `RUBYOPT` was set only at testing to avoid this issue --- .github/workflows/test_main.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_main.yml b/.github/workflows/test_main.yml index 2ea98180..03806334 100644 --- a/.github/workflows/test_main.yml +++ b/.github/workflows/test_main.yml @@ -14,9 +14,6 @@ on: SLACK_WEBHOOK: required: true -env: - RUBYOPT: ${{ inputs.rubyopt }} - jobs: unit: runs-on: ubuntu-latest @@ -33,6 +30,8 @@ jobs: - run: bundle update - run: bundle exec rake spec:unit + env: + RUBYOPT: ${{ inputs.rubyopt }} - name: Slack Notification (not success) uses: lazy-actions/slatify@master @@ -70,14 +69,23 @@ jobs: - run: bundle update - run: bundle exec rake spec:integration:docker:boot + env: + RUBYOPT: ${{ inputs.rubyopt }} - run: bundle exec rake spec:integration:docker:provision env: + RUBYOPT: ${{ inputs.rubyopt }} + # FIXME: avoid error for "Command `chmod 777 /tmp/itamae_tmp` failed. (exit status: 1)" ITAMAE_TMP_DIR: /var/tmp/itamae_tmp - run: bundle exec rake spec:integration:docker:serverspec + env: + RUBYOPT: ${{ inputs.rubyopt }} + - run: bundle exec rake spec:integration:docker:clean_docker_container + env: + RUBYOPT: ${{ inputs.rubyopt }} - name: Slack Notification (not success) uses: lazy-actions/slatify@master @@ -108,7 +116,12 @@ jobs: - run: bundle update - run: bundle exec rake spec:integration:local:main + env: + RUBYOPT: ${{ inputs.rubyopt }} + - run: bundle exec rake spec:integration:local:ordinary_user + env: + RUBYOPT: ${{ inputs.rubyopt }} - name: Slack Notification (not success) uses: lazy-actions/slatify@master