Skip to content

[build] add comment Workaround to suppress warnings from JRuby in JDK… #289

[build] add comment Workaround to suppress warnings from JRuby in JDK…

[build] add comment Workaround to suppress warnings from JRuby in JDK… #289

Workflow file for this run

name: Build
on:
push:
branches:
- main
jobs:
build:
strategy:
matrix:
os: [ ubuntu-22.04, windows-latest, macos-latest ]
java: [ '11', '17', '21' ]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} - Java ${{ matrix.java }} build test
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Setup Environment (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install language-pack-ja-base language-pack-ja
sudo update-locale LANG=ja_JP.UTF8
sudo apt-get -y install fonts-noto* language-selector-common
export LANG=ja_JP.UTF-8
fc-cache -f
fc-match Dialog | grep "Noto Sans CJK JP"
sudo apt-get -y install graphviz
# for GitHub Actions test
sudo apt-get -y install poppler-utils
- name: Setup Environment (macOS)
if: startsWith(matrix.os, 'macos')
run: |
brew install graphviz
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: ${{ matrix.java }}
- name: Build with Gradle (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
# Check font settings
export LANG=ja_JP.UTF-8
fc-match Dialog | grep "Noto Sans CJK JP"
## Workaround to suppress warnings from JRuby in JDK 17 or later (https://github.com/jruby/jruby/issues/6721)
## export JDK_JAVA_OPTIONS="--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED"
# create document
./gradlew docs
# output unused images and test Gradle task
./gradlew checkSyncImage
- name: Build with Gradle (macOS)
if: startsWith(matrix.os, 'macos')
run: |
## Workaround to suppress warnings from JRuby in JDK 17 or later (https://github.com/jruby/jruby/issues/6721)
## export JDK_JAVA_OPTIONS="--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED"
# create document
./gradlew docs
# output unused images and test Gradle task
./gradlew checkSyncImage
- name: Build with Gradle (Windows)
if: startsWith(matrix.os, 'windows')
shell: pwsh
run: |
## Workaround to suppress warnings from JRuby in JDK 17 or later (https://github.com/jruby/jruby/issues/6721)
## $env:JDK_JAVA_OPTIONS = "--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED"
# create document
.\gradlew docs
# output unused images and test Gradle task
.\gradlew checkSyncImage
- name: Check
shell: bash
run: |
find docs/ -type f -ls
find docs/ -type f -ls | wc
# test asciidoctor-diagram (If you are not using diagram, comment out the next line)
find docs/ -type f -ls | egrep 'svg$'
# test asciidoctor
file docs/index.pdf | grep PDF
file docs/index.html | grep HTML
- name: Output PDF information
if: startsWith(matrix.os, 'ubuntu')
run: |
echo "# PDF information"
pdfinfo docs/index.pdf
echo "# URLs in document"
pdfinfo -url docs/index.pdf | tail -n +2 | awk '{ print $3 }' | sort | uniq
echo "# Unused images"