Update recommended image to 23.0.1
.
#1177
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test TruffleSqueak | |
on: | |
push: | |
branches-ignore: | |
- 'experiements/**' | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
- gu-catalog.properties | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
- gu-catalog.properties | |
workflow_dispatch: | |
env: | |
VERBOSE_GRAALVM_LAUNCHERS: true | |
MX_GATE_OPTS: '--strict-mode --omit-clean --no-warning-as-error' | |
jobs: | |
style_and_build_config: | |
name: Code Style + Build Config | |
timeout-minutes: 15 | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Clone TruffleSqueak repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Set up dependencies | |
run: | | |
# Download Eclipse SDK | |
eclipse_tar_path="${RUNNER_TEMP}/eclipse.tar.gz" | |
wget --no-verbose https://archive.eclipse.org/eclipse/downloads/drops4/R-4.26-202211231800/eclipse-SDK-4.26-linux-gtk-x86_64.tar.gz -O ${eclipse_tar_path} | |
tar -xzf ${eclipse_tar_path} -C ${RUNNER_TEMP} | |
echo "ECLIPSE_EXE=${RUNNER_TEMP}/eclipse/eclipse" >> "${GITHUB_ENV}" # required by mx | |
echo "JDT=builtin" >> "${GITHUB_ENV}" # required by mx | |
# Set up mx, oracle/graal, and LabsJDK17 | |
mx.trufflesqueak/utils.sh "set-up-mx && shallow-clone-graal && set-up-labsjdk labsjdk-ce-17 ~/" | |
# Set up style dependencies | |
sudo apt update && sudo apt install python3-pip python-setuptools | |
jq -r '.pip | to_entries[] | .key+.value' ../graal/common.json | xargs sudo pip install | |
- name: Check style and perform full build | |
run: mx gate ${{ env.MX_GATE_OPTS }} --tags style,fullbuild | |
build-jar: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-20.04-aarch64, macos-11, windows-2022] | |
java: [17, 20] | |
env: | |
RUN_TESTS: "${{ matrix.os == 'ubuntu-20.04' || matrix.java == 17 }}" | |
RUN_WITH_COVERAGE: "${{ matrix.os == 'ubuntu-20.04' && matrix.java == 17 }}" | |
MX_ENV: "trufflesqueak-jar" | |
name: JAR ${{ matrix.os }} + JDK${{ matrix.java }} | |
timeout-minutes: 60 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Clone TruffleSqueak repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Set up dependencies | |
shell: bash | |
run: mx.trufflesqueak/utils.sh set-up-dependencies java${{ matrix.java }} false | |
- name: Build TruffleSqueak installable | |
run: mx.trufflesqueak/utils.sh build-installable ${{ matrix.java }} | |
if: ${{ runner.os != 'Windows' }} | |
- name: Build TruffleSqueak installable via cmd.exe | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
call mx --env ${{ env.MX_ENV }} --no-download-progress build --dependencies SMALLTALK_INSTALLABLE_CE_JAVA${{ matrix.java }},GRAALVM_TRUFFLESQUEAK_JAR_JAVA${{ matrix.java }} | |
call mx --env ${{ env.MX_ENV }} graalvm-home > graalvm-home-with-forward-slashes.txt | |
set /p GRAALVM_HOME=<graalvm-home-with-forward-slashes.txt | |
setlocal enabledelayedexpansion | |
set "GRAALVM_HOME=%GRAALVM_HOME:/=\%" | |
echo %GRAALVM_HOME%\bin>>%GITHUB_PATH% | |
echo GRAALVM_HOME=%GRAALVM_HOME%>>%GITHUB_ENV% | |
echo [%GRAALVM_HOME% set as $GRAALVM_HOME] | |
call mx --env ${{ env.MX_ENV }} paths SMALLTALK_INSTALLABLE_CE_JAVA${{ matrix.java }} > installable-path-with-forward-slashes.txt | |
set /p INSTALLABLE_PATH=<installable-path-with-forward-slashes.txt | |
setlocal enabledelayedexpansion | |
set "INSTALLABLE_PATH=%INSTALLABLE_PATH:/=\%" | |
copy %INSTALLABLE_PATH% ${{ env.INSTALLABLE_TARGET }} | |
if: ${{ runner.os == 'Windows' }} | |
- name: Run SystemReporter on TruffleSqueak | |
run: 'trufflesqueak --code "(String streamContents: [:s | SystemReporter basicNew reportImage: s; reportVM: s; reportVMParameters: s]) withUnixLineEndings" images/test-64bit.image' | |
- name: Upload TruffleSqueak installable | |
shell: bash | |
run: mx.trufflesqueak/utils.sh deploy-asset ${{ env.INSTALLABLE_TARGET }} ${{ secrets.GITHUB_TOKEN }} | |
- name: Clone Graal.js repository | |
shell: bash | |
run: mx.trufflesqueak/utils.sh shallow-clone-graaljs | |
if: ${{ env.RUN_TESTS == 'true' }} | |
- name: Run gate with Graal compiler and Graal.js | |
run: mx --disable-polyglot --dy /compiler,/graal-js gate ${{ env.MX_GATE_OPTS }} --tags build,test | |
if: ${{ env.RUN_TESTS == 'true' && runner.os != 'Windows' && env.RUN_WITH_COVERAGE != 'true' }} | |
- name: Run gate with Graal.js and code coverage # do not use Graal compiler with JaCoCo code coverage | |
run: mx --disable-polyglot --dy /graal-js gate ${{ env.MX_GATE_OPTS }} --tags build,test --jacocout coverage | |
if: ${{ env.RUN_TESTS == 'true' && runner.os != 'Windows' && env.RUN_WITH_COVERAGE == 'true' }} | |
- name: Run gate with Graal compiler and Graal.js via cmd.exe | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
mx --disable-polyglot --dy /compiler,/graal-js gate ${{ env.MX_GATE_OPTS }} --tags build,test | |
if: ${{ env.RUN_TESTS == 'true' && runner.os == 'Windows' }} | |
- name: Report code coverage | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
run: | | |
bash <(curl -s https://codecov.io/bash) | |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r jacoco.xml | |
if: ${{ env.RUN_WITH_COVERAGE == 'true' && job.status == 'success' }} | |
- name: Zip Graal compiler dumps | |
shell: bash | |
run: "[[ -d graal_dumps ]] && zip -r graal_dumps.zip graal_dumps || true" | |
if: ${{ env.RUN_TESTS == 'true' }} | |
- name: Upload Graal compiler dumps | |
uses: actions/upload-artifact@v3 | |
with: | |
name: graal_dumps | |
path: graal_dumps.zip | |
if-no-files-found: ignore | |
retention-days: 5 | |
if: ${{ env.RUN_TESTS == 'true' }} | |
build-standalone: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-20.04-aarch64, windows-2022] # temporarily disabled: macos-11 | |
env: | |
JAVA_VERSION: "20" | |
MX_ENV: "trufflesqueak-standalone" | |
VERBOSE_GRAALVM_LAUNCHERS: true | |
name: Standalone ${{ matrix.os }} | |
timeout-minutes: 60 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Clone TruffleSqueak repository | |
uses: actions/checkout@v3 | |
- name: Set up Oracle GraalVM | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: 'graalvm' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Enable Oracle GraalVM | |
shell: bash | |
run: | | |
echo "EXTRA_GRAALVM_HOME=$JAVA_HOME" >> $GITHUB_ENV | |
cat "${JAVA_HOME}/LICENSE.txt" > "${GITHUB_WORKSPACE}/LICENSE" | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Set up dependencies | |
shell: bash | |
run: mx.trufflesqueak/utils.sh set-up-dependencies java${{ env.JAVA_VERSION }} true | |
- name: Build TruffleSqueak standalone | |
run: mx.trufflesqueak/utils.sh build-standalone ${{ env.JAVA_VERSION }} | |
if: ${{ runner.os != 'Windows' }} | |
- name: Build TruffleSqueak standalone via cmd.exe | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
call mx --env ${{ env.MX_ENV }} --no-download-progress build --dependencies SMALLTALK_STANDALONE_SVM_JAVA${{ env.JAVA_VERSION }},GRAALVM_TRUFFLESQUEAK_STANDALONE_JAVA${{ env.JAVA_VERSION }} | |
call mx --env ${{ env.MX_ENV }} standalone-home smalltalk > standalone-home-with-forward-slashes.txt | |
set /p STANDALONE_HOME=<standalone-home-with-forward-slashes.txt | |
setlocal enabledelayedexpansion | |
set "STANDALONE_HOME=%STANDALONE_HOME:/=\%" | |
echo %STANDALONE_HOME%\bin>>%GITHUB_PATH% | |
echo [%STANDALONE_HOME%\bin added to $PATH] | |
call mx --env ${{ env.MX_ENV }} paths SMALLTALK_STANDALONE_SVM_JAVA${{ env.JAVA_VERSION }} > standalone-path-with-forward-slashes.txt | |
set /p STANDALONE_PATH=<standalone-path-with-forward-slashes.txt | |
setlocal enabledelayedexpansion | |
set "STANDALONE_PATH=%STANDALONE_PATH:/=\%" | |
copy %STANDALONE_PATH% ${{ env.STANDALONE_TARGET }} | |
if: ${{ runner.os == 'Windows' }} | |
- name: Run SystemReporter on TruffleSqueak standalone | |
run: 'trufflesqueak --code "(String streamContents: [:s | SystemReporter basicNew reportImage: s; reportVM: s; reportVMParameters: s]) withUnixLineEndings" images/test-64bit.image' | |
- name: Upload TruffleSqueak standalone | |
shell: bash | |
run: mx.trufflesqueak/utils.sh deploy-asset ${{ env.STANDALONE_TARGET }} ${{ secrets.GITHUB_TOKEN }} | |
# GraalVM Native Image does not support AWT on macOS yet (https://github.com/oracle/graal/issues/4921) | |
# Also, it dynamically links against AWT on Windows, and the additional dlls are not being picked up for standalones yet | |
if: ${{ runner.os != 'macOS' && runner.os != 'Windows' }} | |
- name: Run Cuis-Smalltalk tests on TruffleSqueak standalone | |
run: | | |
mx.trufflesqueak/utils.sh download-cuis-test-image | |
trufflesqueak --vm.ea --vm.esa --headless --experimental-options --smalltalk.resource-summary=true --engine.CompilationFailureAction=ExitVM --engine.TreatPerformanceWarningsAsErrors=call,instanceof,store,trivial --engine.CompilationStatistics images/Cuis6.0-????.image -s src/de.hpi.swa.trufflesqueak.test/src/de/hpi/swa/trufflesqueak/test/runCuisTests.st | |
if: ${{ matrix.os == 'ubuntu-20.04' }} |