Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for JRuby on Windows #3550

Closed
slonopotamus opened this issue Jan 25, 2020 · 11 comments · Fixed by #3841
Closed

Add CI for JRuby on Windows #3550

slonopotamus opened this issue Jan 25, 2020 · 11 comments · Fixed by #3841
Assignees
Labels
infrastructure v2.0.14 Issues resolved in the 2.0.14 release
Milestone

Comments

@slonopotamus
Copy link
Contributor

slonopotamus commented Jan 25, 2020

Subj. This is a very problematic environment and possibly requires some fixes.

asciidoctor-pdf issue: asciidoctor/asciidoctor-pdf#1520, current state on JRuby+Windows: 920 examples, 316 failures after a bit of fixing, 920 examples, 5 failures

asciidoctor-epub3 issue: asciidoctor/asciidoctor-epub3#254, current state on JRuby+Windows: 13 examples, 6 failures fully passes its test suite

@mojavelinux
Copy link
Member

I'd like to start by using GitHub Actions with only JRuby on Windows. We can then gradually add more environments as needed. But I don't want to go full sail on GitHub Actions here yet.

@slonopotamus
Copy link
Contributor Author

Hey, I didn't say anything about GitHub Actions here!)

@mojavelinux
Copy link
Member

hehehe I should have been more clear. It seems AppVeyor doesn't provide JRuby as an option. So it might be our only hope ;)

@mojavelinux
Copy link
Member

Now that the Windows CI jobs have been successfully migrated to GitHub Actions, I'm ready to proceed with this change. I will prepare a PR.

@mojavelinux mojavelinux self-assigned this Nov 9, 2020
@mojavelinux mojavelinux added this to the v2.0.x milestone Nov 9, 2020
@mojavelinux
Copy link
Member

From the first attempt, we've learned there are problems with the CLI tests on JRuby for Windows. I've captured the following comment from that PR:

I either need to switch away from IO.popen or just disable the CLI tests that are failing (on JRuby Windows). The reason I'm using IO.popen is because there was a bug in popen3 that was causing the test to fail in some version of JRuby. But that could be outdated now. So I need to reevaluate.

@mojavelinux
Copy link
Member

What we do know is that we have to disable the Pygments tests on JRuby for Windows since that version of JRuby hangs when running pygments.rb.

mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Nov 9, 2020
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Nov 9, 2020
@mojavelinux
Copy link
Member

For some reason, the conditional checks around the tests are not working on JRuby for Windows. For example:

test 'description' do
end unless windows?

What's strange is that windows? returns true. It even fails if I nest the test in an unless conditional (instead of using the postfix syntax).

mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Nov 10, 2020
@mojavelinux
Copy link
Member

I figured it out. It was a mixup between an instance method and a class method. The method missing fallback was making it look like the method was called when in fact it was not.

mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Nov 10, 2020
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Nov 10, 2020
@mojavelinux
Copy link
Member

We're down to 7 failing tests on JRuby 9.2 on Windows. These are very clearly bugs in JRuby since these tests work on JRuby on Linux and on C Ruby on Windows. But they seem to be errors in the test itself rather than the behavior of Asciidoctor. So I'm willing to rework the test harness as necessary to get them working.

@graphitefriction graphitefriction linked a pull request Dec 19, 2020 that will close this issue
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Apr 15, 2021
* run tests on JRuby 9.1 and 9.2 for Windows in CI
* don't run Pygments tests on JRuby 9.1 for Windows
* exclude tests that use run_command on JRuby 9.1 for Windows
* ensure mtime of input file honors TZ environment variable on JRuby for Windows
@mojavelinux
Copy link
Member

The only tests that fail on JRuby 9.1 for Windows are the tests that use run_command, which in turn use IO.popen. I don't understand the reason why IO.popen is failing in this case. But since there are only 6 uses of it, it seems reason to replace it with something else. But I'm going to defer that to a separate issue so we can get the rest of the tests running.

mojavelinux added a commit that referenced this issue Apr 15, 2021
* run tests on JRuby 9.1 and 9.2 for Windows in CI
* don't run Pygments tests on JRuby 9.1 for Windows
* exclude tests that use run_command on JRuby 9.1 for Windows
* ensure mtime of input file honors TZ environment variable on JRuby for Windows
@mojavelinux
Copy link
Member

While getting these tests running, I discovered a bug in JRuby for Windows. Time.now and Time.at honor the TZ environment variable, but IO#mtime does not. But I found a workaround by running the result through Time.at.

@mojavelinux mojavelinux added the v2.0.14 Issues resolved in the 2.0.14 release label Apr 15, 2021
ggrossetie pushed a commit to ggrossetie/asciidoctor that referenced this issue Jun 12, 2021
…ciidoctor#3841)

* run tests on JRuby 9.1 and 9.2 for Windows in CI
* don't run Pygments tests on JRuby 9.1 for Windows
* exclude tests that use run_command on JRuby 9.1 for Windows
* ensure mtime of input file honors TZ environment variable on JRuby for Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure v2.0.14 Issues resolved in the 2.0.14 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants