Skip to content

Commit

Permalink
CI: test on more JDKs (PR #291)
Browse files Browse the repository at this point in the history
Added more environments to be tested on GitHub Actions CI.

It now runs on

* Linux: all JDKs from 8 to 16
* Linux with OpenJ9: 8, 11, 16
* MacOS: 8, 11, 13, 15
* Windows: 8, 11, 13, 15

Also added --add-opens to JMH runs for JDK 16 (see #241).
  • Loading branch information
vhotspur authored Jul 23, 2021
2 parents 8d74d9c + 84d7091 commit c2b0212
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ jobs:
- openjdk9
- openjdk10
- openjdk11
#- openjdk12
- openjdk12
- openjdk13
- openjdk14
- openjdk15
- openjdk16
- openj9-openjdk8
- openj9-openjdk11
#- openj9-openjdk16
- openj9-openjdk16
runs-on: ubuntu-latest
container: "renaissancebench/buildenv:${{ matrix.image }}"
continue-on-error: true
Expand Down Expand Up @@ -101,7 +105,7 @@ jobs:
macos:
strategy:
matrix:
java: [ '8', '11' ] #, '13', '15' ]
java: [ '8', '11', '13', '15' ]
runs-on: macos-latest
continue-on-error: true
steps:
Expand Down Expand Up @@ -150,7 +154,7 @@ jobs:
windows:
strategy:
matrix:
java: [ '8', '11' ] #, '13', '15' ]
java: [ '8', '11' , '13', '15' ]
runs-on: windows-latest
continue-on-error: true
steps:
Expand Down
1 change: 1 addition & 0 deletions tools/ci/bench-jmh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source "$(dirname "$0")/common.sh"

java -jar "$RENAISSANCE_JMH_JAR" \
-jvmArgs -Xms2500M -jvmArgs -Xmx2500m \
$( for arg in $( get_jvm_workaround_args ); do echo "-jvmArgs" "$arg"; done ) \
-jvmArgs -Dorg.renaissance.jmh.configuration=test \
-jvmArgs -Dorg.renaissance.jmh.fakeIncompatible=true \
-wi 0 -i 1 -f 1 -foe true
14 changes: 14 additions & 0 deletions tools/ci/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ RENAISSANCE_GIT_VERSION=$(git describe --tags --always --dirty=-SNAPSHOT || echo
# Strip leading 'v' from the git-produced version
RENAISSANCE_VERSION=${RENAISSANCE_GIT_VERSION#v}

# Try to guess JVM version (and replace 1.8 with 8)
RENAISSANCE_JVM_MAJOR_VERSION="$( java -version 2>&1 \
| sed -n -e '/version[[:blank:]]\+"/ { s/.*version[[:blank:]]\+"\([^"]*\)".*/\1/; s/1[.]8/8/; s/^\([^.]*\)[.].*/\1/; p }' \
|| echo 8 )"

# The base bundle
RENAISSANCE_DIR="target"
RENAISSANCE_JAR_NAME="renaissance-gpl-${RENAISSANCE_VERSION}.jar"
Expand All @@ -43,6 +48,15 @@ cp_reflink() {
cp $REFLINK "$@"
}

get_jvm_workaround_args() {
if [ "$RENAISSANCE_JVM_MAJOR_VERSION" = "16" ]; then
echo "--add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
echo "--add-opens=java.base/java.util=ALL-UNNAMED"
echo "--add-opens=java.base/java.nio=ALL-UNNAMED"
echo "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
fi
}


# Make sure we are in the top-level directory so that we can use
# relative paths when referring to files within the project.
Expand Down

0 comments on commit c2b0212

Please sign in to comment.