From a840fa7ad46d09750fc9b10a8922af629addf8e6 Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Tue, 1 Aug 2023 11:19:37 -0400 Subject: [PATCH 1/9] Add JRuby rake CI task --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9353787658a..8884edb7f5d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,6 +65,19 @@ jobs: - name: Run Ruby tests run: bundle exec rake compile_no_debug + build-jruby: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JRuby + uses: ruby/setup-ruby@v1 + with: + ruby-version: jruby + bundler-cache: true + - name: Compile generated Java files + run: rake + shell: bash + lex-ruby: runs-on: ubuntu-latest steps: From dadf30ba9afefd283fb281239a1e63e67d0bbfbe Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Tue, 1 Aug 2023 12:39:22 -0400 Subject: [PATCH 2/9] Exclude JRuby from installing ruby_memcheck --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 90102c5b770..8c06bb3edfd 100644 --- a/Gemfile +++ b/Gemfile @@ -9,4 +9,4 @@ gemspec gem "rake" gem "rake-compiler" gem "test-unit" -gem "ruby_memcheck" +gem "ruby_memcheck", platform: %i[ mri truffleruby ] From f9eafb8115c6765866d3b47536ccf01b6e613c48 Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Tue, 1 Aug 2023 12:41:16 -0400 Subject: [PATCH 3/9] Speed up JRuby setup --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8884edb7f5d..474afc30526 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,8 +67,10 @@ jobs: build-jruby: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + env: + JRUBY_OPTS: "--dev" + steps: + - uses: actions/checkout@v3 - name: Set up JRuby uses: ruby/setup-ruby@v1 with: From 21ea0b0f365f65ccc7db802b67374754e98efdd3 Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Tue, 1 Aug 2023 12:45:22 -0400 Subject: [PATCH 4/9] How did that indentation change? --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 474afc30526..bce9f5dc5bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,8 +69,8 @@ jobs: runs-on: ubuntu-latest env: JRUBY_OPTS: "--dev" - steps: - - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v3 - name: Set up JRuby uses: ruby/setup-ruby@v1 with: From 014d08a2444354b164a1d65c7307f3250a53ce44 Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Tue, 1 Aug 2023 12:53:26 -0400 Subject: [PATCH 5/9] Maybe rake is finding another rake? Try explicit jruby -S rake --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bce9f5dc5bd..5295abcf1d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,7 +77,7 @@ jobs: ruby-version: jruby bundler-cache: true - name: Compile generated Java files - run: rake + run: jruby -S rake shell: bash lex-ruby: From f5285f18c87c891bf63c4f490926c83b0eda4e28 Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Tue, 1 Aug 2023 13:00:07 -0400 Subject: [PATCH 6/9] Unbreak windows by relying on jruby engine check vs using platform --- Gemfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 8c06bb3edfd..240f1081793 100644 --- a/Gemfile +++ b/Gemfile @@ -9,4 +9,7 @@ gemspec gem "rake" gem "rake-compiler" gem "test-unit" -gem "ruby_memcheck", platform: %i[ mri truffleruby ] + +if RUBY_ENGINE != "jruby" + gem "ruby_memcheck" +end From a34b463d170c82777647ad93cd6a6386a8de1f36 Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Tue, 1 Aug 2023 13:01:12 -0400 Subject: [PATCH 7/9] see if bundle fixes this require issue --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5295abcf1d6..4fe2cc28bb6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,7 +77,7 @@ jobs: ruby-version: jruby bundler-cache: true - name: Compile generated Java files - run: jruby -S rake + run: jruby --dev -S bundle exec rake shell: bash lex-ruby: From ec9885d3ad60de88df5b78dfd5e99f32256fe2f2 Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Tue, 1 Aug 2023 13:04:21 -0400 Subject: [PATCH 8/9] ruby_memcheck must be an entry when run from jruby even though it is skipped by platform. Doing long platform list --- Gemfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 240f1081793..fedc01f1a06 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,4 @@ gemspec gem "rake" gem "rake-compiler" gem "test-unit" - -if RUBY_ENGINE != "jruby" - gem "ruby_memcheck" -end +gem "ruby_memcheck", platform: %i[ mri truffleruby mswin mingw x64_mingw ] From acd96b6a5fda61d01b2b11ad671eed3976a855c3 Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Tue, 1 Aug 2023 13:07:45 -0400 Subject: [PATCH 9/9] Should only compile for now. Later PR will do more once fiddle backend completed --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4fe2cc28bb6..df82ab3540a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,7 +77,7 @@ jobs: ruby-version: jruby bundler-cache: true - name: Compile generated Java files - run: jruby --dev -S bundle exec rake + run: jruby --dev -S bundle exec rake compile shell: bash lex-ruby: