Skip to content

Commit

Permalink
Add JDK11 build jobs
Browse files Browse the repository at this point in the history
- Add infrastructure for downloading labsjdk11
- Extend file names of installables with Java version
- Drop -XX:-UseJVMCIClassLoader in mx_graalsqueak.py

Closes #109
  • Loading branch information
fniephaus committed Mar 25, 2020
1 parent 9fee05b commit 34da75b
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 25 deletions.
172 changes: 156 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
style_and_build_config:
name: Code Style and Build Config
name: Code Style + Build Config
runs-on: ubuntu-latest
steps:
- name: Clone GraalSqueak repository
Expand All @@ -38,14 +38,65 @@ jobs:
# Set up mx and oracle/graal
export MX_PATH=${HOME}/mx
git clone --quiet --depth 1 https://github.com/graalvm/mx.git ${MX_PATH}
export JAVA_HOME="$(mx.graalsqueak/utils.sh download-openjdk8-jvmci ~/)"
export JAVA_HOME="$(mx.graalsqueak/utils.sh download-labsjdk11 ~/)"
export PATH=${PATH}:${MX_PATH}:${JAVA_HOME}/bin
mx.graalsqueak/utils.sh shallow-clone-graalvm-project https://github.com/oracle/graal.git

mx gate --strict-mode --tags style,fullbuild

