-
Notifications
You must be signed in to change notification settings - Fork 14
174 lines (170 loc) · 8.06 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: Test TruffleSqueak
on:
push:
branches-ignore:
- 'experiements/**'
paths-ignore:
- '**.md'
- 'docs/**'
- gu-catalog.properties
pull_request:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
- gu-catalog.properties
jobs:
style_and_build_config:
name: Code Style + Build Config
timeout-minutes: 15
runs-on: ubuntu-18.04
steps:
- name: Clone TruffleSqueak repository
uses: actions/checkout@v2
- name: Set up dependencies
run: |
# Install pylint
sudo apt update -qq && sudo apt install -qq python-pip python-virtualenv
virtualenv ~/venv
source ~/venv/bin/activate
pip install --quiet astroid==1.1.0 pylint==1.1.0
# Download Eclipse SDK
eclipse_tar="ci-dep-eclipse-SDK-4.5.2-linux-gtk-x86_64.tar.gz"
eclipse_tar_path="${HOME}/${eclipse_tar}"
mx.trufflesqueak/utils.sh download-asset "${eclipse_tar}" 0.8.0 "${eclipse_tar_path}"
tar -xzf ${eclipse_tar_path} -C ${HOME}
echo "ECLIPSE_EXE=${HOME}/eclipse/eclipse" >> "${GITHUB_ENV}" # required by mx
# Download ECJ
mx.trufflesqueak/utils.sh download-asset "ci-dep-ecj-4.5.2.jar" 0.8.0 "${HOME}/ecj.jar"
echo "JDT=${HOME}/ecj.jar" >> "${GITHUB_ENV}" # required by mx
# Set up mx, oracle/graal, and LabsJDK11
mx.trufflesqueak/utils.sh "set-up-mx && shallow-clone-graalvm-project https://github.com/oracle/graal.git && set-up-labsjdk11 ~/"
- name: Check style and perform full build
run: |
source ~/venv/bin/activate
mx gate --strict-mode --tags style,fullbuild
amd64-builds:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
java: [11, 17]
env:
BUILD_SVM: "${{ matrix.os != 'windows-latest' && matrix.java != 17 }}"
RUN_TESTS: "${{ matrix.os == 'ubuntu-latest' || matrix.java == 11 }}"
RUN_WITH_COVERAGE: "${{ matrix.os == 'ubuntu-latest' && matrix.java == 17 }}"
GRAALVM_HOME_ENV: "${{ matrix.os == 'windows-latest' && 'trufflesqueak-jvm' || 'trufflesqueak-svm' }}"
TRUFFLESQUEAK_EXEC: "${{ matrix.os == 'windows-latest' && 'trufflesqueak.cmd' || 'trufflesqueak' }}"
name: ${{ matrix.os }} + JDK${{ matrix.java }}
timeout-minutes: 90
runs-on: ${{ matrix.os }}
steps:
- name: Clone TruffleSqueak repository
uses: actions/checkout@v2
with:
submodules: true
- name: Set up dependencies
shell: bash
run: mx.trufflesqueak/utils.sh set-up-dependencies java${{ matrix.java }}
- name: Build TruffleSqueak JVM component
run: mx.trufflesqueak/utils.sh build-component trufflesqueak-jvm SMALLTALK_INSTALLABLE_JAVA${{ matrix.java }} ${{ env.INSTALLABLE_JVM_TARGET }}
if: ${{ matrix.os != 'windows-latest' }}
- name: Build TruffleSqueak JVM component via cmd.exe
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call mx --env trufflesqueak-jvm --no-download-progress build
call mx --env trufflesqueak-jvm 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 trufflesqueak-jvm paths SMALLTALK_INSTALLABLE_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_JVM_TARGET }}
if: ${{ matrix.os == 'windows-latest' }}
- name: Build TruffleSqueak SVM component
run: mx.trufflesqueak/utils.sh build-component trufflesqueak-svm SMALLTALK_INSTALLABLE_SVM_JAVA${{ matrix.java }} ${{ env.INSTALLABLE_SVM_TARGET }}
if: ${{ env.BUILD_SVM == 'true' }}
- name: Run SystemReporter on GraalVM
shell: bash
run: ${{ env.TRUFFLESQUEAK_EXEC }} --jvm --code "SystemReporter new reportText asString"
- name: Run SystemReporter on SubstrateVM
shell: bash
run: ${{ env.TRUFFLESQUEAK_EXEC }} --native --code "SystemReporter new reportText asString" images/test-64bit.image
if: ${{ env.BUILD_SVM == 'true' }}
- name: Upload TruffleSqueak JVM component
shell: bash
run: mx.trufflesqueak/utils.sh deploy-asset ${{ env.INSTALLABLE_JVM_TARGET }} ${{ secrets.GITHUB_TOKEN }}
- name: Upload TruffleSqueak SVM component
shell: bash
run: mx.trufflesqueak/utils.sh deploy-asset ${{ env.INSTALLABLE_SVM_TARGET }} ${{ secrets.GITHUB_TOKEN }}
if: ${{ env.BUILD_SVM == 'true' }}
- name: Run gate with Graal compiler and Graal.js
run: mx --disable-polyglot --dy /compiler,/graal-js gate -j -n --strict-mode --tags build,test
if: ${{ env.RUN_TESTS == 'true' && matrix.os != 'windows-latest' && 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 -j -n --strict-mode --tags build,test --jacocout coverage
if: ${{ env.RUN_TESTS == 'true' && matrix.os != 'windows-latest' && env.RUN_WITH_COVERAGE == 'true' }}
- name: Run gate with Graal compiler and Graal.js via cmd.exe
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
mx --disable-polyglot --dy /compiler,/graal-js gate -j -n --strict-mode --tags build,test
if: ${{ env.RUN_TESTS == 'true' && matrix.os == 'windows-latest' }}
- 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@v2
with:
name: graal_dumps
path: graal_dumps.zip
if-no-files-found: ignore
retention-days: 5
if: ${{ env.RUN_TESTS == 'true' }}
aarch64-builds:
strategy:
fail-fast: false
matrix:
java: [11, 17]
name: ubuntu-20.04/aarch64 + JDK${{ matrix.java }}
timeout-minutes: 30
runs-on: ubuntu-18.04
steps:
- name: Clone TruffleSqueak repository
uses: actions/checkout@v2
- name: Build and test TruffleSqueak component
uses: uraimo/run-on-arch-action@v2.0.7
id: build_aarch64
with:
arch: aarch64
distro: ubuntu20.04
run: |
apt update && apt install -y build-essential curl git python unzip
mx.trufflesqueak/utils.sh "set-up-dependencies java${{ matrix.java }} && set-up-graalvm ${{ matrix.java }}"
source "${HOME}/all_env_vars"
export PATH="${MX_HOME}:${GRAALVM_HOME}/bin:${PATH}"
mx --env trufflesqueak-jvm --no-download-progress build --dependencies=SMALLTALK_INSTALLABLE_JAVA${{ matrix.java }}
cp "$(mx --env trufflesqueak-jvm paths SMALLTALK_INSTALLABLE_JAVA${{ matrix.java }})" "${INSTALLABLE_JVM_TARGET}"
echo ::set-output name=installable_jvm::${INSTALLABLE_JVM_TARGET}
gu install -L ${INSTALLABLE_JVM_TARGET}
trufflesqueak --jvm --code "SystemReporter new reportText asString"
env: |
GITHUB_PATH: $GITHUB_PATH
GITHUB_ENV: $GITHUB_ENV
- name: Upload TruffleSqueak component
run: mx.trufflesqueak/utils.sh deploy-asset ${{ steps.build_aarch64.outputs.installable_jvm }} ${{ secrets.GITHUB_TOKEN }}