Skip to content

Commit

Permalink
ci: test installed gem on java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed May 23, 2023
1 parent 25b2166 commit ff2c996
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Expand Up @@ -699,7 +699,6 @@ jobs:

jruby-package:
needs: ["rcd_image_version"]
name: "jruby-package"
runs-on: ubuntu-latest
container:
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-jruby"
Expand All @@ -719,17 +718,19 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["jruby-9.4"]
jruby: ["9.4"]
jre: ["8", "11"]
name: "jruby-${{matrix.jruby}}-jre${{matrix.jre}}-install"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{matrix.ruby}}"
- uses: actions/download-artifact@v3
with:
name: jruby-gem
path: gems
- run: ./scripts/test-gem-install gems
- run: |
docker run --rm -v "$(pwd):/nokogiri" -w /nokogiri \
jruby:${{matrix.jruby}}-jre${{matrix.jre}} \
./scripts/test-gem-install gems
6 changes: 6 additions & 0 deletions rakelib/extensions.rake
Expand Up @@ -362,6 +362,12 @@ namespace "gem" do
end

if java?
# append to the existing "java" task defined by rake-compiler
task "java" do # rubocop:disable Rake/Desc
# if we're building the java gem, don't build the vanilla gem (see rakelib/package.rake)
Rake::Task["pkg/#{NOKOGIRI_SPEC.full_name}.gem"].clear
end

require "rake/javaextensiontask"
Rake::JavaExtensionTask.new("nokogiri", NOKOGIRI_SPEC.dup) do |ext|
# Keep the extension C files because they have docstrings (and Java files don't)
Expand Down

0 comments on commit ff2c996

Please sign in to comment.