linux:
name: Test on Linux with Coverage
linux-java11:
name: Linux + JDK11 + Coverage
runs-on: ubuntu-latest
steps:
- name: Clone GraalSqueak repository
uses: actions/checkout@v2
with:
submodules: true
- name: Set up dependencies
shell: bash
run: |
sudo apt update -qq && sudo apt install -y libsdl2-dev
mx.graalsqueak/utils.sh shallow-clone-graalvm-project https://github.com/oracle/graal.git
mx.graalsqueak/utils.sh shallow-clone-graalvm-project https://github.com/graalvm/graaljs.git
mx.graalsqueak/utils.sh download-graalsqueak-image
mx.graalsqueak/utils.sh ensure-test-image
git clone --quiet --depth 1 https://github.com/graalvm/mx.git ${HOME}/mx
echo "::add-path::${HOME}/mx"
export JAVA_HOME="$(mx.graalsqueak/utils.sh download-labsjdk11 ~/)"
echo "::add-path::${JAVA_HOME}/bin"
echo "::set-env name=JAVA_HOME::${JAVA_HOME}"
- name: Run gate with code coverage
run: mx --disable-polyglot --dy /graal-js gate --strict-mode --tags build,test --jacocout coverage
- name: Report code coverage
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
bash <(curl -s https://codecov.io/bash)
curl -sSL --retry 3 -o ~/codacy-coverage-reporter.jar "https://github.com/codacy/codacy-coverage-reporter/releases/download/4.0.3/codacy-coverage-reporter-4.0.3-assembly.jar"
java -jar ~/codacy-coverage-reporter.jar report -l Java -r jacoco.xml
if: success()
- name: Build and install GraalSqueak component
run: |
mx --env graalsqueak-svm build --dependencies=SMALLTALK_INSTALLABLE_SVM_JAVA11
export INSTALLABLE_TARGET="$(mx.graalsqueak/utils.sh installable-filename java11)"
echo "::set-env name=INSTALLABLE_TARGET::${INSTALLABLE_TARGET}"
cp $(mx --env graalsqueak-svm paths SMALLTALK_INSTALLABLE_SVM_JAVA11) "${INSTALLABLE_TARGET}"
export GRAALVM_HOME="$(mx.graalsqueak/utils.sh download-graalvm-ce java11 ~/)"
${GRAALVM_HOME}/bin/gu install -L "${INSTALLABLE_TARGET}"
echo "::add-path::${GRAALVM_HOME}/bin"
- name: Run SystemReporter on GraalVM
run: 'graalsqueak --jvm --code "String streamContents: [:s | SystemReporter new reportVM: s] limitedTo: 10000"'
- name: Run SystemReporter on Native Image
run: 'graalsqueak --native --code "String streamContents: [:s | SystemReporter new reportVM: s] limitedTo: 10000" images/test-64bit.image'
- name: Run tinyBenchmarks on GraalVM
run: graalsqueak --jvm --code "1 tinyBenchmarks" images/test-64bit.image
- name: Run tinyBenchmarks on Native Image
run: graalsqueak --native --code "1 tinyBenchmarks" images/test-64bit.image
- name: Upload GraalSqueak component
run: mx.graalsqueak/utils.sh deploy-asset ${{ github.ref }} ${{ env.INSTALLABLE_TARGET }} ${{ secrets.GITHUB_TOKEN }}

linux-java8:
name: Linux + JDK8 + Coverage
runs-on: ubuntu-latest
steps:
- name: Clone GraalSqueak repository
Expand Down Expand Up @@ -78,10 +129,10 @@ jobs:
- name: Build and install GraalSqueak component
run: |
mx --env graalsqueak-svm build --dependencies=SMALLTALK_INSTALLABLE_SVM_JAVA8
export INSTALLABLE_TARGET="$(mx.graalsqueak/utils.sh installable-filename)"
export INSTALLABLE_TARGET="$(mx.graalsqueak/utils.sh installable-filename java8)"
echo "::set-env name=INSTALLABLE_TARGET::${INSTALLABLE_TARGET}"
cp $(mx --env graalsqueak-svm paths SMALLTALK_INSTALLABLE_SVM_JAVA8) "${INSTALLABLE_TARGET}"
export GRAALVM_HOME="$(mx.graalsqueak/utils.sh download-graalvm-ce ~/)"
export GRAALVM_HOME="$(mx.graalsqueak/utils.sh download-graalvm-ce java8 ~/)"
${GRAALVM_HOME}/bin/gu install -L "${INSTALLABLE_TARGET}"
echo "::add-path::${GRAALVM_HOME}/bin"
- name: Run SystemReporter on GraalVM
Expand All @@ -94,9 +145,52 @@ jobs:
run: graalsqueak --native --code "1 tinyBenchmarks" images/test-64bit.image
- name: Upload GraalSqueak component
run: mx.graalsqueak/utils.sh deploy-asset ${{ github.ref }} ${{ env.INSTALLABLE_TARGET }} ${{ secrets.GITHUB_TOKEN }}

macos:
name: Test on macOS with Graal

macos-java11:
name: macOS + JDK11 + Graal
runs-on: macos-latest
steps:
- name: Clone GraalSqueak repository
uses: actions/checkout@v2
with:
submodules: true
- name: Set up dependencies
shell: bash
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2
mx.graalsqueak/utils.sh shallow-clone-graalvm-project https://github.com/oracle/graal.git
mx.graalsqueak/utils.sh shallow-clone-graalvm-project https://github.com/graalvm/graaljs.git
mx.graalsqueak/utils.sh download-graalsqueak-image
mx.graalsqueak/utils.sh ensure-test-image
git clone --quiet --depth 1 https://github.com/graalvm/mx.git ${HOME}/mx
echo "::add-path::${HOME}/mx"
export JAVA_HOME="$(mx.graalsqueak/utils.sh download-labsjdk11 ~/)"
echo "::add-path::${JAVA_HOME}/bin"
echo "::set-env name=JAVA_HOME::${JAVA_HOME}"
- name: Run gate with Graal compiler
run: mx --disable-polyglot --dy /graal-js,/compiler gate --strict-mode --tags build,test
- name: Build and install GraalSqueak component
run: |
mx --env graalsqueak-svm build --dependencies=SMALLTALK_INSTALLABLE_SVM_JAVA11
export INSTALLABLE_TARGET="$(mx.graalsqueak/utils.sh installable-filename java11)"
echo "::set-env name=INSTALLABLE_TARGET::${INSTALLABLE_TARGET}"
cp $(mx --env graalsqueak-svm paths SMALLTALK_INSTALLABLE_SVM_JAVA11) "${INSTALLABLE_TARGET}"
export GRAALVM_HOME="$(mx.graalsqueak/utils.sh download-graalvm-ce java11 ~/)"
${GRAALVM_HOME}/bin/gu install -L "${INSTALLABLE_TARGET}"
echo "::add-path::${GRAALVM_HOME}/bin"
- name: Run SystemReporter on GraalVM
run: 'graalsqueak --jvm --code "String streamContents: [:s | SystemReporter new reportVM: s] limitedTo: 10000"'
- name: Run SystemReporter on Native Image
run: 'graalsqueak --native --code "String streamContents: [:s | SystemReporter new reportVM: s] limitedTo: 10000" images/test-64bit.image'
- name: Run tinyBenchmarks on GraalVM
run: graalsqueak --jvm --code "1 tinyBenchmarks" images/test-64bit.image
- name: Run tinyBenchmarks on Native Image
run: graalsqueak --native --code "1 tinyBenchmarks" images/test-64bit.image
- name: Upload GraalSqueak component
run: mx.graalsqueak/utils.sh deploy-asset ${{ github.ref }} ${{ env.INSTALLABLE_TARGET }} ${{ secrets.GITHUB_TOKEN }}

macos-java8:
name: macOS + JDK8 + Graal
runs-on: macos-latest
steps:
- name: Clone GraalSqueak repository
Expand All @@ -121,10 +215,10 @@ jobs:
- name: Build and install GraalSqueak component
run: |
mx --env graalsqueak-svm build --dependencies=SMALLTALK_INSTALLABLE_SVM_JAVA8
export INSTALLABLE_TARGET="$(mx.graalsqueak/utils.sh installable-filename)"
export INSTALLABLE_TARGET="$(mx.graalsqueak/utils.sh installable-filename java8)"
echo "::set-env name=INSTALLABLE_TARGET::${INSTALLABLE_TARGET}"
cp $(mx --env graalsqueak-svm paths SMALLTALK_INSTALLABLE_SVM_JAVA8) "${INSTALLABLE_TARGET}"
export GRAALVM_HOME="$(mx.graalsqueak/utils.sh download-graalvm-ce ~/)"
export GRAALVM_HOME="$(mx.graalsqueak/utils.sh download-graalvm-ce java8 ~/)"
${GRAALVM_HOME}/bin/gu install -L "${INSTALLABLE_TARGET}"
echo "::add-path::${GRAALVM_HOME}/bin"
- name: Run SystemReporter on GraalVM
Expand All @@ -137,15 +231,61 @@ jobs:
run: graalsqueak --native --code "1 tinyBenchmarks" images/test-64bit.image
- name: Upload GraalSqueak component
run: mx.graalsqueak/utils.sh deploy-asset ${{ github.ref }} ${{ env.INSTALLABLE_TARGET }} ${{ secrets.GITHUB_TOKEN }}

windows:
name: Test on Windows

windows-java11:
name: Windows + JDK11
runs-on: windows-latest
steps:
- name: Clone GraalSqueak repository
uses: actions/checkout@v2
with:
submodules: true
- name: Set up JDK11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Set up dependencies
shell: bash
run: |
mx.graalsqueak/utils.sh shallow-clone-graalvm-project https://github.com/oracle/graal.git
mx.graalsqueak/utils.sh shallow-clone-graalvm-project https://github.com/graalvm/graaljs.git
mx.graalsqueak/utils.sh download-graalsqueak-image
mx.graalsqueak/utils.sh ensure-test-image
git clone --quiet --depth 1 https://github.com/graalvm/mx.git ${HOME}/mx
echo "::add-path::$(echo ${HOME} | sed 's/\/c/C:/g' | sed 's/\//\\/g')\mx"
export GRAALVM_HOME="$(mx.graalsqueak/utils.sh download-graalvm-ce java11 ~/ | sed 's/\/c/C:/g' | sed 's/\//\\/g')"
echo "::add-path::${GRAALVM_HOME}\bin"
- name: Run gate
shell: cmd
run: mx gate -B="--no-native" --strict-mode --tags build,test
- name: Build and install GraalSqueak component
shell: pwsh
run: |
mx --disable-installables=false build --dependencies=SMALLTALK_INSTALLABLE_BGRAALSQUEAK.EXE_JAVA11
$env:InstallableTarget = (bash mx.graalsqueak/utils.sh installable-filename java11)
echo "::set-env name=INSTALLABLE_TARGET::${env:InstallableTarget}"
Copy-Item $(mx --disable-installables=false paths SMALLTALK_INSTALLABLE_BGRAALSQUEAK.EXE_JAVA11) -Destination "${pwd}\${env:InstallableTarget}"
gu.cmd install -L "${pwd}\${env:InstallableTarget}"
- name: Run SystemReporter on GraalVM
run: 'graalsqueak.cmd --jvm --code "String streamContents: [:s ^| SystemReporter new reportVM: s] limitedTo: 10000"'
- name: Run tinyBenchmarks on GraalVM
run: graalsqueak.cmd --jvm --code "1 tinyBenchmarks" images/test-64bit.image
- name: Upload GraalSqueak component
shell: bash
run: mx.graalsqueak/utils.sh deploy-asset ${{ github.ref }} ${{ env.INSTALLABLE_TARGET }} ${{ secrets.GITHUB_TOKEN }}

windows-java8:
name: Windows + JDK8
runs-on: windows-latest
steps:
- name: Clone GraalSqueak repository
uses: actions/checkout@v2
with:
submodules: true
- name: Set up JDK11
uses: actions/setup-java@v1
with:
java-version: '8'
- name: Set up dependencies
shell: bash
run: |
Expand All @@ -155,7 +295,7 @@ jobs:
mx.graalsqueak/utils.sh ensure-test-image
git clone --quiet --depth 1 https://github.com/graalvm/mx.git ${HOME}/mx
echo "::add-path::$(echo ${HOME} | sed 's/\/c/C:/g' | sed 's/\//\\/g')\mx"
export GRAALVM_HOME="$(mx.graalsqueak/utils.sh download-graalvm-ce ~/ | sed 's/\/c/C:/g' | sed 's/\//\\/g')"
export GRAALVM_HOME="$(mx.graalsqueak/utils.sh download-graalvm-ce java8 ~/ | sed 's/\/c/C:/g' | sed 's/\//\\/g')"
echo "::add-path::${GRAALVM_HOME}\bin"
- name: Run gate
shell: cmd
Expand All @@ -164,7 +304,7 @@ jobs:
shell: pwsh
run: |
mx --disable-installables=false build --dependencies=SMALLTALK_INSTALLABLE_BGRAALSQUEAK.EXE_JAVA8
$env:InstallableTarget = (bash mx.graalsqueak/utils.sh installable-filename)
$env:InstallableTarget = (bash mx.graalsqueak/utils.sh installable-filename java8)
echo "::set-env name=INSTALLABLE_TARGET::${env:InstallableTarget}"
Copy-Item $(mx --disable-installables=false paths SMALLTALK_INSTALLABLE_BGRAALSQUEAK.EXE_JAVA8) -Destination "${pwd}\${env:InstallableTarget}"
gu.cmd install -L "${pwd}\${env:InstallableTarget}"
Expand Down
5 changes: 0 additions & 5 deletions mx.graalsqueak/mx_graalsqueak.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@
]


# Disable JVMCI class loader if not on Windows
if sys.platform != 'win32':
BASE_VM_ARGS_TESTING.append('-XX:-UseJVMCIClassLoader')


_suite = mx.suite('graalsqueak')
_compiler = mx.suite('compiler', fatalIfMissing=False)

Expand Down
2 changes: 2 additions & 0 deletions mx.graalsqueak/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"image": "GraalSqueakImage-1.0.0-rc7.zip",
"image_tag": "1.0.0-rc7",
"jdk8_update": "242",
"jdk11": "11.0.6",
"jdk11_update": "9",
"jvmci": "jvmci-20.0-b02",
"test_image": "GraalSqueakTestImage-19329-64bit.zip",
"test_image_tag": "1.0.0-rc6",
Expand Down
23 changes: 19 additions & 4 deletions mx.graalsqueak/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,29 @@ download-asset() {
}

download-graalvm-ce() {
local target_dir=$1
local java_version=$1
local target_dir=$2
local file_suffix=".tar.gz" && [[ "${OS_NAME}" == "windows" ]] && file_suffix=".zip"
local file="graalvm-ce-java8-${OS_NAME}-amd64-${DEP_GRAALVM}${file_suffix}"
local file="graalvm-ce-${java_version}-${OS_NAME}-amd64-${DEP_GRAALVM}${file_suffix}"

pushd "${target_dir}" > /dev/null

curl -sSL --retry 3 -o "${file}" "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${DEP_GRAALVM}/${file}"
if [[ "${OS_NAME}" == "windows" ]]; then unzip -qq "${file}"; else tar -xzf "${file}"; fi
echo "$(pwd)/graalvm-ce-java8-${DEP_GRAALVM}${JAVA_HOME_SUFFIX}"
echo "$(pwd)/graalvm-ce-${java_version}-${DEP_GRAALVM}${JAVA_HOME_SUFFIX}"

popd > /dev/null
}

download-labsjdk11() {
local target_dir=$1
local jdk_tar=${target_dir}/jdk.tar.gz

pushd "${target_dir}" > /dev/null

curl -sSL --retry 3 -o "${jdk_tar}" "https://github.com/graalvm/labs-openjdk-11/releases/download/${DEP_JVMCI}/labsjdk-ce-${DEP_JDK11}+${DEP_JDK11_UPDATE}-${DEP_JVMCI}-${OS_NAME}-amd64.tar.gz"
tar xzf "${jdk_tar}"
echo "$(pwd)/labsjdk-ce-${DEP_JDK11}-${DEP_JVMCI}${JAVA_HOME_SUFFIX}"

popd > /dev/null
}
Expand Down Expand Up @@ -147,10 +161,11 @@ ensure-test-image() {
}

installable-filename() {
local java_version=$1
local git_describe=$(git describe --tags --always)
local git_short_commit=$(git log -1 --format="%h")
local git_description="${git_describe:-${git_short_commit}}"
echo "graalsqueak-installable-${OS_NAME}-amd64-${git_description}-for-GraalVM-${DEP_GRAALVM}.jar"
echo "graalsqueak-installable-${java_version}-${OS_NAME}-amd64-${git_description}-for-GraalVM-${DEP_GRAALVM}.jar"
}

shallow-clone() {
Expand Down

0 comments on commit 34da75b

Please sign in to comment.