Run CI build using Github Actions.
Builds master on push to master and PRs to master.
ADD
.github/workflows/continuous-integration.yaml
+name: Build Master
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+ schedule:
+ - cron: '0 0 * * *'
+
+jobs:
+ build:
+ name: Build
+ strategy:
+ max-parallel: 2
+ matrix:
+ java:
+ - '1.8'
+ - '11'
+ os:
+ - ubuntu-latest
+ - macos-latest
+ exclude:
+ - os: macos-latest
+ java: '1.8'
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v1
+ with:
+ fetch-depth: 1
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Build
+ run: |
+ ./gradlew -S -Pskip.signing assemble
+ unset GEM_PATH GEM_HOME JRUBY_OPTS
+ ./gradlew -S -Pskip.signing check -x test
+ - name: Upstream Build
+ if: matrix.os == 'ubuntu-latest' && matrix.java == '11'
+ run: |
+ unset GEM_PATH GEM_HOME JRUBY_OPTS
+ ./test-asciidoctor-upstream.sh
+
+

MODIFY
test-asciidoctor-upstream.sh
test-asciidoctor-upstream.sh
@@ -24,7 +24,7 @@ sed "s;<version></version>;<version>$ASCIIDOCTOR_VERSION</version>;" pom.xml > p
mv -f pom.xml.sedtmp pom.xml
#we override the jruby version here with one supported by java9, additionally java9 needs some add-opens arguments that need to be ignored on older jvms
-mvn install -Dgemspec=asciidoctor.gemspec -Djruby.version=9.1.14.0 -Djruby.jvmargs="-XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED"
+mvn install --no-transfer-progress -Dgemspec=asciidoctor.gemspec -Djruby.version=9.2.9.0 -Djruby.jvmargs="-XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED"
cd ../..
#rm -rf maven

Run CI build using Github Actions.
Builds master on push to master and PRs to master.